From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jon Hunter <jonathanh@nvidia.com>,
Marc Zyngier <marc.zyngier@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: BUG? genirq: irq 14 uses trigger mode 8; requested 0
Date: Tue, 8 Nov 2016 11:17:38 +0200 [thread overview]
Message-ID: <20161108091738.GG1447@lahna.fi.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1611072020360.3501@nanos>
On Mon, Nov 07, 2016 at 08:29:03PM +0100, Thomas Gleixner wrote:
> Subject: genirq: Use irq type from irqdata instead of irqdesc
> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Mon, 07 Nov 2016 19:57:00 +0100
>
> The type flags in the irq descriptor are there for historical reasons and
> only updated via irq_modify_status() or irq_set_type(). Both functions also
> update the type flags in irqdata. __setup_irq() is the only left over user
> of the type flags in the irq descriptor.
>
> If __setup_irq() is called with empty irq type flags, then the type flags
> are retrieved from irqdata. If an interrupt is shared, then the type flags
> are compared with the type flags stored in the irq descriptor.
>
> On x86 the ioapic does not have a irq_set_type() callback because the type
> is defined in the BIOS tables and cannot be changed. The type is stored in
> irqdata at setup time without updating the type data in the irq
> descriptor. As a result the comparison described above fails.
>
> There is no point in updating the irq descriptor flags because the only
> relevant storage is irqdata. Use the type flags from irqdata for both
> retrieval and comparison in __setup_irq() instead.
>
> Aside of that the print out in case of non matching type flags has the old
> and new type flags arguments flipped. Fix that as well.
>
> For correctness sake the flags stored in the irq descriptor should be
> removed, but this is beyond the scope of this bugfix and will be done in a
> later patch.
>
> Fixes: 4b357daed698 ("genirq: Look-up trigger type if not specified by caller")
> Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This fixes it, thanks a lot!
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
next prev parent reply other threads:[~2016-11-08 9:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 13:02 BUG? genirq: irq 14 uses trigger mode 8; requested 0 Mika Westerberg
2016-11-01 14:24 ` Jon Hunter
2016-11-01 14:44 ` Mika Westerberg
2016-11-07 11:49 ` Mika Westerberg
2016-11-07 13:32 ` Jon Hunter
2016-11-07 14:40 ` Marc Zyngier
2016-11-07 14:59 ` Mika Westerberg
2016-11-07 15:50 ` Jon Hunter
2016-11-07 16:00 ` Thomas Gleixner
2016-11-07 19:29 ` Thomas Gleixner
2016-11-08 9:17 ` Mika Westerberg [this message]
2016-11-08 14:22 ` [tip:irq/urgent] genirq: Use irq type from irqdata instead of irqdesc tip-bot for Thomas Gleixner
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=20161108091738.GG1447@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox