linux/arch/tile
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
..
configs kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
include bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
kernel percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
kvm arch/tile: parameterize system PLs to support KVM port 2010-10-15 15:38:09 -04:00
lib arch/tile: fix futex sanitization definition/prototype mismatch 2011-03-20 00:08:21 -04:00
mm arch/tile: support 4KB page size as well as 64KB 2011-03-10 13:17:53 -05:00
Kbuild arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
Kconfig arch/tile: support 4KB page size as well as 64KB 2011-03-10 13:17:53 -05:00
Kconfig.debug kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile arch/tile: parameterize system PLs to support KVM port 2010-10-15 15:38:09 -04:00