[PATCH 4/6] ARM: OMAP3+: SmartReflex: disable spamming interrupts
jean.pihet at newoldbits.com
jean.pihet at newoldbits.com
Tue Mar 13 06:26:19 EDT 2012
From: Nishanth Menon <nm at ti.com>
At times with bad SR configurations, especially during silicon bring-ups,
we could get continuous spurious interrupts which end up hanging the
platform in the form of an ISR call for status bits that are
automatically enabled by the hardware without any software clearing
option.
If we detect scenarios where ISR was called without the corresponding
notification bit being set, instead of hanging up the system,
we will disable interrupt after noting the event in the system log
to try and keep system sanity and allow developer to debug and fix
the condition.
Signed-off-by: Nishanth Menon <nm at ti.com>
Signed-off-by: Jean Pihet <j-pihet at ti.com>
---
arch/arm/mach-omap2/smartreflex.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index dfe8075..8a10c0a 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -223,8 +223,25 @@ static irqreturn_t sr_interrupt(int irq, void *data)
return IRQ_NONE;
}
- if (sr_class->notify)
- sr_class->notify(sr_info->voltdm, value);
+ /* Attempt some resemblance of recovery! */
+ if (!value) {
+ dev_err(&sr_info->pdev->dev, "%s: Spurious interrupt!"
+ "status = 0x%08x. Disabling to prevent spamming!!\n",
+ __func__, status);
+ disable_irq_nosync(sr_info->irq);
+ sr_info->irq_enabled = false;
+ } else {
+ /* If the caller reports inability to handle, disable as well */
+ if (sr_class->notify &&
+ sr_class->notify(sr_info->voltdm, value)) {
+ dev_err(&sr_info->pdev->dev, "%s: Callback cant handle!"
+ "status=0x%08x. Disabling to prevent spam!!\n",
+ __func__, status);
+ disable_irq_nosync(sr_info->irq);
+ sr_info->irq_enabled = false;
+ }
+
+ }
return IRQ_HANDLED;
}
--
1.7.5.4
More information about the linux-arm-kernel
mailing list