diff options
author | Tejun Heo <tj@kernel.org> | 2011-03-24 18:50:09 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-03-24 18:50:09 +0100 |
commit | 0415b00d175e0d8945e6785aad21b5f157976ce0 (patch) | |
tree | cf6f9286a47a22bf57766a3f17eaf4190bc9c242 /arch/m32r | |
parent | 6c5103890057b1bb781b26b7aae38d33e4c517d8 (diff) | |
download | blackbird-op-linux-0415b00d175e0d8945e6785aad21b5f157976ce0.tar.gz blackbird-op-linux-0415b00d175e0d8945e6785aad21b5f157976ce0.zip |
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
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/kernel/vmlinux.lds.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index c194d64cdbb9..2e7ccf7299a0 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S @@ -53,7 +53,7 @@ SECTIONS __init_begin = .; INIT_TEXT_SECTION(PAGE_SIZE) INIT_DATA_SECTION(16) - PERCPU(32, PAGE_SIZE) + PERCPU_SECTION(32) . = ALIGN(PAGE_SIZE); __init_end = .; /* freed after init ends here */ |