Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1112481imm; Wed, 1 Aug 2018 10:22:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcOTrgyhiSzrFbzBcF+Qrkrhx3GFMJ5mo28BA/+rfDS4+udHRo47l+LaRa3V/QGLACr9PK0 X-Received: by 2002:a63:8341:: with SMTP id h62-v6mr24772381pge.298.1533144177675; Wed, 01 Aug 2018 10:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144177; cv=none; d=google.com; s=arc-20160816; b=T5J4vqOZke4dGirAokHTtK6GX4qWCTCyFjXmmDtB2c/gCreKLvQnzemHGDu5oHdJTT wtJ62EfM2I2cKE6Qhh0NPY3CblNbki0vjc2ch1KobT3O1hSSbtI0jgWkA8bTjmgHDVg9 j74dRGTeYXA05ZIF9mNgDLf/qhrNODT0yKMpK3siHKWIt4VaOhInZ6QzhBj3tOT91MRV SyWoFnza/L7G2lORUPmcuRDqc55iQ538C2E3KbMgohOL3s2sP40Cn9VKIIPPk5bBnAb4 saxu/X0ccCAubGn5EvLiRF8oQOxyhanLJ8u66WlbrwpnUWhPvlkoI4iYuXWBlKOIkmqV sPfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6J2wPaB6t1ZczyTlF1NkdT0CfQRxnTEhHRDjX5LT2X0=; b=ptrRZ1mi/pgmK3jPsvSuWrmCRvIfqn5ZmQ/S+3C8gLl8y0MULuSi/8G6+Ej7OsPmIX az5U4I2upPRCUM5P5rpAk80YbqFTWlhcRUirAwfdLw3N8nWrXdw69ZzA7Kw+tErzvQKz 4/13H038c9vFRA01OalqPuC7akBzgPpzg1DztS+TDzivXMR7p5oV/Bwyfwaj4MxQTr2y R4b7ZueMcA24iUxQhUjSNF+cZiNyWd6Cv3M+ytSqsp2Tskhfy1L272JNhM48yf5GAfdL SDDpnvS9hRdPapDZKDSB1ur3JbysGwQhN1uGTgxkokh99sniSSc43Gk6FDODR3Eqzddu 5TXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2-v6si16382638pgd.138.2018.08.01.10.22.43; Wed, 01 Aug 2018 10:22:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405048AbeHATHl (ORCPT + 99 others); Wed, 1 Aug 2018 15:07:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49244 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389699AbeHATHk (ORCPT ); Wed, 1 Aug 2018 15:07:40 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BB84DCF7; Wed, 1 Aug 2018 17:20:59 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Thierry Reding , Sasha Levin Subject: [PATCH 4.14 183/246] memory: tegra: Do not handle spurious interrupts Date: Wed, 1 Aug 2018 18:51:33 +0200 Message-Id: <20180801165020.479349086@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Osipenko [ Upstream commit bf3fbdfbec947cdd04b2f2c4bce11534c8786eee ] The ISR reads interrupts-enable mask, but doesn't utilize it. Apply the mask to the interrupt status and don't handle interrupts that MC driver haven't asked for. Kernel would disable spurious MC IRQ and report the error. This would happen only in a case of a very severe bug. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/memory/tegra/mc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -252,8 +252,11 @@ static irqreturn_t tegra_mc_irq(int irq, unsigned int bit; /* mask all interrupts to avoid flooding */ - status = mc_readl(mc, MC_INTSTATUS); mask = mc_readl(mc, MC_INTMASK); + status = mc_readl(mc, MC_INTSTATUS) & mask; + + if (!status) + return IRQ_NONE; for_each_set_bit(bit, &status, 32) { const char *error = status_names[bit] ?: "unknown";