Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3299083pxk; Mon, 21 Sep 2020 10:01:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwRmlCAHel/V6VifSqiyiMFpr2T+zRufOU/cbfdBHY3ntsXvTCtGE+aEXiKI03Wqt28Bo7 X-Received: by 2002:a50:8e17:: with SMTP id 23mr640859edw.42.1600707716008; Mon, 21 Sep 2020 10:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707716; cv=none; d=google.com; s=arc-20160816; b=DMowFjEUxpDvYjMKt5s9v3FSyDNHJP5SfOWL6qf0hkcvJOogdFoZXM5Uu/PLcJONv2 Q5ftcSlPA+BIhdv4Vhnt6BDEchIu0tQls9Nm/LQ1zg7q+NPmkbKg30gO0aRUxdluxfIT zUvl5tCwOEIKHVf4+PkZfQ/I6vrYKp2RwN27mXz7SQ+XLVbovNUsm2F/82k+VuI47R7R +fPlZtUms4ENrtdt31fCqquH9EqqtooL86nZpKM8ivMO7s8YkxFBiE0OP29BVAVLdS1j j4tucwxnzclG3IOebDJ6zsewVjwlQ4qAXudsUYyBeJ1xa1AzILqnG2IKm3tjXrmyl9Jt aZ/Q== 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=Cvocwec/rFBAzroYdu7tGc8yy3b9LkA/OpqJwafcMGg=; b=IX+QMWEo6jC+XUSIw/lhKnoNDS+QeooYc9NekBYTQGX17wd7Uvoh2yw+DSVAlUIFqb +hv0UJ1D3wlNTZwBqnyg/ttSnVNnRK2YmupXMlhTSAxp1OHRCmX3+EMOBgdyb3eSl1yM a/bXOsTM+GRuVAeQpToGo3OTxqKkkjStwC9kSi8FTW3dGjF8ov91H7Y6NG/mK2vcgPRo Msg3wACfja78DhaEroYma9OWzPwbIYI9PfPRrjus99YdTiF2xI73YSRBhGjQ0OpnrzVG ZBwnWxfsBBJXyXVEkHC8fZM6xIkhgZQ65ea3tGhEFiFEY9qL+BShVIyw8H4uDpp9/JE8 S3CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Af2X8suh; 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 cy19si8895933edb.313.2020.09.21.10.01.30; Mon, 21 Sep 2020 10:01:55 -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=Af2X8suh; 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 S1729735AbgIURA2 (ORCPT + 99 others); Mon, 21 Sep 2020 13:00:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:42226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbgIUQjy (ORCPT ); Mon, 21 Sep 2020 12:39:54 -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 B55FB238E6; Mon, 21 Sep 2020 16:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706393; bh=d3XFlJeZ5FcVRMjyET295KfplhHWKUPA6e5DSv4GAcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Af2X8suhfAPqt/yPNONG66aco8uPnp+1Fwua2wy40FR5CFF8dzhWtZZGUCURRdYW0 RfzLE8VDF7v/MTsqzOyUPiEn+n79zB1svL3qvVKkf0fO5N/AZg3C5g+C1QVU/JzpNE Xp2/9kebsnb6d6yQSVrawsobTuBtYpTgASP5oQFI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 4.14 81/94] MIPS: SNI: Fix spurious interrupts Date: Mon, 21 Sep 2020 18:28:08 +0200 Message-Id: <20200921162039.248792513@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@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 f9407e1704762..c6af7047eb0d2 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