* [4.4-rc][PATCH] genirq / PM: restore system wake up from chained interrupts
@ 2015-11-10 9:58 Grygorii Strashko
2015-11-10 11:13 ` Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Grygorii Strashko @ 2015-11-10 9:58 UTC (permalink / raw)
To: linux-arm-kernel
Commit e509bd7da149 ("genirq: Allow migration of chained interrupts
by installing default action") breaks PCS wake up IRQ behaviour on
TI OMAP based platforms (dra7-evm).
TI OMAP IRQ wake up configuration:
GIC-irqchip->PCM_IRQ
|- omap_prcm_register_chain_handler
|- PRCM-irqchip -> PRCM_IO_IRQ
|- pcs_irq_chain_handler
|- pinctrl-irqchip -> PCS_uart1_wakeup_irq
This happens because IRQ PM code (irq/pm.c) is expected to ignore
chained interrupts by default:
static bool suspend_device_irq(struct irq_desc *desc)
{
if (!desc->action || desc->no_suspend_depth)
return false;
- it's expected !desc->action = true for chained interrupts;
but, after above change, all chained interrupt descriptors will
have default action handler installed - chained_action.
As result, chained interrupts will be silently disabled during system
suspend.
Hence, fix it by introducing helper function irq_desc_is_chained() and
use it in suspend_device_irq() for chained interrupts identification
and skip them, once detected.
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Tony Lindgren <tony@atomide.com>
Fixes: e509bd7da149 ("genirq: Allow migration of chained interrupts..")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
kernel/irq/internals.h | 5 +++++
kernel/irq/pm.c | 3 ++-
kernel/irq/proc.c | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 05c2188..fcab63c 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -199,6 +199,11 @@ static inline int irq_desc_get_node(struct irq_desc *desc)
return irq_common_data_get_node(&desc->irq_common_data);
}
+static inline int irq_desc_is_chained(struct irq_desc *desc)
+{
+ return (desc->action && desc->action == &chained_action);
+}
+
#ifdef CONFIG_PM_SLEEP
bool irq_pm_check_wakeup(struct irq_desc *desc);
void irq_pm_install_action(struct irq_desc *desc, struct irqaction *action);
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index e80c440..cea1de0 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -70,7 +70,8 @@ void irq_pm_remove_action(struct irq_desc *desc, struct irqaction *action)
static bool suspend_device_irq(struct irq_desc *desc)
{
- if (!desc->action || desc->no_suspend_depth)
+ if (!desc->action || irq_desc_is_chained(desc) ||
+ desc->no_suspend_depth)
return false;
if (irqd_is_wakeup_set(&desc->irq_data)) {
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index a916cf1..a2c02fd 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -475,7 +475,7 @@ int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
any_count |= kstat_irqs_cpu(i, j);
action = desc->action;
- if ((!action || action == &chained_action) && !any_count)
+ if ((!action || irq_desc_is_chained(desc)) && !any_count)
goto out;
seq_printf(p, "%*d: ", prec, i);
--
2.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* [4.4-rc][PATCH] genirq / PM: restore system wake up from chained interrupts
2015-11-10 9:58 [4.4-rc][PATCH] genirq / PM: restore system wake up from chained interrupts Grygorii Strashko
@ 2015-11-10 11:13 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2015-11-10 11:13 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 10, 2015 at 11:58:12AM +0200, Grygorii Strashko wrote:
> Commit e509bd7da149 ("genirq: Allow migration of chained interrupts
> by installing default action") breaks PCS wake up IRQ behaviour on
> TI OMAP based platforms (dra7-evm).
>
> TI OMAP IRQ wake up configuration:
> GIC-irqchip->PCM_IRQ
> |- omap_prcm_register_chain_handler
> |- PRCM-irqchip -> PRCM_IO_IRQ
> |- pcs_irq_chain_handler
> |- pinctrl-irqchip -> PCS_uart1_wakeup_irq
>
> This happens because IRQ PM code (irq/pm.c) is expected to ignore
> chained interrupts by default:
> static bool suspend_device_irq(struct irq_desc *desc)
> {
> if (!desc->action || desc->no_suspend_depth)
> return false;
> - it's expected !desc->action = true for chained interrupts;
Indeed it is. I missed that, sorry.
> but, after above change, all chained interrupt descriptors will
> have default action handler installed - chained_action.
> As result, chained interrupts will be silently disabled during system
> suspend.
>
> Hence, fix it by introducing helper function irq_desc_is_chained() and
> use it in suspend_device_irq() for chained interrupts identification
> and skip them, once detected.
>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
FWIW,
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-10 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-10 9:58 [4.4-rc][PATCH] genirq / PM: restore system wake up from chained interrupts Grygorii Strashko
2015-11-10 11:13 ` Mika Westerberg
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).