From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, jason@lakedaemon.net
Subject: Re: [PATCH v3] genirq: warn on inconstent flags and flow handler
Date: Wed, 17 Sep 2014 12:01:37 -0700 [thread overview]
Message-ID: <5419DA91.8090409@gmail.com> (raw)
In-Reply-To: <1409164725-25901-1-git-send-email-f.fainelli@gmail.com>
On 08/27/2014 11:38 AM, Florian Fainelli wrote:
> It is currently possible for a generic irq chip driver to set IRQ_LEVEL
> and have its irq flow handler be handle_edge_irq. Setting IRQ_LEVEL in
> such a case does not make sense, and will actually prevent e.g: the
> software resend logic from kicking, and potential other problems too.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Thomas, do you need me to resubmit this patch? It still applies cleanly
on top of irq/core db985cbd67c45f875ef43cb5febfaa8cbd203c27 ("Merge tag
'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into
irq/core").
Thanks!
> ---
> Changes in v3:
> - replaced BUG_ON() with WARN_ON(), essentially making it similar to v1
>
> Changes in v2:
> - replaced WARN_ON() with BUG_ON()
>
> kernel/irq/chip.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index a2b28a2fd7b1..939ae1283ec9 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -749,8 +749,13 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
> irqd_set(&desc->irq_data, IRQD_PER_CPU);
> if (irq_settings_can_move_pcntxt(desc))
> irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT);
> - if (irq_settings_is_level(desc))
> + if (irq_settings_is_level(desc)) {
> + /* Setting IRQD_LEVEL does not make sense on non-level
> + * sensitive interrupts
> + */
> + WARN_ON(desc->handle_irq != handle_level_irq);
> irqd_set(&desc->irq_data, IRQD_LEVEL);
> + }
>
> irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc));
>
>
prev parent reply other threads:[~2014-09-17 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 18:38 [PATCH v3] genirq: warn on inconstent flags and flow handler Florian Fainelli
2014-09-17 19:01 ` Florian Fainelli [this message]
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=5419DA91.8090409@gmail.com \
--to=f.fainelli@gmail.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.