Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220999 > unrolled thread
| Started by | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| First post | 2015-09-08 19:10 +0200 |
| Last post | 2015-09-15 18:00 +0200 |
| Articles | 8 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Geert Uytterhoeven <geert+renesas@glider.be> - 2015-09-08 19:10 +0200
Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Thomas Gleixner <tglx@linutronix.de> - 2015-09-08 21:10 +0200
Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Geert Uytterhoeven <geert@linux-m68k.org> - 2015-09-08 21:40 +0200
Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Thomas Gleixner <tglx@linutronix.de> - 2015-09-08 22:10 +0200
Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Grygorii Strashko <grygorii.strashko@ti.com> - 2015-09-09 10:50 +0200
Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Thomas Gleixner <tglx@linutronix.de> - 2015-09-09 11:00 +0200
Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Grygorii Strashko <grygorii.strashko@ti.com> - 2015-09-09 11:20 +0200
[tip:irq/urgent] irqchip/renesas-intc-irqpin: Propagate wake-up settings to parent tip-bot for Geert Uytterhoeven <tipbot@zytor.com> - 2015-09-15 18:00 +0200
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Date | 2015-09-08 19:10 +0200 |
| Subject | [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6uz7-26l-5@gated-at.bofh.it> |
The renesas-intc-irqpin interrupt controller is cascaded to the GIC, but
its driver doesn't propagate wake-up settings to the parent interrupt
controller.
Since commit aec89ef72ba6c944 ("irqchip/gic: Enable SKIP_SET_WAKE and
MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
wake-up through gpio-keys now fails on r8a7740/armadillo and
sh73a0/kzm9g.
Fix this by propagating wake-up settings to the parent interrupt
controller. There's no need to handle irq_set_irq_wake() failures, as
the renesas-intc-irqpin interrupt controller is always cascaded to a
GIC, and the GIC driver always sets SKIP_SET_WAKE since the
aforementioned commit.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/irqchip/irq-renesas-intc-irqpin.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 0670ab4e3897bf61..457d22c09e352d56 100644
--- 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);
if (!p->clk)
return 0;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-09-08 21:10 +0200 |
| Subject | Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6wrg-4Ph-29@gated-at.bofh.it> |
| In reply to | #1220999 |
On Tue, 8 Sep 2015, Geert Uytterhoeven wrote:
> The renesas-intc-irqpin interrupt controller is cascaded to the GIC, but
> its driver doesn't propagate wake-up settings to the parent interrupt
> controller.
>
> Since commit aec89ef72ba6c944 ("irqchip/gic: Enable SKIP_SET_WAKE and
> MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
> wake-up through gpio-keys now fails on r8a7740/armadillo and
> sh73a0/kzm9g.
>
> Fix this by propagating wake-up settings to the parent interrupt
> controller. There's no need to handle irq_set_irq_wake() failures, as
> the renesas-intc-irqpin interrupt controller is always cascaded to a
> GIC, and the GIC driver always sets SKIP_SET_WAKE since the
> aforementioned commit.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/irqchip/irq-renesas-intc-irqpin.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
> index 0670ab4e3897bf61..457d22c09e352d56 100644
> --- 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?
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-09-08 21:40 +0200 |
| Subject | Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6wUj-5nt-23@gated-at.bofh.it> |
| In reply to | #1221041 |
Hi Thomas,
On Tue, Sep 8, 2015 at 9:05 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 8 Sep 2015, Geert Uytterhoeven wrote:
>> The renesas-intc-irqpin interrupt controller is cascaded to the GIC, but
>> its driver doesn't propagate wake-up settings to the parent interrupt
>> controller.
>>
>> Since commit aec89ef72ba6c944 ("irqchip/gic: Enable SKIP_SET_WAKE and
>> MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
>> wake-up through gpio-keys now fails on r8a7740/armadillo and
>> sh73a0/kzm9g.
>>
>> Fix this by propagating wake-up settings to the parent interrupt
>> controller. There's no need to handle irq_set_irq_wake() failures, as
>> the renesas-intc-irqpin interrupt controller is always cascaded to a
>> GIC, and the GIC driver always sets SKIP_SET_WAKE since the
>> aforementioned commit.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
>> drivers/irqchip/irq-renesas-intc-irqpin.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
>> index 0670ab4e3897bf61..457d22c09e352d56 100644
>> --- 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.
E.g. on sh73a0/kzm9g gpio-keys wake-up goes through 3 interrupt controllers:
pcf875x -> renesas-intc-irqpin -> gic.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-09-08 22:10 +0200 |
| Subject | Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6xnk-6ba-11@gated-at.bofh.it> |
| In reply to | #1221056 |
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.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Date | 2015-09-09 10:50 +0200 |
| Subject | Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6JeN-6np-7@gated-at.bofh.it> |
| In reply to | #1221060 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-09-09 11:00 +0200 |
| Subject | Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6Jou-6yQ-15@gated-at.bofh.it> |
| In reply to | #1221304 |
On Wed, 9 Sep 2015, Grygorii Strashko wrote: > On 09/08/2015 11:03 PM, Thomas Gleixner wrote: > > 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. The driver in question is not using hierarchical irq domains. So what would that patch solve? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Date | 2015-09-09 11:20 +0200 |
| Subject | Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q6JHQ-7aW-17@gated-at.bofh.it> |
| In reply to | #1221311 |
On 09/09/2015 11:53 AM, Thomas Gleixner wrote: > On Wed, 9 Sep 2015, Grygorii Strashko wrote: >> On 09/08/2015 11:03 PM, Thomas Gleixner wrote: >>> 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. > > The driver in question is not using hierarchical irq domains. So what > would that patch solve? > You are right. I misunderstood it. Sorry for the noise. -- regards, -grygorii -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Geert Uytterhoeven <tipbot@zytor.com> |
|---|---|
| Date | 2015-09-15 18:00 +0200 |
| Subject | [tip:irq/urgent] irqchip/renesas-intc-irqpin: Propagate wake-up settings to parent |
| Message-ID | <q90Oh-UN-67@gated-at.bofh.it> |
| In reply to | #1220999 |
Commit-ID: f4e209cdc7a00f934007f40cf885471799073b0d
Gitweb: http://git.kernel.org/tip/f4e209cdc7a00f934007f40cf885471799073b0d
Author: Geert Uytterhoeven <geert+renesas@glider.be>
AuthorDate: Tue, 8 Sep 2015 19:00:35 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 15 Sep 2015 17:06:29 +0200
irqchip/renesas-intc-irqpin: Propagate wake-up settings to parent
The renesas-intc-irqpin interrupt controller is cascaded to the GIC, but
its driver doesn't propagate wake-up settings to the parent interrupt
controller.
Since commit aec89ef72ba6c944 ("irqchip/gic: Enable SKIP_SET_WAKE and
MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
wake-up through gpio-keys now fails on r8a7740/armadillo and
sh73a0/kzm9g.
Fix this by propagating wake-up settings to the parent interrupt
controller. There's no need to handle irq_set_irq_wake() failures, as
the renesas-intc-irqpin interrupt controller is always cascaded to a
GIC, and the GIC driver always sets SKIP_SET_WAKE since the
aforementioned commit.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1441731636-17610-2-git-send-email-geert%2Brenesas@glider.be
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-renesas-intc-irqpin.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 67797ee..d3546a6 100644
--- 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);
if (!p->clk)
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web