2009-07-17 01:51:52

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'

On Friday 17 July 2009, Guanqun Lu wrote:
> We currently only bypass IRQF_TIMER in '__disable_irq',
> but Xen specific IRQs should not be disabled either.
> This commit adds a new flag to accompolish this goal
> without being mixed up with IRQF_TIMER flag.

For some obscure reasons [2/3] didn't reach my inbox. The other 2 patches
look fine to me.

Best,
Rafael


> Signed-off-by: Guanqun Lu <[email protected]>
> ---
> include/linux/interrupt.h | 1 +
> kernel/irq/manage.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 2721f07..99264c3 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -58,6 +58,7 @@
> #define IRQF_PERCPU 0x00000400
> #define IRQF_NOBALANCING 0x00000800
> #define IRQF_IRQPOLL 0x00001000
> +#define IRQF_NO_SUSPEND 0x00002000
>
> /*
> * Bits used by threaded handlers:
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 50da676..3dc4e74 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -192,7 +192,8 @@ static inline int setup_affinity(unsigned int irq, struct irq_desc *desc)
> void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
> {
> if (suspend) {
> - if (!desc->action || (desc->action->flags & IRQF_TIMER))
> + if (!desc->action ||
> + (desc->action->flags & (IRQF_TIMER | IRQF_NO_SUSPEND)))
> return;
> desc->status |= IRQ_SUSPENDED;
> }


2009-07-17 02:17:54

by Lu Guanqun

[permalink] [raw]
Subject: RE: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'

>-----Original Message-----
>From: Rafael J. Wysocki [mailto:[email protected]]
>Sent: Friday, July 17, 2009 9:52 AM
>To: Lu, Guanqun
>Cc: [email protected]; [email protected]; [email protected]
>Subject: Re: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'
>
>On Friday 17 July 2009, Guanqun Lu wrote:
>> We currently only bypass IRQF_TIMER in '__disable_irq',
>> but Xen specific IRQs should not be disabled either.
>> This commit adds a new flag to accompolish this goal
>> without being mixed up with IRQF_TIMER flag.
>
>For some obscure reasons [2/3] didn't reach my inbox. The other 2 patches
>look fine to me.

I'm sending patch [2/3] via attachment in case it's lost accidentally by git-send-email again.
Sorry for the inconvenience it may cause.

Guanqun

>
>Best,
>Rafael
>
>
>> Signed-off-by: Guanqun Lu <[email protected]>
>> ---
>> include/linux/interrupt.h | 1 +
>> kernel/irq/manage.c | 3 ++-
>> 2 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
>> index 2721f07..99264c3 100644
>> --- a/include/linux/interrupt.h
>> +++ b/include/linux/interrupt.h
>> @@ -58,6 +58,7 @@
>> #define IRQF_PERCPU 0x00000400
>> #define IRQF_NOBALANCING 0x00000800
>> #define IRQF_IRQPOLL 0x00001000
>> +#define IRQF_NO_SUSPEND 0x00002000
>>
>> /*
>> * Bits used by threaded handlers:
>> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>> index 50da676..3dc4e74 100644
>> --- a/kernel/irq/manage.c
>> +++ b/kernel/irq/manage.c
>> @@ -192,7 +192,8 @@ static inline int setup_affinity(unsigned int irq, struct irq_desc
>*desc)
>> void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
>> {
>> if (suspend) {
>> - if (!desc->action || (desc->action->flags & IRQF_TIMER))
>> + if (!desc->action ||
>> + (desc->action->flags & (IRQF_TIMER | IRQF_NO_SUSPEND)))
>> return;
>> desc->status |= IRQ_SUSPENDED;
>> }


Attachments:
0002-add-IRQF_NO_SUSPEND-for-bind_ipi_to_irqhandler.patch (882.00 B)
0002-add-IRQF_NO_SUSPEND-for-bind_ipi_to_irqhandler.patch

2009-07-17 02:41:19

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'

On Friday 17 July 2009, Lu, Guanqun wrote:
> >-----Original Message-----
> >From: Rafael J. Wysocki [mailto:[email protected]]
> >Sent: Friday, July 17, 2009 9:52 AM
> >To: Lu, Guanqun
> >Cc: [email protected]; [email protected]; [email protected]
> >Subject: Re: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'
> >
> >On Friday 17 July 2009, Guanqun Lu wrote:
> >> We currently only bypass IRQF_TIMER in '__disable_irq',
> >> but Xen specific IRQs should not be disabled either.
> >> This commit adds a new flag to accompolish this goal
> >> without being mixed up with IRQF_TIMER flag.
> >
> >For some obscure reasons [2/3] didn't reach my inbox. The other 2 patches
> >look fine to me.
>
> I'm sending patch [2/3] via attachment in case it's lost accidentally by git-send-email again.
> Sorry for the inconvenience it may cause.

Thanks, patch looks OK to me.

Best,
Rafael


> >> Signed-off-by: Guanqun Lu <[email protected]>
> >> ---
> >> include/linux/interrupt.h | 1 +
> >> kernel/irq/manage.c | 3 ++-
> >> 2 files changed, 3 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> >> index 2721f07..99264c3 100644
> >> --- a/include/linux/interrupt.h
> >> +++ b/include/linux/interrupt.h
> >> @@ -58,6 +58,7 @@
> >> #define IRQF_PERCPU 0x00000400
> >> #define IRQF_NOBALANCING 0x00000800
> >> #define IRQF_IRQPOLL 0x00001000
> >> +#define IRQF_NO_SUSPEND 0x00002000
> >>
> >> /*
> >> * Bits used by threaded handlers:
> >> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> >> index 50da676..3dc4e74 100644
> >> --- a/kernel/irq/manage.c
> >> +++ b/kernel/irq/manage.c
> >> @@ -192,7 +192,8 @@ static inline int setup_affinity(unsigned int irq, struct irq_desc
> >*desc)
> >> void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
> >> {
> >> if (suspend) {
> >> - if (!desc->action || (desc->action->flags & IRQF_TIMER))
> >> + if (!desc->action ||
> >> + (desc->action->flags & (IRQF_TIMER | IRQF_NO_SUSPEND)))
> >> return;
> >> desc->status |= IRQ_SUSPENDED;
> >> }

2009-07-17 14:18:04

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'

On Fri, 17 Jul 2009, Rafael J. Wysocki wrote:

> On Friday 17 July 2009, Guanqun Lu wrote:
> > We currently only bypass IRQF_TIMER in '__disable_irq',
> > but Xen specific IRQs should not be disabled either.
> > This commit adds a new flag to accompolish this goal
> > without being mixed up with IRQF_TIMER flag.
>
> For some obscure reasons [2/3] didn't reach my inbox. The other 2 patches
> look fine to me.

I do not receive the patches at all. Can you please resend and cc me ?

Thanks,

tglx

2009-07-20 02:56:27

by Lu Guanqun

[permalink] [raw]
Subject: RE: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'

>-----Original Message-----
>From: Thomas Gleixner [mailto:[email protected]]
>Sent: Friday, July 17, 2009 10:18 PM
>To: Rafael J. Wysocki
>Cc: Lu, Guanqun; [email protected]; [email protected]; [email protected]
>Subject: Re: [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'
>
>On Fri, 17 Jul 2009, Rafael J. Wysocki wrote:
>
>> On Friday 17 July 2009, Guanqun Lu wrote:
>> > We currently only bypass IRQF_TIMER in '__disable_irq',
>> > but Xen specific IRQs should not be disabled either.
>> > This commit adds a new flag to accompolish this goal
>> > without being mixed up with IRQF_TIMER flag.
>>
>> For some obscure reasons [2/3] didn't reach my inbox. The other 2 patches
>> look fine to me.
>
>I do not receive the patches at all. Can you please resend and cc me ?

Resent now, let me know it doesn't get to your inbox again.

Guanqun

>
>Thanks,
>
> tglx