Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: hardware: fix endian-ness in <hardware/coresight.h>

The <hardware/coresight.h> needs to take into account the endian-ness
of the processor when reading and writing data, so change to using
the readl/writel relaxed variants from the raw ones.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Ben Dooks bfdef3b3 0ab89d0b

+4 -4
+4 -4
arch/arm/include/asm/hardware/coresight.h
··· 24 24 #define TRACER_TIMEOUT 10000 25 25 26 26 #define etm_writel(t, v, x) \ 27 - (__raw_writel((v), (t)->etm_regs + (x))) 28 - #define etm_readl(t, x) (__raw_readl((t)->etm_regs + (x))) 27 + (writel_relaxed((v), (t)->etm_regs + (x))) 28 + #define etm_readl(t, x) (readl_relaxed((t)->etm_regs + (x))) 29 29 30 30 /* CoreSight Management Registers */ 31 31 #define CSMR_LOCKACCESS 0xfb0 ··· 142 142 #define ETBFF_TRIGFL BIT(10) 143 143 144 144 #define etb_writel(t, v, x) \ 145 - (__raw_writel((v), (t)->etb_regs + (x))) 146 - #define etb_readl(t, x) (__raw_readl((t)->etb_regs + (x))) 145 + (writel_relaxed((v), (t)->etb_regs + (x))) 146 + #define etb_readl(t, x) (readl_relaxed((t)->etb_regs + (x))) 147 147 148 148 #define etm_lock(t) do { etm_writel((t), 0, CSMR_LOCKACCESS); } while (0) 149 149 #define etm_unlock(t) \