diff options
Diffstat (limited to 'include/asm-x86/page_32.h')
-rw-r--r-- | include/asm-x86/page_32.h | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index e424bef4395a..11c4b39cada1 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -26,18 +26,12 @@ typedef u64 pgdval_t; | |||
26 | typedef u64 pgprotval_t; | 26 | typedef u64 pgprotval_t; |
27 | typedef u64 phys_addr_t; | 27 | typedef u64 phys_addr_t; |
28 | 28 | ||
29 | typedef struct { unsigned long pte_low, pte_high; } pte_t; | 29 | typedef union { |
30 | 30 | struct { | |
31 | static inline unsigned long long native_pte_val(pte_t pte) | 31 | unsigned long pte_low, pte_high; |
32 | { | 32 | }; |
33 | return pte.pte_low | ((unsigned long long)pte.pte_high << 32); | 33 | pteval_t pte; |
34 | } | 34 | } pte_t; |
35 | |||
36 | static inline pte_t native_make_pte(unsigned long long val) | ||
37 | { | ||
38 | return (pte_t) { .pte_low = val, .pte_high = (val >> 32) } ; | ||
39 | } | ||
40 | |||
41 | #endif /* __ASSEMBLY__ | 35 | #endif /* __ASSEMBLY__ |
42 | */ | 36 | */ |
43 | #else /* !CONFIG_X86_PAE */ | 37 | #else /* !CONFIG_X86_PAE */ |
@@ -53,19 +47,9 @@ typedef unsigned long pgdval_t; | |||
53 | typedef unsigned long pgprotval_t; | 47 | typedef unsigned long pgprotval_t; |
54 | typedef unsigned long phys_addr_t; | 48 | typedef unsigned long phys_addr_t; |
55 | 49 | ||
56 | typedef struct { pteval_t pte_low; } pte_t; | 50 | typedef union { pteval_t pte, pte_low; } pte_t; |
57 | typedef pte_t boot_pte_t; | 51 | typedef pte_t boot_pte_t; |
58 | 52 | ||
59 | static inline unsigned long native_pte_val(pte_t pte) | ||
60 | { | ||
61 | return pte.pte_low; | ||
62 | } | ||
63 | |||
64 | static inline pte_t native_make_pte(unsigned long val) | ||
65 | { | ||
66 | return (pte_t) { .pte_low = val }; | ||
67 | } | ||
68 | |||
69 | #endif /* __ASSEMBLY__ */ | 53 | #endif /* __ASSEMBLY__ */ |
70 | #endif /* CONFIG_X86_PAE */ | 54 | #endif /* CONFIG_X86_PAE */ |
71 | 55 | ||