diff options
author | Haicheng Li <haicheng.li@linux.intel.com> | 2010-05-19 11:42:14 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-08-26 23:02:29 +0200 |
commit | 6afb5157b9eba4092e2f0f54d24a3806409bdde5 (patch) | |
tree | 5d213ef0366441af288b3a293557df09cb45cdca /arch/x86/mm/fault.c | |
parent | x86, mm: Avoid unnecessary TLB flush (diff) | |
download | linux-6afb5157b9eba4092e2f0f54d24a3806409bdde5.tar.xz linux-6afb5157b9eba4092e2f0f54d24a3806409bdde5.zip |
x86, mm: Separate x86_64 vmalloc_sync_all() into separate functions
No behavior change.
Move some of vmalloc_sync_all() code into a new function
sync_global_pgds() that will be useful for memory hotplug.
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
LKML-Reference: <4C6E4ECD.1090607@linux.intel.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 4c4508e8a204..51f7ee71d6c7 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -326,29 +326,7 @@ out: void vmalloc_sync_all(void) { - unsigned long address; - - for (address = VMALLOC_START & PGDIR_MASK; address <= VMALLOC_END; - address += PGDIR_SIZE) { - - const pgd_t *pgd_ref = pgd_offset_k(address); - unsigned long flags; - struct page *page; - - if (pgd_none(*pgd_ref)) - continue; - - spin_lock_irqsave(&pgd_lock, flags); - list_for_each_entry(page, &pgd_list, lru) { - pgd_t *pgd; - pgd = (pgd_t *)page_address(page) + pgd_index(address); - if (pgd_none(*pgd)) - set_pgd(pgd, *pgd_ref); - else - BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); - } - spin_unlock_irqrestore(&pgd_lock, flags); - } + sync_global_pgds(VMALLOC_START & PGDIR_MASK, VMALLOC_END); } /* |