Skip to content

Commit

Permalink
irqchip/gic-v3: Use nops macro for Cavium ThunderX erratum 23154
Browse files Browse the repository at this point in the history
The workaround for Cavium ThunderX erratum 23154 has a homebrew
pipeflush built out of NOP sequences around the read of the IAR.

This patch converts the code to use the new nops macro, which makes it
a little easier to read.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
  • Loading branch information
wildea01 authored and Marc Zyngier committed Nov 29, 2016
1 parent d44ffa5 commit 016f98a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions arch/arm64/include/asm/arch_gicv3.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,9 @@ static inline u64 gic_read_iar_cavium_thunderx(void)
{
u64 irqstat;

asm volatile(
"nop;nop;nop;nop\n\t"
"nop;nop;nop;nop");

nops(8);
irqstat = read_sysreg_s(ICC_IAR1_EL1);

asm volatile(
"nop;nop;nop;nop");
nops(4);
mb();

return irqstat;
Expand Down

0 comments on commit 016f98a

Please sign in to comment.