kernel-hacking-2024-linux-s.../arch/blackfin
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 Blackfin: encode cpu-rev into uImage name 2011-01-10 07:18:27 -05:00
configs Blackfin: ADI boards: enable pseudo debug insns support 2011-03-18 03:49:26 -04:00
include Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2011-03-24 08:24:28 -07:00
kernel percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
lib Blackfin: outs[lwb]: make sure count is greater than 0 2011-03-04 01:26:55 -05:00
mach-bf518 Blackfin: punt unused HDMA masks 2011-03-18 04:29:17 -04:00
mach-bf527 Blackfin: punt unused HDMA masks 2011-03-18 04:29:17 -04:00
mach-bf533 Blackfin: ip0x: fix unused variable warning 2011-03-18 05:17:02 -04:00
mach-bf537 Blackfin: punt unused HDMA masks 2011-03-18 04:29:17 -04:00
mach-bf538 Blackfin: boards: add missing "static" to peripheral lists 2011-01-10 07:18:25 -05:00
mach-bf548 Blackfin: bf54x: re-enable anomaly 05000353 for all revs 2011-03-22 21:06:16 -04:00
mach-bf561 Blackfin: SMP: flush CoreB cache when shutting down 2011-03-22 21:03:16 -04:00
mach-common Blackfin: wire up new syncfs syscall 2011-03-22 21:03:16 -04:00
mm Blackfin: sram_free_with_lsl: do not ignore return value of sram_free 2011-01-10 07:18:26 -05:00
oprofile
ADI_BSD.txt
Kconfig Blackfin: enable atomic64_t support 2011-03-22 21:03:17 -04:00
Kconfig.debug Blackfin: drop unused irq_panic()/DEBUG_ICACHE_CHECK 2010-10-25 17:24:00 -04:00
Makefile Blackfin: encode cpu-rev into uImage name 2011-01-10 07:18:27 -05:00