From: Paul Burton Date: Mon, 24 Mar 2014 10:19:35 +0000 (+0000) Subject: MIPS: CPC: Use __raw_ memory access functions X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9a1724c7506bfa7d3d9dcab13f83e9e6446929f9;p=openwrt%2Fstaging%2Fblogic.git 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: Jeffrey Deans Reported-by: Keng Koh Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6657/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/include/asm/mips-cpc.h b/arch/mips/include/asm/mips-cpc.h index fb78935010a3..988507e46d42 100644 --- a/arch/mips/include/asm/mips-cpc.h +++ b/arch/mips/include/asm/mips-cpc.h @@ -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) \