From patchwork Tue May 1 14:14:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Agustin Vega-Frias X-Patchwork-Id: 10373995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E3676032A for ; Tue, 1 May 2018 14:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E3E3274A3 for ; Tue, 1 May 2018 14:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42781288EE; Tue, 1 May 2018 14:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA3572857E for ; Tue, 1 May 2018 14:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=nuQVrK6XMNGafObcMMzWHWyk85AiDFwe82Ri8SmD7CQ=; b=URT /Euu0dhqIwKKtzeOrG9eY1tVYscYOdrzMaH0zHIkJTATD+cfNQqU3gaFymYR8dv4n4Hp9bCGrMmSI Eewyd5XR5GQB3jdvbFqTaX3JhrjfExLfhCtS/Ay7G6vQn47in+R00cLY2dPeqdqSz795UEOXRAWLm VV8QthFx11JyTXgYNOKEDT/ibG4UumVnQJF6abkPormS8QztZbOm8X6ThwQuE0hhaIPnx3c3gZr7s g2yRpTmU27UHub9/yNtxqqxs4x/5nPxSAzwRqgSnHBRxSJgJOl2uMWHiQLf0D9eenkG6iiF7wqWpU PK0JXdA5tMoAfYSL6dgcNpzBxvJBtwg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDW4G-0006aC-RT; Tue, 01 May 2018 14:15:44 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDW40-0005s1-CA for linux-arm-kernel@lists.infradead.org; Tue, 01 May 2018 14:15:29 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 068E96019F; Tue, 1 May 2018 14:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525184117; bh=tuu31m7P4r0oVO/MxQbarWAZQX2/cp/Hdp71pfXluBo=; h=From:To:Cc:Subject:Date:From; b=SkyagupbTQgN++fvlNfmFfd/UOhcnLb3Y9+0Luhlqb5MyCWX9Jjx8tZi+ZfHKrkpC L/MsE/OGYj0uImu4q2rP0wjwI9F8wp1MDv43NmDa5kOx2gVMuMFoenp67k2XvkzLlu 78Ydj4jA3D1nfVxBw6tEWdHbeD22Pz7jimqECVts= Received: from azshara.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: agustinv@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8B42A6090E; Tue, 1 May 2018 14:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525184116; bh=tuu31m7P4r0oVO/MxQbarWAZQX2/cp/Hdp71pfXluBo=; h=From:To:Cc:Subject:Date:From; b=RmxVsTenaOQSMXfEPTX3o9j2K1jgJE/atrJ7DrPQxGjtUu6qF0pbCBoPUCphnkI1b gAcFCjFKtwZnkfKDf0Ra5aIB0TQUfXzfdhXqknV+KYjUZcOp+16+1uucPJ9gJDBEGc hGLj2hyeGuLzlqiiwgryF3ZdoolWBxilSkKQ+wW8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8B42A6090E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=agustinv@codeaurora.org From: Agustin Vega-Frias To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH V1] irqchip/qcom: Fix check for spurious interrupts Date: Tue, 1 May 2018 10:14:50 -0400 Message-Id: <1525184090-26143-1-git-send-email-agustinv@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180501_071528_491956_FA4A6A9B X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: timur@codeaurora.org, agustinv@codeaurora.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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,