提交 9a1724c7 编写于 作者: P Paul Burton 提交者: Ralf Baechle

MIPS: CPC: Use __raw_ memory access functions

The CPC registers use native endianness, so using plain readl & writel
will produce incorrect results on big endian systems.
Reported-by: NJeffrey Deans <jeffrey.deans@imgtec.com>
Reported-by: NKeng Koh <keng.koh@imgtec.com>
Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6657/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 cd217546
......@@ -75,13 +75,13 @@ static inline bool mips_cpc_present(void)
#define BUILD_CPC_R_(name, off) \
static inline u32 read_cpc_##name(void) \
{ \
return readl(mips_cpc_base + (off)); \
return __raw_readl(mips_cpc_base + (off)); \
}
#define BUILD_CPC__W(name, off) \
static inline void write_cpc_##name(u32 value) \
{ \
writel(value, mips_cpc_base + (off)); \
__raw_writel(value, mips_cpc_base + (off)); \
}
#define BUILD_CPC_RW(name, off) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册