diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2015-11-10 04:58:12 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-11-10 09:11:31 -0500 |
commit | 4717f133736dec10605da9e29e707144c8d486df (patch) | |
tree | 183a0d10e42d7bbcdc36fa93041c82e11e6f7097 | |
parent | 66ef3493d4bb387f5a83915e33dc893102fd1b43 (diff) |
genirq/PM: Restore system wake up from chained interrupts
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.
Fixes: e509bd7da149 ("genirq: Allow migration of chained interrupts..")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: <nsekhar@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Tony Lindgren <tony@atomide.com>
Link: http://lkml.kernel.org/r/1447149492-20699-1-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/irq/internals.h | 5 | ||||
-rw-r--r-- | kernel/irq/pm.c | 3 | ||||
-rw-r--r-- | 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 05c2188271b8..fcab63c66905 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) | |||
199 | return irq_common_data_get_node(&desc->irq_common_data); | 199 | return irq_common_data_get_node(&desc->irq_common_data); |
200 | } | 200 | } |
201 | 201 | ||
202 | static inline int irq_desc_is_chained(struct irq_desc *desc) | ||
203 | { | ||
204 | return (desc->action && desc->action == &chained_action); | ||
205 | } | ||
206 | |||
202 | #ifdef CONFIG_PM_SLEEP | 207 | #ifdef CONFIG_PM_SLEEP |
203 | bool irq_pm_check_wakeup(struct irq_desc *desc); | 208 | bool irq_pm_check_wakeup(struct irq_desc *desc); |
204 | void irq_pm_install_action(struct irq_desc *desc, struct irqaction *action); | 209 | 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 21c62617a35a..84ab239a00e2 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) | |||
70 | 70 | ||
71 | static bool suspend_device_irq(struct irq_desc *desc) | 71 | static bool suspend_device_irq(struct irq_desc *desc) |
72 | { | 72 | { |
73 | if (!desc->action || desc->no_suspend_depth) | 73 | if (!desc->action || irq_desc_is_chained(desc) || |
74 | desc->no_suspend_depth) | ||
74 | return false; | 75 | return false; |
75 | 76 | ||
76 | if (irqd_is_wakeup_set(&desc->irq_data)) { | 77 | if (irqd_is_wakeup_set(&desc->irq_data)) { |
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index a916cf144b65..a2c02fd5d6d0 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -475,7 +475,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
475 | for_each_online_cpu(j) | 475 | for_each_online_cpu(j) |
476 | any_count |= kstat_irqs_cpu(i, j); | 476 | any_count |= kstat_irqs_cpu(i, j); |
477 | action = desc->action; | 477 | action = desc->action; |
478 | if ((!action || action == &chained_action) && !any_count) | 478 | if ((!action || irq_desc_is_chained(desc)) && !any_count) |
479 | goto out; | 479 | goto out; |
480 | 480 | ||
481 | seq_printf(p, "%*d: ", prec, i); | 481 | seq_printf(p, "%*d: ", prec, i); |