lkml.org 
[lkml]   [2014]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] irq: Warn when shared interrupts do not match on NO_SUSPEND
On Thu, 24 Jul 2014, Peter Zijlstra wrote:

> Subject: irq: Warn when shared interrupts do not match on NO_SUSPEND
>
> When suspend_device_irqs() iterates all descriptors, its pointless if
> one has NO_SUSPEND set while another has not.
>
> Validate on request_irq() that NO_SUSPEND state maches for SHARED
> interrupts.

I'm happy to take that patch, but you are aware that it is going to
break a few things?

25: .... PCI-MSI-edge aerdrv, PCIe PME

Thanks,

tglx

> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Peter Zijlstra <peterz@infradead.org>
> ---
> kernel/irq/manage.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 88657d7bc9dd..27a1fe028afb 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -1077,9 +1077,12 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
> * set the trigger type must match. Also all must
> * agree on ONESHOT.
> */
> +
> +#define IRQF_MISMATCH \
> + (IRQF_TRIGGER_MASK | IRQF_ONESHOT | IRQF_NO_SUSPEND)
> +
> if (!((old->flags & new->flags) & IRQF_SHARED) ||
> - ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
> - ((old->flags ^ new->flags) & IRQF_ONESHOT))
> + ((old->flags ^ new->flags) & IRQF_MISMATCH))
> goto mismatch;
>
> /* All handlers must agree on per-cpuness */
>


\
 
 \ /
  Last update: 2014-07-24 16:22    [W:0.052 / U:0.072 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site