From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: rjw@rjwysocki.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irq: Warn when shared interrupts do not match on NO_SUSPEND
Date: Thu, 24 Jul 2014 15:46:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.10.1407241544500.23352@nanos> (raw)
In-Reply-To: <20140724133921.GY6758@twins.programming.kicks-ass.net>
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 */
>
next prev parent reply other threads:[~2014-07-24 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 13:39 Peter Zijlstra
2014-07-24 13:46 ` Thomas Gleixner [this message]
2014-07-24 14:15 ` Peter Zijlstra
2014-07-24 14:39 ` Rafael J. Wysocki
2014-07-24 15:36 ` [tip:irq/core] " tip-bot for Peter Zijlstra
2014-07-31 2:22 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1407241544500.23352@nanos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®