Message ID | 1430737448-29223-1-git-send-email-ahaslam@baylibre.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Simon Horman |
Headers | show |
Hi Axel, On Mon, May 4, 2015 at 1:04 PM, <ahaslam@baylibre.com> wrote: > From: Axel Haslam <ahaslam+renesas@baylibre.com> > > when doing a suspend to ram with r8a7790 a warning starts appearing > since: commit ab82fa7da4dc ("gpio: rcar: Prevent module clock disable > when wake-up is enabled") > > the call trace that ends up in the waring is: > gpio_rcar_irq_set_wake() > irq_set_irq_wake(p->irq_parent, on); > gic_set_wake() > > but since gic_arch_extn.irq_set_wake is not set, this returns > an error and desc->wake_depth is set to 0, which generates warnings > on trying to disable the wake upon resume. > > To avoid this warning set the IRQCHIP_SKIP_SET_WAKE flag for the gic > irq's. With this flag set_irq_wake_real will avoid returning > errors and the calls will be balanced. I tried to handle this in the GIC driver: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331763.html but that was rejected by Marc Zyngier: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331813.html I wrote a patch to fix this in gpio-rcar, but forgot to send it. Sorry for that, will do later today. > @@ -27,6 +30,12 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = { > NULL, > }; > > +void __init r8a7790_init_irq(void) > +{ > + gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE; > + irqchip_init(); > +} Please note that gic_arch_extn is cheduled for removal, cfr. "[PATCH] irqchip: gic: Drop support for gic_arch_extn" (http://www.spinics.net/lists/arm-kernel/msg413684.html) 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-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Geert, On Mon, May 4, 2015 at 2:30 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > Hi Axel, > > On Mon, May 4, 2015 at 1:04 PM, <ahaslam@baylibre.com> wrote: >> From: Axel Haslam <ahaslam+renesas@baylibre.com> >> >> when doing a suspend to ram with r8a7790 a warning starts appearing >> since: commit ab82fa7da4dc ("gpio: rcar: Prevent module clock disable >> when wake-up is enabled") >> >> the call trace that ends up in the waring is: >> gpio_rcar_irq_set_wake() >> irq_set_irq_wake(p->irq_parent, on); >> gic_set_wake() >> >> but since gic_arch_extn.irq_set_wake is not set, this returns >> an error and desc->wake_depth is set to 0, which generates warnings >> on trying to disable the wake upon resume. >> >> To avoid this warning set the IRQCHIP_SKIP_SET_WAKE flag for the gic >> irq's. With this flag set_irq_wake_real will avoid returning >> errors and the calls will be balanced. > > I tried to handle this in the GIC driver: > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331763.html > but that was rejected by Marc Zyngier: > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331813.html > > I wrote a patch to fix this in gpio-rcar, but forgot to send it. > Sorry for that, will do later today. > >> @@ -27,6 +30,12 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = { >> NULL, >> }; >> >> +void __init r8a7790_init_irq(void) >> +{ >> + gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE; >> + irqchip_init(); >> +} > > Please note that gic_arch_extn is cheduled for removal, cfr. "[PATCH] irqchip: > gic: Drop support for gic_arch_extn" > (http://www.spinics.net/lists/arm-kernel/msg413684.html) I missed your thread with Marc, sorry for the noise. Regards, Axel > > 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-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 3a18af4..84fa279 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c @@ -15,6 +15,9 @@ */ #include <linux/init.h> +#include <linux/irq.h> +#include <linux/irqchip.h> +#include <linux/irqchip/arm-gic.h> #include <asm/mach/arch.h> @@ -27,6 +30,12 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = { NULL, }; +void __init r8a7790_init_irq(void) +{ + gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE; + irqchip_init(); +} + DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") .smp = smp_ops(r8a7790_smp_ops), .init_early = shmobile_init_delay, @@ -34,4 +43,5 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") .init_late = shmobile_init_late, .reserve = rcar_gen2_reserve, .dt_compat = r8a7790_boards_compat_dt, + .init_irq = r8a7790_init_irq, MACHINE_END