diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-08-31 14:39:09 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-09-27 08:37:39 -0400 |
commit | d34555fb20e7abf33f86d7aa3ec0826343f38256 (patch) | |
tree | 975a282d62f8e23648cfd23f5fa8ac7f8893b5d1 /include/asm-mips | |
parent | 65316fd13ad9d82560edbad0a940d684380f7461 (diff) |
[MIPS] Do not lose upper 32-bit on MIPS32 with 64-bit addresses in __pte().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/page.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index c3b872b047d7..85b258ee7090 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -77,15 +77,17 @@ static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, | |||
77 | #ifdef CONFIG_CPU_MIPS32 | 77 | #ifdef CONFIG_CPU_MIPS32 |
78 | typedef struct { unsigned long pte_low, pte_high; } pte_t; | 78 | typedef struct { unsigned long pte_low, pte_high; } pte_t; |
79 | #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) | 79 | #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) |
80 | #define __pte(x) ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; }) | ||
80 | #else | 81 | #else |
81 | typedef struct { unsigned long long pte; } pte_t; | 82 | typedef struct { unsigned long long pte; } pte_t; |
82 | #define pte_val(x) ((x).pte) | 83 | #define pte_val(x) ((x).pte) |
84 | #define __pte(x) ((pte_t) { (x) } ) | ||
83 | #endif | 85 | #endif |
84 | #else | 86 | #else |
85 | typedef struct { unsigned long pte; } pte_t; | 87 | typedef struct { unsigned long pte; } pte_t; |
86 | #define pte_val(x) ((x).pte) | 88 | #define pte_val(x) ((x).pte) |
87 | #endif | ||
88 | #define __pte(x) ((pte_t) { (x) } ) | 89 | #define __pte(x) ((pte_t) { (x) } ) |
90 | #endif | ||
89 | 91 | ||
90 | /* | 92 | /* |
91 | * For 3-level pagetables we defines these ourselves, for 2-level the | 93 | * For 3-level pagetables we defines these ourselves, for 2-level the |