On Friday 16 September 2016 04:26 PM, Nicholas Piggin wrote:
On Thu, 15 Sep 2016 18:32:02 +0530
Madhavan Srinivasan <ma...@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.

OK. Will move it.

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.

Yes. I though i did the comment. Apologies. Will respin
with the comment.

Maddy

Thanks,
Nick


Reply via email to