diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-03-17 19:37:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-24 17:57:31 -0400 |
commit | 6944a9c8945212a0cc1de3589736d59ec542c539 (patch) | |
tree | 3234ea6c8690c9b69d91ab9c9bd3adb0beb4e976 /arch/x86/mm | |
parent | 394158559d4c912cc58c311b6346cdea0ed2b1de (diff) |
x86: rename paravirt_alloc_pt etc after the pagetable structure
Rename (alloc|release)_(pt|pd) to pte/pmd to explicitly match the name
of the appropriate pagetable level structure.
[ x86.git merge work by Mark McLoughlin <markmc@redhat.com> ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/init_32.c | 6 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/pgtable.c | 18 |
4 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 9ec62da85fd7..df490905f377 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -71,7 +71,7 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd) | |||
71 | if (!(pgd_val(*pgd) & _PAGE_PRESENT)) { | 71 | if (!(pgd_val(*pgd) & _PAGE_PRESENT)) { |
72 | pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 72 | pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); |
73 | 73 | ||
74 | paravirt_alloc_pd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT); | 74 | paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT); |
75 | set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT)); | 75 | set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT)); |
76 | pud = pud_offset(pgd, 0); | 76 | pud = pud_offset(pgd, 0); |
77 | BUG_ON(pmd_table != pmd_offset(pud, 0)); | 77 | BUG_ON(pmd_table != pmd_offset(pud, 0)); |
@@ -100,7 +100,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd) | |||
100 | (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE); | 100 | (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE); |
101 | } | 101 | } |
102 | 102 | ||
103 | paravirt_alloc_pt(&init_mm, __pa(page_table) >> PAGE_SHIFT); | 103 | paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT); |
104 | set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); | 104 | set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); |
105 | BUG_ON(page_table != pte_offset_kernel(pmd, 0)); | 105 | BUG_ON(page_table != pte_offset_kernel(pmd, 0)); |
106 | } | 106 | } |
@@ -365,7 +365,7 @@ void __init native_pagetable_setup_start(pgd_t *base) | |||
365 | 365 | ||
366 | pte_clear(NULL, va, pte); | 366 | pte_clear(NULL, va, pte); |
367 | } | 367 | } |
368 | paravirt_alloc_pd(&init_mm, __pa(base) >> PAGE_SHIFT); | 368 | paravirt_alloc_pmd(&init_mm, __pa(base) >> PAGE_SHIFT); |
369 | } | 369 | } |
370 | 370 | ||
371 | void __init native_pagetable_setup_done(pgd_t *base) | 371 | void __init native_pagetable_setup_done(pgd_t *base) |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 3a4baf95e24d..36a3f7ded626 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -407,7 +407,7 @@ void __init early_ioremap_clear(void) | |||
407 | 407 | ||
408 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); | 408 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); |
409 | pmd_clear(pmd); | 409 | pmd_clear(pmd); |
410 | paravirt_release_pt(__pa(bm_pte) >> PAGE_SHIFT); | 410 | paravirt_release_pte(__pa(bm_pte) >> PAGE_SHIFT); |
411 | __flush_tlb_all(); | 411 | __flush_tlb_all(); |
412 | } | 412 | } |
413 | 413 | ||
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 938130d49b76..57e762c141f7 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -483,7 +483,7 @@ static int split_large_page(pte_t *kpte, unsigned long address) | |||
483 | goto out_unlock; | 483 | goto out_unlock; |
484 | 484 | ||
485 | pbase = (pte_t *)page_address(base); | 485 | pbase = (pte_t *)page_address(base); |
486 | paravirt_alloc_pt(&init_mm, page_to_pfn(base)); | 486 | paravirt_alloc_pte(&init_mm, page_to_pfn(base)); |
487 | ref_prot = pte_pgprot(pte_clrhuge(*kpte)); | 487 | ref_prot = pte_pgprot(pte_clrhuge(*kpte)); |
488 | 488 | ||
489 | #ifdef CONFIG_X86_64 | 489 | #ifdef CONFIG_X86_64 |
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 0d2866b8f425..1d44d6dd4c9f 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -24,14 +24,14 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
24 | void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | 24 | void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) |
25 | { | 25 | { |
26 | pgtable_page_dtor(pte); | 26 | pgtable_page_dtor(pte); |
27 | paravirt_release_pt(page_to_pfn(pte)); | 27 | paravirt_release_pte(page_to_pfn(pte)); |
28 | tlb_remove_page(tlb, pte); | 28 | tlb_remove_page(tlb, pte); |
29 | } | 29 | } |
30 | 30 | ||
31 | #if PAGETABLE_LEVELS > 2 | 31 | #if PAGETABLE_LEVELS > 2 |
32 | void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | 32 | void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) |
33 | { | 33 | { |
34 | paravirt_release_pd(__pa(pmd) >> PAGE_SHIFT); | 34 | paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); |
35 | tlb_remove_page(tlb, virt_to_page(pmd)); | 35 | tlb_remove_page(tlb, virt_to_page(pmd)); |
36 | } | 36 | } |
37 | 37 | ||
@@ -122,10 +122,10 @@ static void pgd_ctor(void *p) | |||
122 | clone_pgd_range(pgd + USER_PTRS_PER_PGD, | 122 | clone_pgd_range(pgd + USER_PTRS_PER_PGD, |
123 | swapper_pg_dir + USER_PTRS_PER_PGD, | 123 | swapper_pg_dir + USER_PTRS_PER_PGD, |
124 | KERNEL_PGD_PTRS); | 124 | KERNEL_PGD_PTRS); |
125 | paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT, | 125 | paravirt_alloc_pmd_clone(__pa(pgd) >> PAGE_SHIFT, |
126 | __pa(swapper_pg_dir) >> PAGE_SHIFT, | 126 | __pa(swapper_pg_dir) >> PAGE_SHIFT, |
127 | USER_PTRS_PER_PGD, | 127 | USER_PTRS_PER_PGD, |
128 | KERNEL_PGD_PTRS); | 128 | KERNEL_PGD_PTRS); |
129 | } | 129 | } |
130 | 130 | ||
131 | /* list required to sync kernel mapping updates */ | 131 | /* list required to sync kernel mapping updates */ |
@@ -166,7 +166,7 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp) | |||
166 | 166 | ||
167 | pgdp[i] = native_make_pgd(0); | 167 | pgdp[i] = native_make_pgd(0); |
168 | 168 | ||
169 | paravirt_release_pd(pgd_val(pgd) >> PAGE_SHIFT); | 169 | paravirt_release_pmd(pgd_val(pgd) >> PAGE_SHIFT); |
170 | pmd_free(mm, pmd); | 170 | pmd_free(mm, pmd); |
171 | } | 171 | } |
172 | } | 172 | } |
@@ -211,7 +211,7 @@ static int pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd) | |||
211 | 211 | ||
212 | void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) | 212 | void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) |
213 | { | 213 | { |
214 | paravirt_alloc_pd(mm, __pa(pmd) >> PAGE_SHIFT); | 214 | paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT); |
215 | 215 | ||
216 | /* Note: almost everything apart from _PAGE_PRESENT is | 216 | /* Note: almost everything apart from _PAGE_PRESENT is |
217 | reserved at the pmd (PDPT) level. */ | 217 | reserved at the pmd (PDPT) level. */ |
@@ -242,7 +242,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
242 | { | 242 | { |
243 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); | 243 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); |
244 | 244 | ||
245 | /* so that alloc_pd can use it */ | 245 | /* so that alloc_pmd can use it */ |
246 | mm->pgd = pgd; | 246 | mm->pgd = pgd; |
247 | if (pgd) | 247 | if (pgd) |
248 | pgd_ctor(pgd); | 248 | pgd_ctor(pgd); |