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>
This commit is contained in:

committed by
Linus Torvalds

parent
6b8ce2a1a4
commit
9823336833
@@ -545,7 +545,7 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmd)
|
||||
PVOP_VCALL2(pv_mmu_ops.set_pmd, pmdp, val);
|
||||
}
|
||||
|
||||
#if PAGETABLE_LEVELS >= 3
|
||||
#if CONFIG_PGTABLE_LEVELS >= 3
|
||||
static inline pmd_t __pmd(pmdval_t val)
|
||||
{
|
||||
pmdval_t ret;
|
||||
@@ -585,7 +585,7 @@ static inline void set_pud(pud_t *pudp, pud_t pud)
|
||||
PVOP_VCALL2(pv_mmu_ops.set_pud, pudp,
|
||||
val);
|
||||
}
|
||||
#if PAGETABLE_LEVELS == 4
|
||||
#if CONFIG_PGTABLE_LEVELS == 4
|
||||
static inline pud_t __pud(pudval_t val)
|
||||
{
|
||||
pudval_t ret;
|
||||
@@ -636,9 +636,9 @@ static inline void pud_clear(pud_t *pudp)
|
||||
set_pud(pudp, __pud(0));
|
||||
}
|
||||
|
||||
#endif /* PAGETABLE_LEVELS == 4 */
|
||||
#endif /* CONFIG_PGTABLE_LEVELS == 4 */
|
||||
|
||||
#endif /* PAGETABLE_LEVELS >= 3 */
|
||||
#endif /* CONFIG_PGTABLE_LEVELS >= 3 */
|
||||
|
||||
#ifdef CONFIG_X86_PAE
|
||||
/* Special-case pte-setting operations for PAE, which can't update a
|
||||
|
Reference in New Issue
Block a user