Re: [PATCH v2 3/5] arm64: Fix incorrect irqflag restore for priority masking

2019-05-14 Thread Julien Thierry
On 14/05/2019 13:01, Robin Murphy wrote: > On 14/05/2019 10:25, Julien Thierry wrote: > [...] +static inline int arch_irqs_disabled_flags(unsigned long flags) +{ +    int res; + +    asm volatile(ALTERNATIVE( +    "and    %w0, %w1, #" __stringify(PSR_I_BIT) "\n"

Re: [PATCH v2 3/5] arm64: Fix incorrect irqflag restore for priority masking

2019-05-14 Thread Robin Murphy
On 14/05/2019 10:25, Julien Thierry wrote: [...] +static inline int arch_irqs_disabled_flags(unsigned long flags) +{ + int res; + + asm volatile(ALTERNATIVE( + "and %w0, %w1, #" __stringify(PSR_I_BIT) "\n" + "nop", + "cmp %w1, #" _

Re: [PATCH v2 3/5] arm64: Fix incorrect irqflag restore for priority masking

2019-05-14 Thread Julien Thierry
On 07/05/2019 09:36, Marc Zyngier wrote: > On 29/04/2019 17:00, Julien Thierry wrote: >> When using IRQ priority masking to disable interrupts, in order to deal >> with the PSR.I state, local_irq_save() would convert the I bit into a >> PMR value (GIC_PRIO_IRQOFF). This resulted in local_irq_res

Re: [PATCH v2 3/5] arm64: Fix incorrect irqflag restore for priority masking

2019-05-07 Thread Marc Zyngier
On 29/04/2019 17:00, Julien Thierry wrote: > When using IRQ priority masking to disable interrupts, in order to deal > with the PSR.I state, local_irq_save() would convert the I bit into a > PMR value (GIC_PRIO_IRQOFF). This resulted in local_irq_restore() > potentially modifying the value of PMR i