linux/arch/um
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
..
drivers um: remove file pointer from ioctl 2011-03-22 17:44:09 -07:00
include percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
kernel um: Use proper accessors in show_interrupts() 2011-02-14 19:37:40 +01:00
os-Linux um: fix global timer issue when using CONFIG_NO_HZ 2010-10-26 16:52:03 -07:00
scripts uml: throw out CONFIG_MODE_TT 2007-10-16 09:43:05 -07:00
sys-i386 uml: kernels on {i386,x86_64} produce bad coredumps 2011-03-22 17:44:09 -07:00
sys-ia64 uml: remove useless comments 2009-04-01 08:59:17 -07:00
sys-ppc um: change to new flag variables 2011-03-17 14:02:57 +01:00
sys-x86_64 uml: kernels on {i386,x86_64} produce bad coredumps 2011-03-22 17:44:09 -07:00
.gitignore um: tell git to ignore generated files 2010-03-06 11:26:28 -08:00
defconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Kconfig.char sound: make OSS sound core optional 2008-08-29 10:06:21 +02:00
Kconfig.common um: Select GENERIC_HARDIRQS_NO_DEPRECATED 2011-02-14 19:37:40 +01:00
Kconfig.debug uml: GPROF needs to depend on FRAME_POINTER 2008-02-05 09:44:25 -08:00
Kconfig.net uml: fix URLs in Kconfig and help strings 2008-02-05 09:44:25 -08:00
Kconfig.rest uml: kill a kconfig warning 2009-04-21 13:41:50 -07:00
Kconfig.um genirq: Remove __do_IRQ 2011-01-21 11:55:31 +01:00
Kconfig.x86 x86: Remove dead config option X86_CPU 2011-03-09 10:39:36 +01:00
Makefile kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
Makefile-i386 [UML] fix gcc ICEs and unresolved externs 2008-07-07 10:53:10 -07:00
Makefile-ia64
Makefile-os-Linux x86, um: get rid of arch/um/os symlink 2008-10-22 22:55:22 -07:00
Makefile-ppc
Makefile-skas
Makefile-x86_64 [UML] fix gcc ICEs and unresolved externs 2008-07-07 10:53:10 -07:00