aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/page_types.h10
-rw-r--r--arch/x86/include/asm/pgtable.h7
2 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h
index c41e3e8f2271..0733853e7c87 100644
--- a/arch/x86/include/asm/page_types.h
+++ b/arch/x86/include/asm/page_types.h
@@ -90,11 +90,6 @@ static inline pudval_t native_pud_val(pud_t pud)
90#if PAGETABLE_LEVELS > 2 90#if PAGETABLE_LEVELS > 2
91typedef struct { pmdval_t pmd; } pmd_t; 91typedef struct { pmdval_t pmd; } pmd_t;
92 92
93static inline pudval_t pud_flags(pud_t pud)
94{
95 return native_pud_val(pud) & PTE_FLAGS_MASK;
96}
97
98static inline pmd_t native_make_pmd(pmdval_t val) 93static inline pmd_t native_make_pmd(pmdval_t val)
99{ 94{
100 return (pmd_t) { val }; 95 return (pmd_t) { val };
@@ -113,6 +108,11 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
113} 108}
114#endif 109#endif
115 110
111static inline pudval_t pud_flags(pud_t pud)
112{
113 return native_pud_val(pud) & PTE_FLAGS_MASK;
114}
115
116static inline pmdval_t pmd_flags(pmd_t pmd) 116static inline pmdval_t pmd_flags(pmd_t pmd)
117{ 117{
118 return native_pmd_val(pmd) & PTE_FLAGS_MASK; 118 return native_pmd_val(pmd) & PTE_FLAGS_MASK;
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 10404e7bf32d..9f5085097977 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -398,7 +398,7 @@ static inline unsigned long pmd_pfn(pmd_t pmd)
398 398
399static inline int pud_large(pud_t pud) 399static inline int pud_large(pud_t pud)
400{ 400{
401 return (pud_flags(pud) & (_PAGE_PSE | _PAGE_PRESENT)) == 401 return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
402 (_PAGE_PSE | _PAGE_PRESENT); 402 (_PAGE_PSE | _PAGE_PRESENT);
403} 403}
404 404
@@ -406,6 +406,11 @@ static inline int pud_bad(pud_t pud)
406{ 406{
407 return (pud_flags(pud) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0; 407 return (pud_flags(pud) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0;
408} 408}
409#else
410static inline int pud_large(pud_t pud)
411{
412 return 0;
413}
409#endif /* PAGETABLE_LEVELS > 2 */ 414#endif /* PAGETABLE_LEVELS > 2 */
410 415
411#if PAGETABLE_LEVELS > 3 416#if PAGETABLE_LEVELS > 3