LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH V1] irqchip/qcom: Fix check for spurious interrupts
@ 2018-05-01 14:14 Agustin Vega-Frias
  2018-05-02 14:01 ` [tip:irq/urgent] " tip-bot for Agustin Vega-Frias
  0 siblings, 1 reply; 2+ messages in thread
From: Agustin Vega-Frias @ 2018-05-01 14:14 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Thomas Gleixner, Jason Cooper,
	Marc Zyngier
  Cc: timur, agustinv

When the interrupts for a combiner span multiple registers we need
to check if any interrupts have been asserted on each register
before checking for spurious interrupts.

Signed-off-by: Agustin Vega-Frias <agustinv@codeaurora.org>
---
 drivers/irqchip/qcom-irq-combiner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index f312659..7f0c0be 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -68,7 +68,7 @@ static void combiner_handle_irq(struct irq_desc *desc)
 
 		bit = readl_relaxed(combiner->regs[reg].addr);
 		status = bit & combiner->regs[reg].enabled;
-		if (!status)
+		if (bit && !status)
 			pr_warn_ratelimited("Unexpected IRQ on CPU%d: (%08x %08lx %p)\n",
 					    smp_processor_id(), bit,
 					    combiner->regs[reg].enabled,
-- 
Qualcomm Datacenter Technologies, Inc. on behalf of the Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:irq/urgent] irqchip/qcom: Fix check for spurious interrupts
  2018-05-01 14:14 [PATCH V1] irqchip/qcom: Fix check for spurious interrupts Agustin Vega-Frias
@ 2018-05-02 14:01 ` tip-bot for Agustin Vega-Frias
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Agustin Vega-Frias @ 2018-05-02 14:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, agustinv, tglx, hpa, mingo, marc.zyngier

Commit-ID:  1bc2463cee92ef0e2034c813d5e511adeb58b5fd
Gitweb:     https://git.kernel.org/tip/1bc2463cee92ef0e2034c813d5e511adeb58b5fd
Author:     Agustin Vega-Frias <agustinv@codeaurora.org>
AuthorDate: Tue, 1 May 2018 10:14:50 -0400
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 2 May 2018 15:56:10 +0200

irqchip/qcom: Fix check for spurious interrupts

When the interrupts for a combiner span multiple registers it must be
checked if any interrupts have been asserted on each register before
checking for spurious interrupts.

Checking each register seperately leads to false positive warnings.

[ tglx: Massaged changelog ]

Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver")
Signed-off-by: Agustin Vega-Frias <agustinv@codeaurora.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: timur@codeaurora.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1525184090-26143-1-git-send-email-agustinv@codeaurora.org

---
 drivers/irqchip/qcom-irq-combiner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index f31265937439..7f0c0be322e0 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -68,7 +68,7 @@ static void combiner_handle_irq(struct irq_desc *desc)
 
 		bit = readl_relaxed(combiner->regs[reg].addr);
 		status = bit & combiner->regs[reg].enabled;
-		if (!status)
+		if (bit && !status)
 			pr_warn_ratelimited("Unexpected IRQ on CPU%d: (%08x %08lx %p)\n",
 					    smp_processor_id(), bit,
 					    combiner->regs[reg].enabled,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-02 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 14:14 [PATCH V1] irqchip/qcom: Fix check for spurious interrupts Agustin Vega-Frias
2018-05-02 14:01 ` [tip:irq/urgent] " tip-bot for Agustin Vega-Frias

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).