Commit c47c1b1f authored by Ingo Molnar's avatar Ingo Molnar

x86, pgtable.h: fix 2-level 32-bit build

- pmd_flags() needs to be available on 2-levels too
- provide pud_large() wrapper as well
- include page.h - it provides basic types relied on by pgtable.h
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e5f7f202
...@@ -139,10 +139,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd) ...@@ -139,10 +139,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
return pmd.pmd; return pmd.pmd;
} }
static inline pmdval_t pmd_flags(pmd_t pmd)
{
return native_pmd_val(pmd) & PTE_FLAGS_MASK;
}
#else /* PAGETABLE_LEVELS == 2 */ #else /* PAGETABLE_LEVELS == 2 */
#include <asm-generic/pgtable-nopmd.h> #include <asm-generic/pgtable-nopmd.h>
...@@ -152,6 +148,11 @@ static inline pmdval_t native_pmd_val(pmd_t pmd) ...@@ -152,6 +148,11 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
} }
#endif /* PAGETABLE_LEVELS >= 3 */ #endif /* PAGETABLE_LEVELS >= 3 */
static inline pmdval_t pmd_flags(pmd_t pmd)
{
return native_pmd_val(pmd) & PTE_FLAGS_MASK;
}
static inline pte_t native_make_pte(pteval_t val) static inline pte_t native_make_pte(pteval_t val)
{ {
return (pte_t) { .pte = val }; return (pte_t) { .pte = val };
......
#ifndef _ASM_X86_PGTABLE_H #ifndef _ASM_X86_PGTABLE_H
#define _ASM_X86_PGTABLE_H #define _ASM_X86_PGTABLE_H
#include <asm/page.h>
#define FIRST_USER_ADDRESS 0 #define FIRST_USER_ADDRESS 0
#define _PAGE_BIT_PRESENT 0 /* is present */ #define _PAGE_BIT_PRESENT 0 /* is present */
...@@ -528,6 +530,13 @@ static inline unsigned long pages_to_mb(unsigned long npg) ...@@ -528,6 +530,13 @@ static inline unsigned long pages_to_mb(unsigned long npg)
#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
remap_pfn_range(vma, vaddr, pfn, size, prot) remap_pfn_range(vma, vaddr, pfn, size, prot)
#if PAGETABLE_LEVELS == 2
static inline int pud_large(pud_t pud)
{
return 0;
}
#endif
#if PAGETABLE_LEVELS > 2 #if PAGETABLE_LEVELS > 2
static inline int pud_none(pud_t pud) static inline int pud_none(pud_t pud)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment