arm64: irqflags: Pass flags as readonly operand to restore instruction
authorJulien Thierry <julien.thierry@arm.com>
Tue, 11 Jun 2019 09:38:07 +0000 (10:38 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 21 Jun 2019 10:19:16 +0000 (11:19 +0100)
Flags are only read by the instructions doing the irqflags restore
operation. Pass the operand as read only to the asm inline instead of
read-write.

Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Mark Rutland <mark.rutland@ar.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/irqflags.h

index 6299631890857365626641c225c06645beb123e8..9c93152c9af746738361401fdfec10e258c0417d 100644 (file)
@@ -119,8 +119,8 @@ static inline void arch_local_irq_restore(unsigned long flags)
                        __msr_s(SYS_ICC_PMR_EL1, "%0")
                        "dsb    sy",
                        ARM64_HAS_IRQ_PRIO_MASKING)
-               : "+r" (flags)
                :
+               : "r" (flags)
                : "memory");
 }