]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
irqchip/gic-v3: Use nops macro for Cavium ThunderX erratum 23154
authorWill Deacon <will.deacon@arm.com>
Fri, 28 Oct 2016 11:23:58 +0000 (12:23 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 29 Nov 2016 09:14:48 +0000 (09:14 +0000)
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>
arch/arm64/include/asm/arch_gicv3.h

index fdf34f8b4ee07c2b096bb14055e48766049e4f38..0313670a3e3fb53ce358a14ff25367386d0aa7a7 100644 (file)
@@ -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;