diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-01-30 13:32:57 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:32:57 +0100 |
commit | c8e5393ab38564d2f45b560a2f95bc8f9ff6f823 (patch) | |
tree | 2976d59bb412786712bddec0eedf82e1db58401d /include/asm-x86/pgtable-3level.h | |
parent | b7fff536d0ad45c4810f9b99845c707ceadc3afc (diff) | |
download | blackbird-op-linux-c8e5393ab38564d2f45b560a2f95bc8f9ff6f823.tar.gz blackbird-op-linux-c8e5393ab38564d2f45b560a2f95bc8f9ff6f823.zip |
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-3level.h')
-rw-r--r-- | include/asm-x86/pgtable-3level.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 61a7d0029f60..3da96f792dd0 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h @@ -163,7 +163,7 @@ static inline unsigned long pte_pfn(pte_t pte) * put the 32 bits of offset into the high part. */ #define pte_to_pgoff(pte) ((pte).pte_high) -#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) }) +#define pgoff_to_pte(off) ((pte_t) { { .pte_low = _PAGE_FILE, .pte_high = (off) } }) #define PTE_FILE_MAX_BITS 32 /* Encode and de-code a swap entry */ @@ -171,7 +171,7 @@ static inline unsigned long pte_pfn(pte_t pte) #define __swp_offset(x) ((x).val >> 5) #define __swp_entry(type, offset) ((swp_entry_t){(type) | (offset) << 5}) #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) -#define __swp_entry_to_pte(x) ((pte_t){ 0, (x).val }) +#define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } }) #define __pmd_free_tlb(tlb, x) do { } while (0) |