diff options
-rw-r--r-- | arch/i386/mm/init.c | 2 | ||||
-rw-r--r-- | arch/i386/mm/pageattr.c | 5 | ||||
-rw-r--r-- | include/asm-i386/pgtable-3level.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index d8b23ab76533..9edfc058b894 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -349,7 +349,7 @@ static void __init pagetable_init (void) | |||
349 | * All user-space mappings are explicitly cleared after | 349 | * All user-space mappings are explicitly cleared after |
350 | * SMP startup. | 350 | * SMP startup. |
351 | */ | 351 | */ |
352 | pgd_base[0] = pgd_base[USER_PTRS_PER_PGD]; | 352 | set_pgd(&pgd_base[0], pgd_base[USER_PTRS_PER_PGD]); |
353 | #endif | 353 | #endif |
354 | } | 354 | } |
355 | 355 | ||
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index bce06a79eafa..f600fc244f02 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/tlbflush.h> | 14 | #include <asm/tlbflush.h> |
15 | #include <asm/pgalloc.h> | ||
15 | 16 | ||
16 | static DEFINE_SPINLOCK(cpa_lock); | 17 | static DEFINE_SPINLOCK(cpa_lock); |
17 | static struct list_head df_list = LIST_HEAD_INIT(df_list); | 18 | static struct list_head df_list = LIST_HEAD_INIT(df_list); |
@@ -52,8 +53,8 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot) | |||
52 | addr = address & LARGE_PAGE_MASK; | 53 | addr = address & LARGE_PAGE_MASK; |
53 | pbase = (pte_t *)page_address(base); | 54 | pbase = (pte_t *)page_address(base); |
54 | for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { | 55 | for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { |
55 | pbase[i] = pfn_pte(addr >> PAGE_SHIFT, | 56 | set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, |
56 | addr == address ? prot : PAGE_KERNEL); | 57 | addr == address ? prot : PAGE_KERNEL)); |
57 | } | 58 | } |
58 | return base; | 59 | return base; |
59 | } | 60 | } |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index d609f9c2c1f0..2e3f4a344a2d 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -64,7 +64,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
64 | #define set_pmd(pmdptr,pmdval) \ | 64 | #define set_pmd(pmdptr,pmdval) \ |
65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) | 65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) |
66 | #define set_pud(pudptr,pudval) \ | 66 | #define set_pud(pudptr,pudval) \ |
67 | set_64bit((unsigned long long *)(pudptr),pud_val(pudval)) | 67 | (*(pudptr) = (pudval)) |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush | 70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush |