diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2015-04-14 18:46:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:02 -0400 |
commit | 982333683385343d8d2db9a1df69c98406f42687 (patch) | |
tree | 2ce273cf325bcad64d032090344778fb0267f59a /arch/x86/xen | |
parent | 6b8ce2a1a464526335672c33cbf3cb9fc638efff (diff) |
x86: expose number of page table levels on Kconfig level
We would want to use number of page table level to define mm_struct.
Let's expose it as CONFIG_PGTABLE_LEVELS.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/mmu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index adca9e2b6553..65083ad63b6f 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -502,7 +502,7 @@ __visible pmd_t xen_make_pmd(pmdval_t pmd) | |||
502 | } | 502 | } |
503 | PV_CALLEE_SAVE_REGS_THUNK(xen_make_pmd); | 503 | PV_CALLEE_SAVE_REGS_THUNK(xen_make_pmd); |
504 | 504 | ||
505 | #if PAGETABLE_LEVELS == 4 | 505 | #if CONFIG_PGTABLE_LEVELS == 4 |
506 | __visible pudval_t xen_pud_val(pud_t pud) | 506 | __visible pudval_t xen_pud_val(pud_t pud) |
507 | { | 507 | { |
508 | return pte_mfn_to_pfn(pud.pud); | 508 | return pte_mfn_to_pfn(pud.pud); |
@@ -589,7 +589,7 @@ static void xen_set_pgd(pgd_t *ptr, pgd_t val) | |||
589 | 589 | ||
590 | xen_mc_issue(PARAVIRT_LAZY_MMU); | 590 | xen_mc_issue(PARAVIRT_LAZY_MMU); |
591 | } | 591 | } |
592 | #endif /* PAGETABLE_LEVELS == 4 */ | 592 | #endif /* CONFIG_PGTABLE_LEVELS == 4 */ |
593 | 593 | ||
594 | /* | 594 | /* |
595 | * (Yet another) pagetable walker. This one is intended for pinning a | 595 | * (Yet another) pagetable walker. This one is intended for pinning a |
@@ -1628,7 +1628,7 @@ static void xen_release_pmd(unsigned long pfn) | |||
1628 | xen_release_ptpage(pfn, PT_PMD); | 1628 | xen_release_ptpage(pfn, PT_PMD); |
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | #if PAGETABLE_LEVELS == 4 | 1631 | #if CONFIG_PGTABLE_LEVELS == 4 |
1632 | static void xen_alloc_pud(struct mm_struct *mm, unsigned long pfn) | 1632 | static void xen_alloc_pud(struct mm_struct *mm, unsigned long pfn) |
1633 | { | 1633 | { |
1634 | xen_alloc_ptpage(mm, pfn, PT_PUD); | 1634 | xen_alloc_ptpage(mm, pfn, PT_PUD); |
@@ -2046,7 +2046,7 @@ static void __init xen_post_allocator_init(void) | |||
2046 | pv_mmu_ops.set_pte = xen_set_pte; | 2046 | pv_mmu_ops.set_pte = xen_set_pte; |
2047 | pv_mmu_ops.set_pmd = xen_set_pmd; | 2047 | pv_mmu_ops.set_pmd = xen_set_pmd; |
2048 | pv_mmu_ops.set_pud = xen_set_pud; | 2048 | pv_mmu_ops.set_pud = xen_set_pud; |
2049 | #if PAGETABLE_LEVELS == 4 | 2049 | #if CONFIG_PGTABLE_LEVELS == 4 |
2050 | pv_mmu_ops.set_pgd = xen_set_pgd; | 2050 | pv_mmu_ops.set_pgd = xen_set_pgd; |
2051 | #endif | 2051 | #endif |
2052 | 2052 | ||
@@ -2056,7 +2056,7 @@ static void __init xen_post_allocator_init(void) | |||
2056 | pv_mmu_ops.alloc_pmd = xen_alloc_pmd; | 2056 | pv_mmu_ops.alloc_pmd = xen_alloc_pmd; |
2057 | pv_mmu_ops.release_pte = xen_release_pte; | 2057 | pv_mmu_ops.release_pte = xen_release_pte; |
2058 | pv_mmu_ops.release_pmd = xen_release_pmd; | 2058 | pv_mmu_ops.release_pmd = xen_release_pmd; |
2059 | #if PAGETABLE_LEVELS == 4 | 2059 | #if CONFIG_PGTABLE_LEVELS == 4 |
2060 | pv_mmu_ops.alloc_pud = xen_alloc_pud; | 2060 | pv_mmu_ops.alloc_pud = xen_alloc_pud; |
2061 | pv_mmu_ops.release_pud = xen_release_pud; | 2061 | pv_mmu_ops.release_pud = xen_release_pud; |
2062 | #endif | 2062 | #endif |
@@ -2122,14 +2122,14 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = { | |||
2122 | .make_pmd = PV_CALLEE_SAVE(xen_make_pmd), | 2122 | .make_pmd = PV_CALLEE_SAVE(xen_make_pmd), |
2123 | .pmd_val = PV_CALLEE_SAVE(xen_pmd_val), | 2123 | .pmd_val = PV_CALLEE_SAVE(xen_pmd_val), |
2124 | 2124 | ||
2125 | #if PAGETABLE_LEVELS == 4 | 2125 | #if CONFIG_PGTABLE_LEVELS == 4 |
2126 | .pud_val = PV_CALLEE_SAVE(xen_pud_val), | 2126 | .pud_val = PV_CALLEE_SAVE(xen_pud_val), |
2127 | .make_pud = PV_CALLEE_SAVE(xen_make_pud), | 2127 | .make_pud = PV_CALLEE_SAVE(xen_make_pud), |
2128 | .set_pgd = xen_set_pgd_hyper, | 2128 | .set_pgd = xen_set_pgd_hyper, |
2129 | 2129 | ||
2130 | .alloc_pud = xen_alloc_pmd_init, | 2130 | .alloc_pud = xen_alloc_pmd_init, |
2131 | .release_pud = xen_release_pmd_init, | 2131 | .release_pud = xen_release_pmd_init, |
2132 | #endif /* PAGETABLE_LEVELS == 4 */ | 2132 | #endif /* CONFIG_PGTABLE_LEVELS == 4 */ |
2133 | 2133 | ||
2134 | .activate_mm = xen_activate_mm, | 2134 | .activate_mm = xen_activate_mm, |
2135 | .dup_mmap = xen_dup_mmap, | 2135 | .dup_mmap = xen_dup_mmap, |