aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/paravirt.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-01-30 07:33:15 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:15 -0500
commit5b8dd1e95b5f2b7b80cfc7e6bb709603aef8bbc1 (patch)
tree68f00efe9ddb977c597f479549e9f488d390325c /include/asm-x86/paravirt.h
parent2f98b2faac1b5fec327edbde945cdf7f7a53f351 (diff)
x86/paravirt: rearrange common mmu_ops
Rearrange the various pagetable mmu_ops to remove duplication. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r--include/asm-x86/paravirt.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 4aa06b929e48..c38cf1ac4e48 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -230,28 +230,32 @@ struct pv_mmu_ops {
230 void (*pte_update_defer)(struct mm_struct *mm, 230 void (*pte_update_defer)(struct mm_struct *mm,
231 unsigned long addr, pte_t *ptep); 231 unsigned long addr, pte_t *ptep);
232 232
233 pteval_t (*pte_val)(pte_t);
234 pte_t (*make_pte)(pteval_t pte);
235
236 pgdval_t (*pgd_val)(pgd_t);
237 pgd_t (*make_pgd)(pgdval_t pgd);
238
239#if PAGETABLE_LEVELS >= 3
233#ifdef CONFIG_X86_PAE 240#ifdef CONFIG_X86_PAE
234 void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); 241 void (*set_pte_atomic)(pte_t *ptep, pte_t pteval);
235 void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, 242 void (*set_pte_present)(struct mm_struct *mm, unsigned long addr,
236 pte_t *ptep, pte_t pte); 243 pte_t *ptep, pte_t pte);
237 void (*set_pud)(pud_t *pudp, pud_t pudval);
238 void (*pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); 244 void (*pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
239 void (*pmd_clear)(pmd_t *pmdp); 245 void (*pmd_clear)(pmd_t *pmdp);
240 246
241 unsigned long long (*pte_val)(pte_t); 247#endif /* CONFIG_X86_PAE */
242 unsigned long long (*pmd_val)(pmd_t); 248
243 unsigned long long (*pgd_val)(pgd_t); 249 void (*set_pud)(pud_t *pudp, pud_t pudval);
244 250
245 pte_t (*make_pte)(unsigned long long pte); 251 pmdval_t (*pmd_val)(pmd_t);
246 pmd_t (*make_pmd)(unsigned long long pmd); 252 pmd_t (*make_pmd)(pmdval_t pmd);
247 pgd_t (*make_pgd)(unsigned long long pgd);
248#else
249 unsigned long (*pte_val)(pte_t);
250 unsigned long (*pgd_val)(pgd_t);
251 253
252 pte_t (*make_pte)(unsigned long pte); 254#if PAGETABLE_LEVELS == 4
253 pgd_t (*make_pgd)(unsigned long pgd); 255 pudval_t (*pud_val)(pud_t);
254#endif 256 pud_t (*make_pud)(pudval_t pud);
257#endif /* PAGETABLE_LEVELS == 4 */
258#endif /* PAGETABLE_LEVELS >= 3 */
255 259
256#ifdef CONFIG_HIGHPTE 260#ifdef CONFIG_HIGHPTE
257 void *(*kmap_atomic_pte)(struct page *page, enum km_type type); 261 void *(*kmap_atomic_pte)(struct page *page, enum km_type type);