linux_dsm_epyc7002/arch/x86/xen
Tejun Heo 1a51e3a0ae x86: fold pda into percpu area on SMP
[ Based on original patch from Christoph Lameter and Mike Travis. ]

Currently pdas and percpu areas are allocated separately.  %gs points
to local pda and percpu area can be reached using pda->data_offset.
This patch folds pda into percpu area.

Due to strange gcc requirement, pda needs to be at the beginning of
the percpu area so that pda->stack_canary is at %gs:40.  To achieve
this, a new percpu output section macro - PERCPU_VADDR_PREALLOC() - is
added and used to reserve pda sized chunk at the start of the percpu
area.

After this change, for boot cpu, %gs first points to pda in the
data.init area and later during setup_per_cpu_areas() gets updated to
point to the actual pda.  This means that setup_per_cpu_areas() need
to reload %gs for CPU0 while clearing pda area for other cpus as cpu0
already has modified it when control reaches setup_per_cpu_areas().

This patch also removes now unnecessary get_local_pda() and its call
sites.

A lot of this patch is taken from Mike Travis' "x86_64: Fold pda into
per cpu area" patch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-16 14:19:46 +01:00
..
debugfs.c xen: add debugfs support 2008-08-21 13:52:58 +02:00
debugfs.h xen: add debugfs support 2008-08-21 13:52:58 +02:00
enlighten.c x86: change flush_tlb_others to take a const struct cpumask 2009-01-11 19:13:06 +01:00
grant-table.c xen: make grant table arch portable 2008-04-24 23:57:32 +02:00
irq.c xen: Fix bug `do_IRQ: cannot handle IRQ -1 vector 0x6 cpu 1' 2008-10-16 16:52:58 +02:00
Kconfig xen: make CONFIG_XEN_SAVE_RESTORE depend on CONFIG_XEN 2008-09-30 09:58:05 +02:00
Makefile ftrace: rename FTRACE to FUNCTION_TRACER 2008-10-20 18:27:03 +02:00
mmu.c Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
mmu.h xen: use spin_lock_nest_lock when pinning a pagetable 2008-10-09 14:25:19 +02:00
multicalls.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
multicalls.h xen: add mechanism to extend existing multicalls 2008-06-25 15:17:34 +02:00
setup.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
smp.c x86: fold pda into percpu area on SMP 2009-01-16 14:19:46 +01:00
spinlock.c genirq: revert dynarray 2008-10-16 16:53:15 +02:00
suspend.c xen: convert to cpumask_var_t and new cpumask primitives. 2008-12-16 17:40:57 -08:00
time.c Merge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2009-01-03 11:56:24 -08:00
vdso.h i386: move xen 2007-10-11 11:16:51 +02:00
xen-asm_32.S xen: compile irq functions without -pg for ftrace 2008-07-31 12:39:39 +02:00
xen-asm_64.S xen: clean up x86-64 warnings 2008-10-03 10:04:10 +02:00
xen-head.S xen64: add xen-head code to head_64.S 2008-07-16 10:58:41 +02:00
xen-ops.h xen: convert to cpumask_var_t and new cpumask primitives. 2008-12-16 17:40:57 -08:00