linux/include
Tejun Heo 6b19b0c240 x86, percpu: setup reserved percpu area for x86_64
Impact: fix relocation overflow during module load

x86_64 uses 32bit relocations for symbol access and static percpu
symbols whether in core or modules must be inside 2GB of the percpu
segement base which the dynamic percpu allocator doesn't guarantee.
This patch makes x86_64 reserve PERCPU_MODULE_RESERVE bytes in the
first chunk so that module percpu areas are always allocated from the
first chunk which is always inside the relocatable range.

This problem exists for any percpu allocator but is easily triggered
when using the embedding allocator because the second chunk is located
beyond 2GB on it.

This patch also changes the meaning of PERCPU_DYNAMIC_RESERVE such
that it only indicates the size of the area to reserve for dynamic
allocation as static and dynamic areas can be separate.  New
PERCPU_DYNAMIC_RESERVED is increased by 4k for both 32 and 64bits as
the reserved area separation eats away some allocatable space and
having slightly more headroom (currently between 4 and 8k after
minimal boot sans module area) makes sense for common case
performance.

x86_32 can address anywhere from anywhere and doesn't need reserving.

Mike Galbraith first reported the problem first and bisected it to the
embedding percpu allocator commit.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mike Galbraith <efault@gmx.de>
Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
2009-03-06 14:33:59 +09:00
..
acpi acpi/x86: introduce __apci_map_table, v4 2009-02-09 13:35:07 +01:00
asm-arm
asm-frv Merge branch 'linus' into x86/apic 2009-02-22 20:05:19 +01:00
asm-generic linker script: use separate simpler definition for PERCPU() 2009-01-30 23:27:46 +01:00
asm-h8300
asm-m32r headers_check fix: m32r, swab.h 2009-02-01 11:01:26 +05:30
asm-mn10300 headers_check fix: mn10300, swab.h 2009-02-01 11:01:27 +05:30
crypto crypto: shash - Fix tfm destruction 2009-02-05 16:51:25 +11:00
drm drm: disable encoders before re-routing them 2009-02-25 14:42:23 +10:00
keys
linux x86, percpu: setup reserved percpu area for x86_64 2009-03-06 14:33:59 +09:00
math-emu
media Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-02-02 19:26:06 -08:00
mtd headers_check fix: mtd/inftl-user.h 2009-01-31 00:13:34 +05:30
net netfilter: nf_conntrack: don't try to deliver events for untracked connections 2009-02-18 15:30:34 +01:00
pcmcia
rdma
rxrpc
scsi [SCSI] iscsi_tcp: make padbuf non-static 2009-01-13 10:41:34 -06:00
sound headers_check fix: sound/hdsp.h 2009-01-31 00:13:56 +05:30
trace
video atyfb: fix CONFIG_ namespace violations 2009-02-05 12:56:48 -08:00
xen
Kbuild