aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-09 05:57:45 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 05:57:45 -0500
commitc47c1b1f3a9d6973108020df1dcab7604f7774dd (patch)
tree4061a58204eb7c5c86a13fb3cb397f7dbf4d9d60
parente5f7f202f31fd05e9de7e1ba5a7b30de7855f5aa (diff)
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: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/include/asm/page.h9
-rw-r--r--arch/x86/include/asm/pgtable.h9
2 files changed, 14 insertions, 4 deletions
diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h
index 0b16b64a8fe7..823cc931363f 100644
--- a/arch/x86/include/asm/page.h
+++ b/arch/x86/include/asm/page.h
@@ -139,10 +139,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
139 return pmd.pmd; 139 return pmd.pmd;
140} 140}
141 141
142static inline pmdval_t pmd_flags(pmd_t pmd)
143{
144 return native_pmd_val(pmd) & PTE_FLAGS_MASK;
145}
146#else /* PAGETABLE_LEVELS == 2 */ 142#else /* PAGETABLE_LEVELS == 2 */
147#include <asm-generic/pgtable-nopmd.h> 143#include <asm-generic/pgtable-nopmd.h>
148 144
@@ -152,6 +148,11 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
152} 148}
153#endif /* PAGETABLE_LEVELS >= 3 */ 149#endif /* PAGETABLE_LEVELS >= 3 */
154 150
151static inline pmdval_t pmd_flags(pmd_t pmd)
152{
153 return native_pmd_val(pmd) & PTE_FLAGS_MASK;
154}
155
155static inline pte_t native_make_pte(pteval_t val) 156static inline pte_t native_make_pte(pteval_t val)
156{ 157{
157 return (pte_t) { .pte = val }; 158 return (pte_t) { .pte = val };
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 76696e98f5b3..178205305ac0 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_X86_PGTABLE_H 1#ifndef _ASM_X86_PGTABLE_H
2#define _ASM_X86_PGTABLE_H 2#define _ASM_X86_PGTABLE_H
3 3
4#include <asm/page.h>
5
4#define FIRST_USER_ADDRESS 0 6#define FIRST_USER_ADDRESS 0
5 7
6#define _PAGE_BIT_PRESENT 0 /* is present */ 8#define _PAGE_BIT_PRESENT 0 /* is present */
@@ -528,6 +530,13 @@ static inline unsigned long pages_to_mb(unsigned long npg)
528#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ 530#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
529 remap_pfn_range(vma, vaddr, pfn, size, prot) 531 remap_pfn_range(vma, vaddr, pfn, size, prot)
530 532
533#if PAGETABLE_LEVELS == 2
534static inline int pud_large(pud_t pud)
535{
536 return 0;
537}
538#endif
539
531#if PAGETABLE_LEVELS > 2 540#if PAGETABLE_LEVELS > 2
532static inline int pud_none(pud_t pud) 541static inline int pud_none(pud_t pud)
533{ 542{