diff options
-rw-r--r-- | arch/x86/mm/init_64.c | 43 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 1 |
2 files changed, 0 insertions, 44 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index b7a7992c28b6..5855449ce7aa 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -435,49 +435,6 @@ void __init paging_init(void) | |||
435 | #endif | 435 | #endif |
436 | 436 | ||
437 | /* | 437 | /* |
438 | * Unmap a kernel mapping if it exists. This is useful to avoid | ||
439 | * prefetches from the CPU leading to inconsistent cache lines. | ||
440 | * address and size must be aligned to 2MB boundaries. | ||
441 | * Does nothing when the mapping doesn't exist. | ||
442 | */ | ||
443 | void __init clear_kernel_mapping(unsigned long address, unsigned long size) | ||
444 | { | ||
445 | unsigned long end = address + size; | ||
446 | |||
447 | BUG_ON(address & ~PMD_PAGE_MASK); | ||
448 | BUG_ON(size & ~PMD_PAGE_MASK); | ||
449 | |||
450 | for (; address < end; address += PMD_PAGE_SIZE) { | ||
451 | pgd_t *pgd = pgd_offset_k(address); | ||
452 | pud_t *pud; | ||
453 | pmd_t *pmd; | ||
454 | |||
455 | if (pgd_none(*pgd)) | ||
456 | continue; | ||
457 | |||
458 | pud = pud_offset(pgd, address); | ||
459 | if (pud_none(*pud)) | ||
460 | continue; | ||
461 | |||
462 | pmd = pmd_offset(pud, address); | ||
463 | if (!pmd || pmd_none(*pmd)) | ||
464 | continue; | ||
465 | |||
466 | if (!(pmd_val(*pmd) & _PAGE_PSE)) { | ||
467 | /* | ||
468 | * Could handle this, but it should not happen | ||
469 | * currently: | ||
470 | */ | ||
471 | printk(KERN_ERR "clear_kernel_mapping: " | ||
472 | "mapping has been split. will leak memory\n"); | ||
473 | pmd_ERROR(*pmd); | ||
474 | } | ||
475 | set_pmd(pmd, __pmd(0)); | ||
476 | } | ||
477 | __flush_tlb_all(); | ||
478 | } | ||
479 | |||
480 | /* | ||
481 | * Memory hotplug specific functions | 438 | * Memory hotplug specific functions |
482 | */ | 439 | */ |
483 | void online_page(struct page *page) | 440 | void online_page(struct page *page) |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 6e615a103c2f..5c86cff3ee79 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -21,7 +21,6 @@ extern pgd_t init_level4_pgt[]; | |||
21 | #define swapper_pg_dir init_level4_pgt | 21 | #define swapper_pg_dir init_level4_pgt |
22 | 22 | ||
23 | extern void paging_init(void); | 23 | extern void paging_init(void); |
24 | extern void clear_kernel_mapping(unsigned long addr, unsigned long size); | ||
25 | 24 | ||
26 | #endif /* !__ASSEMBLY__ */ | 25 | #endif /* !__ASSEMBLY__ */ |
27 | 26 | ||