kernel-ark/arch/x86
Jeremy Fitzhardinge d8d5900ef8 x86: preallocate and prepopulate separately
Jan Beulich points out that vmalloc_sync_all() assumes that the
kernel's pmd is always expected to be present in the pgd.  The current
pgd construction code will add the pgd to the pgd_list before its pmds
have been pre-populated, thereby making it visible to
vmalloc_sync_all().

However, because pgd_prepopulate_pmd also does the allocation, it may
block and cannot be done under spinlock.

The solution is to preallocate the pmds out of the spinlock, then
populate them while holding the pgd_list lock.

This patch also pulls the pmd preallocation and mop-up functions out
to be common, assuming that the compiler will generate no code for
them when PREALLOCTED_PMDS is 0.  Also, there's no need for pgd_ctor
to clear the pgd again, since it's allocated as a zeroed page.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Jan Beulich <jbeulich@novell.com>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-08 13:11:02 +02:00
..
boot Merge branch 'x86/mpparse' into x86/devel 2008-07-08 11:14:58 +02:00
configs x86: defconfig updates 2008-05-12 21:28:12 +02:00
crypto [CRYPTO] aes-x86-32: Remove unused return code 2008-04-21 10:19:21 +08:00
ia32 x86-64: remove unnecessary ptregs call stubs 2008-06-19 14:25:11 +02:00
kernel x86/paravirt: add a pgd_alloc/free hooks 2008-07-08 13:11:01 +02:00
kvm KVM: Make kvm host use the paravirt clocksource structs 2008-06-24 21:02:32 +03:00
lguest x86: rename two e820 related functions 2008-07-08 10:37:01 +02:00
lib Merge branch 'linus' into x86/delay 2008-06-25 12:30:10 +02:00
mach-default x86: merge setup_memory_map with e820 2008-07-08 10:38:25 +02:00
mach-es7000 x86: make generic arch support NUMAQ 2008-06-10 11:34:42 +02:00
mach-generic x86: make generic arch support NUMAQ, fix 2008-07-08 10:35:45 +02:00
mach-rdc321x
mach-visws Merge branch 'x86/mpparse' into x86/devel 2008-07-08 11:14:58 +02:00
mach-voyager x86: cleanup machine_specific_memory_setup, v2 2008-07-08 10:39:01 +02:00
math-emu x86: coding style fixes to arch/x86/math-emu/reg_constant 2008-06-18 15:00:13 +02:00
mm x86: preallocate and prepopulate separately 2008-07-08 13:11:02 +02:00
oprofile x86/oprofile: disable preemption in nmi_shutdown 2008-06-24 13:48:29 +02:00
pci Merge branch 'x86/numa' into x86/devel 2008-07-08 11:59:23 +02:00
power x86: remove end_pfn in 64bit 2008-07-08 13:10:38 +02:00
vdso Merge branches 'x86/numa-fixes', 'x86/apic', 'x86/apm', 'x86/bitops', 'x86/build', 'x86/cleanups', 'x86/cpa', 'x86/cpu', 'x86/defconfig', 'x86/gart', 'x86/i8259', 'x86/intel', 'x86/irqstats', 'x86/kconfig', 'x86/ldt', 'x86/mce', 'x86/memtest', 'x86/pat', 'x86/ptemask', 'x86/resumetrace', 'x86/threadinfo', 'x86/timers', 'x86/vdso' and 'x86/xen' into x86/devel 2008-07-08 09:16:56 +02:00
video x86: video/fbdev.c: add MODULE_LICENSE 2008-05-04 20:04:46 +02:00
xen x86/paravirt: add a pgd_alloc/free hooks 2008-07-08 13:11:01 +02:00
Kconfig x86: make x86_find_smp_config depends on 64 bit too 2008-07-08 13:10:54 +02:00
Kconfig.cpu x86: separate cmpxchg8b checking from PAE checking 2008-05-12 21:28:09 +02:00
Kconfig.debug Merge branch 'x86/numa' into x86/devel 2008-07-08 11:59:23 +02:00
Makefile Merge branch 'x86/mpparse' into x86/devel 2008-07-08 11:14:58 +02:00
Makefile_32.cpu