kernel-hacking-2024-linux-s.../arch/sparc
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
..
boot sparc32: added U-Boot build target: uImage 2011-03-16 18:19:04 -07:00
configs defconfig reduction 2010-08-14 22:26:53 +02:00
include/asm remove dma64_addr_t 2011-03-23 19:47:18 -07:00
kernel percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
lib Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-15 18:28:30 -07:00
math-emu Revert "endian: #define __BYTE_ORDER" 2010-05-26 08:30:15 -07:00
mm mm: NUMA aware alloc_thread_info_node() 2011-03-22 17:44:01 -07:00
oprofile sparc: using HZ needs an include of linux/param.h 2009-10-05 00:46:08 -07:00
prom sparc32: remove tick14.c 2011-03-16 18:19:08 -07:00
Kconfig bitops: introduce CONFIG_GENERIC_FIND_BIT_LE 2011-03-23 19:46:14 -07:00
Kconfig.debug sparc: Kill user copy check code. 2010-08-09 00:45:46 -07:00
Makefile sparc32: added U-Boot build target: uImage 2011-03-16 18:19:04 -07:00