diff options
-rw-r--r-- | arch/i386/kernel/vmi.c | 2 | ||||
-rw-r--r-- | arch/i386/mm/init.c | 2 | ||||
-rw-r--r-- | arch/i386/mm/pageattr.c | 2 | ||||
-rw-r--r-- | include/asm-i386/paravirt.h | 6 | ||||
-rw-r--r-- | include/asm-i386/pgalloc.h | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c index c12720d7cbc5..234bd6ff518d 100644 --- a/arch/i386/kernel/vmi.c +++ b/arch/i386/kernel/vmi.c | |||
@@ -362,7 +362,7 @@ static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type) | |||
362 | } | 362 | } |
363 | #endif | 363 | #endif |
364 | 364 | ||
365 | static void vmi_allocate_pt(u32 pfn) | 365 | static void vmi_allocate_pt(struct mm_struct *mm, u32 pfn) |
366 | { | 366 | { |
367 | vmi_set_page_type(pfn, VMI_PAGE_L1); | 367 | vmi_set_page_type(pfn, VMI_PAGE_L1); |
368 | vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0); | 368 | vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0); |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 7135946d3663..f9b6a8878547 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -87,7 +87,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd) | |||
87 | if (!(pmd_val(*pmd) & _PAGE_PRESENT)) { | 87 | if (!(pmd_val(*pmd) & _PAGE_PRESENT)) { |
88 | pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 88 | pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); |
89 | 89 | ||
90 | paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT); | 90 | paravirt_alloc_pt(&init_mm, __pa(page_table) >> PAGE_SHIFT); |
91 | set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); | 91 | set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); |
92 | BUG_ON(page_table != pte_offset_kernel(pmd, 0)); | 92 | BUG_ON(page_table != pte_offset_kernel(pmd, 0)); |
93 | } | 93 | } |
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index 2eb14a73be9c..37992ffb1633 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
@@ -60,7 +60,7 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot, | |||
60 | address = __pa(address); | 60 | address = __pa(address); |
61 | addr = address & LARGE_PAGE_MASK; | 61 | addr = address & LARGE_PAGE_MASK; |
62 | pbase = (pte_t *)page_address(base); | 62 | pbase = (pte_t *)page_address(base); |
63 | paravirt_alloc_pt(page_to_pfn(base)); | 63 | paravirt_alloc_pt(&init_mm, page_to_pfn(base)); |
64 | for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { | 64 | for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { |
65 | set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, | 65 | set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, |
66 | addr == address ? prot : ref_prot)); | 66 | addr == address ? prot : ref_prot)); |
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 7f846a7d6bcc..99bf661a65f2 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -173,7 +173,7 @@ struct paravirt_ops | |||
173 | unsigned long va); | 173 | unsigned long va); |
174 | 174 | ||
175 | /* Hooks for allocating/releasing pagetable pages */ | 175 | /* Hooks for allocating/releasing pagetable pages */ |
176 | void (*alloc_pt)(u32 pfn); | 176 | void (*alloc_pt)(struct mm_struct *mm, u32 pfn); |
177 | void (*alloc_pd)(u32 pfn); | 177 | void (*alloc_pd)(u32 pfn); |
178 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); | 178 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); |
179 | void (*release_pt)(u32 pfn); | 179 | void (*release_pt)(u32 pfn); |
@@ -725,9 +725,9 @@ static inline void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, | |||
725 | PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va); | 725 | PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va); |
726 | } | 726 | } |
727 | 727 | ||
728 | static inline void paravirt_alloc_pt(unsigned pfn) | 728 | static inline void paravirt_alloc_pt(struct mm_struct *mm, unsigned pfn) |
729 | { | 729 | { |
730 | PVOP_VCALL1(alloc_pt, pfn); | 730 | PVOP_VCALL2(alloc_pt, mm, pfn); |
731 | } | 731 | } |
732 | static inline void paravirt_release_pt(unsigned pfn) | 732 | static inline void paravirt_release_pt(unsigned pfn) |
733 | { | 733 | { |
diff --git a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h index d07b7afc2692..f2fc33ceb9f2 100644 --- a/include/asm-i386/pgalloc.h +++ b/include/asm-i386/pgalloc.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #ifdef CONFIG_PARAVIRT | 7 | #ifdef CONFIG_PARAVIRT |
8 | #include <asm/paravirt.h> | 8 | #include <asm/paravirt.h> |
9 | #else | 9 | #else |
10 | #define paravirt_alloc_pt(pfn) do { } while (0) | 10 | #define paravirt_alloc_pt(mm, pfn) do { } while (0) |
11 | #define paravirt_alloc_pd(pfn) do { } while (0) | 11 | #define paravirt_alloc_pd(pfn) do { } while (0) |
12 | #define paravirt_alloc_pd(pfn) do { } while (0) | 12 | #define paravirt_alloc_pd(pfn) do { } while (0) |
13 | #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) do { } while (0) | 13 | #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) do { } while (0) |
@@ -17,13 +17,13 @@ | |||
17 | 17 | ||
18 | #define pmd_populate_kernel(mm, pmd, pte) \ | 18 | #define pmd_populate_kernel(mm, pmd, pte) \ |
19 | do { \ | 19 | do { \ |
20 | paravirt_alloc_pt(__pa(pte) >> PAGE_SHIFT); \ | 20 | paravirt_alloc_pt(mm, __pa(pte) >> PAGE_SHIFT); \ |
21 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))); \ | 21 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))); \ |
22 | } while (0) | 22 | } while (0) |
23 | 23 | ||
24 | #define pmd_populate(mm, pmd, pte) \ | 24 | #define pmd_populate(mm, pmd, pte) \ |
25 | do { \ | 25 | do { \ |
26 | paravirt_alloc_pt(page_to_pfn(pte)); \ | 26 | paravirt_alloc_pt(mm, page_to_pfn(pte)); \ |
27 | set_pmd(pmd, __pmd(_PAGE_TABLE + \ | 27 | set_pmd(pmd, __pmd(_PAGE_TABLE + \ |
28 | ((unsigned long long)page_to_pfn(pte) << \ | 28 | ((unsigned long long)page_to_pfn(pte) << \ |
29 | (unsigned long long) PAGE_SHIFT))); \ | 29 | (unsigned long long) PAGE_SHIFT))); \ |