mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	<linux-kernel@vger.kernel.org>
Subject: Re: BUG? genirq: irq 14 uses trigger mode 8; requested 0
Date: Tue, 1 Nov 2016 14:24:38 +0000	[thread overview]
Message-ID: <57b67069-8fc0-800f-b869-1eec3d64111f@nvidia.com> (raw)
In-Reply-To: <20161101130231.GD1436@lahna.fi.intel.com>

Hi Mika,

On 01/11/16 13:02, Mika Westerberg wrote:
> Hi,
>
> I started seeing following messages on Intel Broxton when the
> pinctrl/GPIO driver [1] loads:
>
>   [    0.645786] genirq: irq 14 uses trigger mode 8; requested 0
>
> The driver shares interrupt with other GPIO "communities" or banks so it
> uses request_irq() instead of irq_set_chained_handler_and_data(). The
> driver does not specify IRQ flags as those come from ACPI resources.
>
> This started happen after commit 4b357daed698 ("genirq: Look-up trigger
> type if not specified by caller").
>
> I think this is what happens:
>
>   1. ACPI platform sets up the interrupt according what is in the _CRS
>   of the GPIO device. This ends up setting trigger type for irq_data of
>   the irq.
>
>   2. First GPIO device is found and the driver calls request_irq() which
>   calls __setup_irq() where shared == 0.
>
>   3. Since new->flags is read back from irq_data we call __irq_set_trigger()
>   passing the flags.
>
>   4. The parent IRQ chip, IO-APIC, does not have ->irq_set_type callback
>   so __irq_set_trigger() never calls irq_settings_set_trigger_mask() for
>   the desciptor.
 >
>   5. The second GPIO device is found and this time shared == 1 so we
>   end up comparing nmsk with omsk where nmsk was read from irq_data
>   and omsk is read using irq_settings_get_trigger_mask().
>
>   6. Because we never called irq_settings_set_trigger_mask() for the
>   descriptor, omsk is 0 and we print out a warning:
>
>   [    0.645786] genirq: irq 14 uses trigger mode 8; requested 0
>
> If I revert commit 4b357daed698 the warning goes away.
>
> Do you have any ideas how to get rid of the warning properly?

May be I am misunderstanding something here, but if the parent does not 
have a ->irq_set_type callback, then it would seem that the type for the 
interrupt should be not specified/set in the ACPI _CRS for the GPIO 
device, right?

Thanks for the detailed description.

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2016-11-01 14:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 13:02 Mika Westerberg
2016-11-01 14:24 ` Jon Hunter [this message]
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
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=57b67069-8fc0-800f-b869-1eec3d64111f@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mika.westerberg@linux.intel.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

Powered by JetHome