linux-kernel-test/arch
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
..
alpha percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
arm percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
avr32 bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
blackfin percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
cris percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
frv percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
h8300 bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2011-03-24 10:05:23 -07:00
m32r percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
m68k remove dma64_addr_t 2011-03-23 19:47:18 -07:00
m68knommu m68knommu: introduce little-endian bitops 2011-03-23 19:46:14 -07:00
microblaze bitops: introduce CONFIG_GENERIC_FIND_BIT_LE 2011-03-23 19:46:14 -07:00
mips percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
mn10300 percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
parisc percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
powerpc percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
s390 percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
score mm: NUMA aware alloc_thread_info_node() 2011-03-22 17:44:01 -07:00
sh percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
sparc percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
tile percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
um percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
unicore32 unicore32: rewrite arch-specific tlb.h to use asm-generic version 2011-03-17 09:19:21 +08:00
x86 percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
xtensa percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
.gitignore
Kconfig oprofile, s390: Cleanups 2011-03-16 14:30:40 +01:00