kernel_optimize_test/arch/xtensa/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
..
align.S
asm-offsets.c xtensa: Shuffle include statements to fix linker script 2010-05-02 01:05:13 -07:00
coprocessor.S
entry.S xtensa: Shuffle include statements to fix linker script 2010-05-02 01:05:13 -07:00
head.S xtensa: Fixes due to bss boundary symbol name changes. 2010-05-01 23:05:29 -07:00
init_task.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
io.c
irq.c genirq: Cleanup irq_chip->typename leftovers 2010-09-23 19:12:26 +02:00
Makefile xtensa: Fix linker script patch-up 2010-05-01 23:00:07 -07:00
module.c module: cleanup FIXME comments about trimming exception table entries. 2009-06-12 21:47:05 +09:30
pci-dma.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
pci.c resource/PCI: mark struct resource as const 2010-02-22 16:16:57 -08:00
platform.c xtensa: remove platform rtc hooks 2009-04-02 23:45:07 -07:00
process.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
ptrace.c ptrace: cleanup arch_ptrace() on xtensa 2010-10-27 18:03:12 -07:00
setup.c xtensa: nommu support 2009-04-02 23:41:50 -07:00
signal.c
syscall.c sanitize do_pipe_flags() callers in arch 2009-12-16 12:16:40 -05:00
time.c xtensa: Switch do_timer() to xtime_update() 2011-01-31 14:55:46 +01:00
traps.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
vectors.S xtensa: includecheck fix: vectors.S 2010-05-25 08:06:56 -07:00
vmlinux.lds.S percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
xtensa_ksyms.c remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00