Skip to content

Commit 018b741

Browse files
Sai Prakash Ranjanarndb
authored andcommitted
coresight: etm4x: Use asm-generic IO memory barriers
Per discussion in [1], it was decided to move to using architecture independent/asm-generic IO memory barriers to have just one set of them and deprecate use of arm64 specific IO memory barriers in driver code. So replace current usage of __io_rmb()/__iowmb() in drivers to __io_ar()/__io_bw(). [1] https://lore.kernel.org/lkml/CAK8P3a0L2tLeF1Q0+0ijUxhGNaw+Z0fyPC1oW6_ELQfn0=i4iw@mail.gmail.com/ Signed-off-by: Sai Prakash Ranjan <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Suzuki K Poulose <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Suzuki K Poulose <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 548927e commit 018b741

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/hwtracing/coresight/coresight-etm4x-core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ u64 etm4x_sysreg_read(u32 offset, bool _relaxed, bool _64bit)
9898
}
9999

100100
if (!_relaxed)
101-
__iormb(res); /* Imitate the !relaxed I/O helpers */
101+
__io_ar(res); /* Imitate the !relaxed I/O helpers */
102102

103103
return res;
104104
}
105105

106106
void etm4x_sysreg_write(u64 val, u32 offset, bool _relaxed, bool _64bit)
107107
{
108108
if (!_relaxed)
109-
__iowmb(); /* Imitate the !relaxed I/O helpers */
109+
__io_bw(); /* Imitate the !relaxed I/O helpers */
110110
if (!_64bit)
111111
val &= GENMASK(31, 0);
112112

@@ -130,15 +130,15 @@ static u64 ete_sysreg_read(u32 offset, bool _relaxed, bool _64bit)
130130
}
131131

132132
if (!_relaxed)
133-
__iormb(res); /* Imitate the !relaxed I/O helpers */
133+
__io_ar(res); /* Imitate the !relaxed I/O helpers */
134134

135135
return res;
136136
}
137137

138138
static void ete_sysreg_write(u64 val, u32 offset, bool _relaxed, bool _64bit)
139139
{
140140
if (!_relaxed)
141-
__iowmb(); /* Imitate the !relaxed I/O helpers */
141+
__io_bw(); /* Imitate the !relaxed I/O helpers */
142142
if (!_64bit)
143143
val &= GENMASK(31, 0);
144144

drivers/hwtracing/coresight/coresight-etm4x.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,14 @@
546546
#define etm4x_read32(csa, offset) \
547547
({ \
548548
u32 __val = etm4x_relaxed_read32((csa), (offset)); \
549-
__iormb(__val); \
549+
__io_ar(__val); \
550550
__val; \
551551
})
552552

553553
#define etm4x_read64(csa, offset) \
554554
({ \
555555
u64 __val = etm4x_relaxed_read64((csa), (offset)); \
556-
__iormb(__val); \
556+
__io_ar(__val); \
557557
__val; \
558558
})
559559

@@ -577,13 +577,13 @@
577577

578578
#define etm4x_write32(csa, val, offset) \
579579
do { \
580-
__iowmb(); \
580+
__io_bw(); \
581581
etm4x_relaxed_write32((csa), (val), (offset)); \
582582
} while (0)
583583

584584
#define etm4x_write64(csa, val, offset) \
585585
do { \
586-
__iowmb(); \
586+
__io_bw(); \
587587
etm4x_relaxed_write64((csa), (val), (offset)); \
588588
} while (0)
589589

0 commit comments

Comments
 (0)