aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgtable_64.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-01-30 07:32:57 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:57 -0500
commitc8e5393ab38564d2f45b560a2f95bc8f9ff6f823 (patch)
tree2976d59bb412786712bddec0eedf82e1db58401d /include/asm-x86/pgtable_64.h
parentb7fff536d0ad45c4810f9b99845c707ceadc3afc (diff)
x86: page.h: make pte_t a union to always include
Make sure pte_t, whatever its definition, has a pte element with type pteval_t. This allows common code to access it without needing to be specifically parameterised on what pagetable mode we're compiling for. For 32-bit, this means that pte_t becomes a union with "pte" and "{ pte_low, pte_high }" (PAE) or just "pte_low" (non-PAE). Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/pgtable_64.h')
-rw-r--r--include/asm-x86/pgtable_64.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index 57e4ebe0f7fc..77038d8e9bfd 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -72,7 +72,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)];
72 72
73static inline void set_pte(pte_t *dst, pte_t val) 73static inline void set_pte(pte_t *dst, pte_t val)
74{ 74{
75 pte_val(*dst) = pte_val(val); 75 *dst = val;
76} 76}
77#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 77#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
78 78
@@ -222,7 +222,7 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
222#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT) 222#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT)
223 223
224#define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) 224#define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
225#define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE }) 225#define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | _PAGE_FILE })
226#define PTE_FILE_MAX_BITS __PHYSICAL_MASK_SHIFT 226#define PTE_FILE_MAX_BITS __PHYSICAL_MASK_SHIFT
227 227
228/* PTE - Level 1 access. */ 228/* PTE - Level 1 access. */
@@ -264,7 +264,7 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
264#define __swp_offset(x) ((x).val >> 8) 264#define __swp_offset(x) ((x).val >> 8)
265#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) 265#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
266#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 266#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
267#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 267#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
268 268
269extern spinlock_t pgd_lock; 269extern spinlock_t pgd_lock;
270extern struct list_head pgd_list; 270extern struct list_head pgd_list;