linux_dsm_epyc7002/arch/cris/kernel
Tejun Heo 0415b00d17 percpu: Always align percpu output section to PAGE_SIZE
Percpu allocator honors alignment request upto PAGE_SIZE and both the
percpu addresses in the percpu address space and the translated kernel
addresses should be aligned accordingly.  The calculation of the
former depends on the alignment of percpu output section in the kernel
image.

The linker script macros PERCPU_VADDR() and PERCPU() are used to
define this output section and the latter takes @align parameter.
Several architectures are using @align smaller than PAGE_SIZE breaking
percpu memory alignment.

This patch removes @align parameter from PERCPU(), renames it to
PERCPU_SECTION() and makes it always align to PAGE_SIZE.  While at it,
add PCPU_SETUP_BUG_ON() checks such that alignment problems are
reliably detected and remove percpu alignment comment recently added
in workqueue.c as the condition would trigger BUG way before reaching
there.

For um, this patch raises the alignment of percpu area.  As the area
is in .init, there shouldn't be any noticeable difference.

This problem was discovered by David Howells while debugging boot
failure on mn10300.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
2011-03-24 18:50:09 +01:00
..
asm-offsets.c drop explicit include of autoconf.h 2009-12-12 13:08:15 +01:00
crisksyms.c Generic semaphore implementation 2008-04-17 10:42:34 -04:00
irq.c cris: Use generic show_interrupts() 2011-03-17 15:52:25 +01:00
Makefile arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00
module.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
process.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
profile.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ptrace.c KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
setup.c cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.: cris 2009-03-16 14:11:46 +10:30
sys_cris.c Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
time.c set_rtc_mmss: show warning message only once 2011-01-13 08:03:07 -08:00
traps.c CRIS: Minor generic kernel/traps.c changes. 2008-02-08 11:06:24 +01:00
vmlinux.lds.S percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00