Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3290102pxk; Mon, 21 Sep 2020 09:48:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqR44jDIsnKTCPn9+xMBQP+aLbgdZhT4aVNhaqHQ5UGRdZBkMQWvG5hLEm6EndFq+aeRgr X-Received: by 2002:a17:907:b0c:: with SMTP id h12mr321755ejl.115.1600706934794; Mon, 21 Sep 2020 09:48:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706934; cv=none; d=google.com; s=arc-20160816; b=f6x/b9foTE8ZuguPy4pp3SzuD2x2+XcfBH5ijcRzvnDRSQsSGKxie0+DZ2Yc5Dc/Cn yIm810Y7/Q1G7cVG9cNMzIhwpI+5BoBm7RkM/zlvItqyyaPQpG+AzVzDv/ZA0VRkGHNy zqYSU6/J3XNx3HZ1X+4/WWheZqsKCa4iwo+8Iok6pUmXPYAMkGb6QEWOGavzlI07bKzL tN8OfP163+Dco4qBFXGA1uZKS1+jmKucVZYbCHScNIsMFud8t1vgGDdKJ2DYeQiHeSa/ lemJvnWAV1FF71X6U0cBqOUmWZ8RPRIFxtz8FjL7nY2uLToBC/TUhc0l7b7M/84AKuE9 3Jpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K5WQ2nimtxciOMntmt6HUuSoxVhgcIiUyfIvjWWPTR0=; b=I9lhVJtYY02AaDGPRxUZg5c3rXKBF09KphziilyLnor8nc1ikyTtc7KvRn0yGjviAN jDIg7T6seNhasMWSc/j7F0rTxzk7CddDoWOKeLwezTi4iIn6DAX+LqEEpkWmcc/VnivH UHHSM9xkXAF1byEVnkc2E85KJPfppXUPZHww1CrFmtJRBXvRLQYcjYd65APCceBnwktQ We+2JvBbMNR1+c1xHb9ixK4FMH5vqVC5TXcQUdBl0ZsKibm0ZT5xKCe1upSlbD+ny1Qg WbqD7kUromLwDfTRDdN3u2qnRaZ0ytJtnRGV2vk1lJLMwYy5r00Y4w0oCkrAHL5KOIxh 5x1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HhlmQu+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si8547163ejr.574.2020.09.21.09.48.31; Mon, 21 Sep 2020 09:48:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HhlmQu+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729404AbgIUQpg (ORCPT + 99 others); Mon, 21 Sep 2020 12:45:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:51092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727786AbgIUQpR (ORCPT ); Mon, 21 Sep 2020 12:45:17 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 993C523976; Mon, 21 Sep 2020 16:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706716; bh=uxn+vifcUCbs6sUzwHZTXL3zOxxnZDWfueru5hSQy5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HhlmQu+bhalCouapldiXXMPUaRVnGUrHLJX4Mw1f4M7kc8RrPJYFOVCuAwRo6CBOw rUOebt+MsmyXuBvAeKfo/UDy+IcCt/+4ArBG5mf3c3oc34Wr2eXHXuI1sUwcfaVqMb Rq1llMX5XPSt4xAj0x5HlNoBbI7icXEnVGt+3GyA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.8 066/118] MIPS: SNI: Fix spurious interrupts Date: Mon, 21 Sep 2020 18:27:58 +0200 Message-Id: <20200921162039.418633195@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Bogendoerfer [ Upstream commit b959b97860d0fee8c8f6a3e641d3c2ad76eab6be ] On A20R machines the interrupt pending bits in cause register need to be updated by requesting the chipset to do it. This needs to be done to find the interrupt cause and after interrupt service. In commit 0b888c7f3a03 ("MIPS: SNI: Convert to new irq_chip functions") the function to do after service update got lost, which caused spurious interrupts. Fixes: 0b888c7f3a03 ("MIPS: SNI: Convert to new irq_chip functions") Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/sni/a20r.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c index b09dc844985a8..eeeec18c420a6 100644 --- a/arch/mips/sni/a20r.c +++ b/arch/mips/sni/a20r.c @@ -143,7 +143,10 @@ static struct platform_device sc26xx_pdev = { }, }; -static u32 a20r_ack_hwint(void) +/* + * Trigger chipset to update CPU's CAUSE IP field + */ +static u32 a20r_update_cause_ip(void) { u32 status = read_c0_status(); @@ -205,12 +208,14 @@ static void a20r_hwint(void) int irq; clear_c0_status(IE_IRQ0); - status = a20r_ack_hwint(); + status = a20r_update_cause_ip(); cause = read_c0_cause(); irq = ffs(((cause & status) >> 8) & 0xf8); if (likely(irq > 0)) do_IRQ(SNI_A20R_IRQ_BASE + irq - 1); + + a20r_update_cause_ip(); set_c0_status(IE_IRQ0); } -- 2.25.1