linux_dsm_epyc7002/arch/sh
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
..
boards sh: Conver to asm-generic/sizes.h. 2011-03-22 22:43:09 +09:00
boot mmc: Add MMC_PROGRESS_* 2011-03-25 01:24:57 +09:00
cchips sh: hd64461: irq_data conversion. 2010-10-27 15:18:15 +09:00
configs sh: update sh7757lcr_defconfig 2011-03-11 12:36:30 +09:00
drivers sh: Fix up async PCIe probing on SMP. 2011-01-28 15:14:08 +09:00
include Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2011-03-24 10:04:05 -07:00
kernel percpu: Always align percpu output section to PAGE_SIZE 2011-03-24 18:50:09 +01:00
lib sh: Ensure ST40-300 BogoMIPS value is consistent 2011-02-15 16:24:05 +09:00
lib64
math-emu sh: wire up perf alignment and emulation faults. 2010-10-13 06:55:26 +09:00
mm sh: pmb: Use struct syscore_ops instead of sysdevs 2011-03-23 19:05:18 +09:00
oprofile sh: oprofile: Make sure the backtrace op is available for timer-fallback. 2010-10-27 17:03:50 +09:00
tools sh: Add support for AP-SH4AD-0A board. 2011-01-13 18:36:21 +09:00
Kconfig Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2011-03-24 10:04:05 -07:00
Kconfig.cpu sh: Turn on speculative return for SH7785 and SH7786 2010-02-18 18:54:18 +09:00
Kconfig.debug sh: Remove old early serial console code V2 2009-12-15 12:07:35 +09:00
Makefile sh: support XZ-compressed kernel. 2011-01-14 15:52:54 +09:00