diff options
-rw-r--r-- | arch/x86/mm/pageattr.c | 13 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 510ff4091667..a270f9ccebfb 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * Copyright 2002 Andi Kleen, SuSE Labs. | 2 | * Copyright 2002 Andi Kleen, SuSE Labs. |
3 | * Thanks to Ben LaHaise for precious feedback. | 3 | * Thanks to Ben LaHaise for precious feedback. |
4 | */ | 4 | */ |
5 | |||
6 | #include <linux/highmem.h> | 5 | #include <linux/highmem.h> |
7 | #include <linux/module.h> | 6 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
@@ -50,9 +49,7 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) | |||
50 | /* change init_mm */ | 49 | /* change init_mm */ |
51 | set_pte_atomic(kpte, pte); | 50 | set_pte_atomic(kpte, pte); |
52 | #ifdef CONFIG_X86_32 | 51 | #ifdef CONFIG_X86_32 |
53 | if (SHARED_KERNEL_PMD) | 52 | if (!SHARED_KERNEL_PMD) { |
54 | return; | ||
55 | { | ||
56 | struct page *page; | 53 | struct page *page; |
57 | 54 | ||
58 | for (page = pgd_list; page; page = (struct page *)page->index) { | 55 | for (page = pgd_list; page; page = (struct page *)page->index) { |
@@ -277,14 +274,14 @@ void kernel_map_pages(struct page *page, int numpages, int enable) | |||
277 | return; | 274 | return; |
278 | 275 | ||
279 | /* | 276 | /* |
280 | * the return value is ignored - the calls cannot fail, | 277 | * The return value is ignored - the calls cannot fail, |
281 | * large pages are disabled at boot time. | 278 | * large pages are disabled at boot time: |
282 | */ | 279 | */ |
283 | change_page_attr(page, numpages, enable ? PAGE_KERNEL : __pgprot(0)); | 280 | change_page_attr(page, numpages, enable ? PAGE_KERNEL : __pgprot(0)); |
284 | 281 | ||
285 | /* | 282 | /* |
286 | * we should perform an IPI and flush all tlbs, | 283 | * We should perform an IPI and flush all tlbs, |
287 | * but that can deadlock->flush only current cpu. | 284 | * but that can deadlock->flush only current cpu: |
288 | */ | 285 | */ |
289 | __flush_tlb_all(); | 286 | __flush_tlb_all(); |
290 | } | 287 | } |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 223b0032bab5..faa6a96c2a5c 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -25,6 +25,8 @@ extern void clear_kernel_mapping(unsigned long addr, unsigned long size); | |||
25 | 25 | ||
26 | #endif /* !__ASSEMBLY__ */ | 26 | #endif /* !__ASSEMBLY__ */ |
27 | 27 | ||
28 | #define SHARED_KERNEL_PMD 1 | ||
29 | |||
28 | /* | 30 | /* |
29 | * PGDIR_SHIFT determines what a top-level page table entry can map | 31 | * PGDIR_SHIFT determines what a top-level page table entry can map |
30 | */ | 32 | */ |