linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Marc Zyngier <marc.zyngier@arm.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Jason Cooper <jason@lakedaemon.net>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent
Date: Wed, 09 Sep 2015 08:43:06 +0000	[thread overview]
Message-ID: <55EFF11A.1050400@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1509082149250.3854@nanos>

Hi,

On 09/08/2015 11:03 PM, Thomas Gleixner wrote:
> On Tue, 8 Sep 2015, Geert Uytterhoeven wrote:
>>>> --- a/drivers/irqchip/irq-renesas-intc-irqpin.c
>>>> +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
>>>> @@ -283,6 +283,9 @@ static int intc_irqpin_irq_set_type(struct irq_data *d, unsigned int type)
>>>>   static int intc_irqpin_irq_set_wake(struct irq_data *d, unsigned int on)
>>>>   {
>>>>        struct intc_irqpin_priv *p = irq_data_get_irq_chip_data(d);
>>>> +     int hw_irq = irqd_to_hwirq(d);
>>>> +
>>>> +     irq_set_irq_wake(p->irq[hw_irq].requested_irq, on);
>>>
>>> Are you sure that this does not make lockdep unhappy due to lock
>>> nesting?
>>
>> Actually I did see one lockdep warning, so I'm aware we're probably gonna
>> need a similar solution like commit a0a8bcf4670c2c69 ("gpiolib: irqchip:
>> use different lockdep class for each gpio irqchip")?
>>
>> To be honest, these lockdep warnings aren't helping much here: on embedded
>> we typical have several stacked interrupt controllers, so wake-up settings
>> have to propagate from the bottom to the top of the stack.
> 
> But ignoring them does not help much either, right?
>   
>> E.g. on sh73a0/kzm9g gpio-keys wake-up goes through 3 interrupt controllers:
>> pcf875x -> renesas-intc-irqpin -> gic.
> 
> So, yes a seperate locking class for that intc trainwreck is probably
> required.
> 

Just as an option, May be we can proceed with patch:
[PATCH v2 2/6] genirq: fix irqchip_set_wake_parent if IRQCHIP_SKIP_SET_WAKE
http://www.spinics.net/lists/linux-omap/msg121262.html

As result, irq_chip_set_wake_parent() can be used here and no lockdep issues.

Marc, what do you think? renesas-intc-irqpin has own .irq_set_wake()
implementation and IRQCHIP_SKIP_SET_WAKE can't be used here as W/A.


-- 
regards,
-grygorii

  reply	other threads:[~2015-09-09  8:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 17:00 [PATCH 0/2] irqchip: renesas: Propagate wake-up settings to parent Geert Uytterhoeven
2015-09-08 17:00 ` [PATCH 1/2] irqchip: renesas-intc-irqpin: " Geert Uytterhoeven
2015-09-08 19:05   ` Thomas Gleixner
2015-09-08 19:36     ` Geert Uytterhoeven
2015-09-08 20:03       ` Thomas Gleixner
2015-09-09  8:43         ` Grygorii Strashko [this message]
2015-09-09  8:53           ` Thomas Gleixner
2015-09-09  9:16             ` Grygorii Strashko
2015-09-08 17:00 ` [PATCH 2/2] irqchip: renesas-irqc: " Geert Uytterhoeven
2015-09-08 17:26 ` [PATCH 0/2] irqchip: renesas: " Sudeep Holla

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=55EFF11A.1050400@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=marc.zyngier@arm.com \
    --cc=sudeep.holla@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;
as well as URLs for NNTP newsgroup(s).