diff mbox

[RFC,1/9] Add #defs for paca->soft_enabled flags

Message ID 1469458342-26233-2-git-send-email-maddy@linux.vnet.ibm.com (mailing list archive)
State Superseded
Headers show

Commit Message

maddy July 25, 2016, 2:52 p.m. UTC
Two #defs LAZY_INTERRUPT_ENABLED and
LAZY_INTERRUPT_DISABLED are added to be used
when updating paca->soft_enabled.

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
-If the macro names looks not right, kindly suggest

 arch/powerpc/include/asm/hw_irq.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Nicholas Piggin July 26, 2016, 5:27 a.m. UTC | #1
On Mon, 25 Jul 2016 20:22:14 +0530
Madhavan Srinivasan <maddy@linux.vnet.ibm.com> wrote:

> Two #defs LAZY_INTERRUPT_ENABLED and
> LAZY_INTERRUPT_DISABLED are added to be used
> when updating paca->soft_enabled.

This is a very nice patchset, but can this not be a new name?
We use "soft enabled/disabled" everywhere for it. I think lazy
is an implementation detail anyway because some interrupts don't
cause a hard disable at all.

Thanks,
Nick
maddy July 26, 2016, 6:05 a.m. UTC | #2
On Tuesday 26 July 2016 10:57 AM, Nicholas Piggin wrote:
> On Mon, 25 Jul 2016 20:22:14 +0530
> Madhavan Srinivasan <maddy@linux.vnet.ibm.com> wrote:
>
>> Two #defs LAZY_INTERRUPT_ENABLED and
>> LAZY_INTERRUPT_DISABLED are added to be used
>> when updating paca->soft_enabled.
> This is a very nice patchset, but can this not be a new name?

Thanks, but idea is from ben :)
Regarding the name, I looked at the initial patchset posted by
paul and took the name from it :).

But will work on that, any suggestion for the name?

Maddy

> We use "soft enabled/disabled" everywhere for it. I think lazy
> is an implementation detail anyway because some interrupts don't
> cause a hard disable at all.
>
> Thanks,
> Nick
>
Nicholas Piggin July 26, 2016, 6:13 a.m. UTC | #3
On Tue, 26 Jul 2016 11:35:16 +0530
Madhavan Srinivasan <maddy@linux.vnet.ibm.com> wrote:

> On Tuesday 26 July 2016 10:57 AM, Nicholas Piggin wrote:
> > On Mon, 25 Jul 2016 20:22:14 +0530
> > Madhavan Srinivasan <maddy@linux.vnet.ibm.com> wrote:
> >  
> >> Two #defs LAZY_INTERRUPT_ENABLED and
> >> LAZY_INTERRUPT_DISABLED are added to be used
> >> when updating paca->soft_enabled.  
> > This is a very nice patchset, but can this not be a new name?  
> 
> Thanks, but idea is from ben :)
> Regarding the name, I looked at the initial patchset posted by
> paul and took the name from it :).
> 
> But will work on that, any suggestion for the name?

I don't have a strong preference. LAZY_* is not horrible itself,
it's just that softe variant is used elsewhere. I don't mind if
you rename softe to something else completely (although Ben might).
Allow me to apply the first coat of paint to the bikeshed:

irq_disable_level

IRQ_DISABLE_LEVEL_NONE
IRQ_DISABLE_LEVEL_LINUX
IRQ_DISABLE_LEVEL_PMU
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index b59ac27a6b7d..e58c9d95050a 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -27,6 +27,13 @@ 
 #define PACA_IRQ_EE_EDGE	0x10 /* BookE only */
 #define PACA_IRQ_HMI		0x20
 
+/*
+ * flags for paca->soft_enabled
+ */
+#define LAZY_INTERRUPT_ENABLED		1
+#define LAZY_INTERRUPT_DISABLED		0
+
+
 #endif /* CONFIG_PPC64 */
 
 #ifndef __ASSEMBLY__