1
0
Fork 0
alistair23-linux/arch
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
..
alpha Alpha Linux kernel fails with inconsistent kallsyms data 2008-07-04 10:40:09 -07:00
arm [ARM] 5131/1: Annotate platform_secondary_init with trace_hardirqs_off 2008-06-30 19:08:53 +01:00
avr32 avr32: Fix cpufreq oops when ondemand governor is default 2008-05-27 09:37:42 +02:00
blackfin Blackfin arch: fix up section mismatch warning 2008-06-25 12:41:51 +08:00
cris [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
frv Fix various old email addresses for dwmw2 2008-06-06 11:29:10 -07:00
h8300 [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
ia64 [IA64] export account_system_vtime 2008-06-30 15:06:48 -07:00
m32r [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
m68k m68k: enable CONFIG_COMPAT_BRK by default 2008-06-06 11:29:09 -07:00
m68knommu m68knommu: init coldfire timer TRR with n - 1, not n 2008-06-12 18:05:40 -07:00
mips [MIPS] cevt-txx9: Reset timer counter on initialization 2008-07-03 19:14:27 +01:00
mn10300 mn10300: provide __ucmpdi2() for MN10300 2008-07-04 10:40:07 -07:00
parisc parisc: fix off by one in setup_sigcontext32 2008-06-13 10:49:55 -04:00
powerpc Merge branch 'for-2.6.26' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge 2008-07-03 10:05:59 +10:00
ppc [POWERPC] Export empty_zero_page and copy_page in arch/ppc 2008-05-31 17:08:28 +10:00
s390 Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-06-11 10:35:44 -07:00
sh sh: Add -mno-fdpic to default flags. 2008-06-09 16:49:43 +09:00
sparc sparc: switch /proc/led to seq_file 2008-06-03 15:21:21 -07:00
sparc64 sparc64: Prevent stack backtrace false positives on trap frames. 2008-05-21 21:50:01 -07:00
um uml: work around broken host PTRACE_SYSEMU 2008-06-12 18:05:40 -07:00
v850 [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
x86 x86: preallocate and prepopulate separately 2008-07-08 13:11:02 +02:00
xtensa [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig dma: add dma_*map*_attrs() interfaces 2008-04-29 08:06:11 -07:00