[PATCH 12/13] powerpc: Add a Kconfig and a functions to set new soft_enabled mask
Nicholas Piggin
npiggin at gmail.com
Fri Sep 16 20:56:44 AEST 2016
On Thu, 15 Sep 2016 18:32:02 +0530
Madhavan Srinivasan <maddy at linux.vnet.ibm.com> wrote:
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 9e5e9a6d4147..ae31b1e85fdb 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -209,6 +209,10 @@ notrace void arch_local_irq_restore(unsigned long en)
> unsigned char irq_happened;
> unsigned int replay;
>
> +#ifdef CONFIG_IRQ_DEBUG_SUPPORT
> + WARN_ON(en & local_paca->soft_enabled & ~IRQ_DISABLE_MASK_LINUX);
> +#endif
> +
> /* Write the new soft-enabled value */
> soft_enabled_set(en);
>
Oh one other quick thing I just noticed: you could put this debug
check into your soft_enabled accessors.
We did decide it's okay for your masking level to go both ways,
didn't we? I.e.,
local_irq_disable();
local_irq_pmu_save(flags);
local_irq_pmu_restore(flags);
local_irq_enable();
-> LINUX -> LINUX|PMU -> LINUX ->
This means PMU interrupts would not get replayed despite being
enabled here. In practice I think that doesn't matter/can't happen
because a PMU interrupt while masked would hard disable anyway. A
comment explaining it might be nice though.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list