提交 d34555fb 编写于 作者: R Ralf Baechle

[MIPS] Do not lose upper 32-bit on MIPS32 with 64-bit addresses in __pte().

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 65316fd1
......@@ -77,15 +77,17 @@ static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
#ifdef CONFIG_CPU_MIPS32
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
#define __pte(x) ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; })
#else
typedef struct { unsigned long long pte; } pte_t;
#define pte_val(x) ((x).pte)
#define __pte(x) ((pte_t) { (x) } )
#endif
#else
typedef struct { unsigned long pte; } pte_t;
#define pte_val(x) ((x).pte)
#endif
#define __pte(x) ((pte_t) { (x) } )
#endif
/*
* For 3-level pagetables we defines these ourselves, for 2-level the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册