From patchwork Sun Oct 11 17:57:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thermal-bot for Julien Panis X-Patchwork-Id: 270403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3719C433DF for ; Sun, 11 Oct 2020 17:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C76F207EA for ; Sun, 11 Oct 2020 17:58:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rEM8akXb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KmCVLgmS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730322AbgJKR6b (ORCPT ); Sun, 11 Oct 2020 13:58:31 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:40228 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388512AbgJKR5r (ORCPT ); Sun, 11 Oct 2020 13:57:47 -0400 Date: Sun, 11 Oct 2020 17:57:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602439065; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BF0Ze4dvqMf0pTwdJ5HFaX1ph4Dhew8fG0GpRsWS0N8=; b=rEM8akXbI0/FmpUMJcoK7tv3l1aZC1d8K4qfKlKnKPT9pZIiUcHKCAGsBCLXHJteIEbcNT n1wotxb3G+ZJ4rq2GGWDeXijneTwWS/dVAQvNaqcZOdUlhIiB9sqqMZcPzZCbDkDUuUbA3 uEMFKoP80re4FHBjnEemth+F300NsFj1DDjBO6bm3RPXQ6a5uEf6Mjca44TRzVzWR3xOcA x70C3uOtCZ6PvcdDn5SgwBR+e/09hFzpX7QS2kTS5nxfNPy1t2oGj3s3thEV89LhHO/q9E 0dlExkTn9PwQOsLahLnRYn6EdBWL1THncgteRr8X+v8Qudu44JTM/yv5jjAOGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602439065; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BF0Ze4dvqMf0pTwdJ5HFaX1ph4Dhew8fG0GpRsWS0N8=; b=KmCVLgmSBO/DAYwKRzSoSFsD7gcUwUOExUCGmN+XjzhF1UE/pwB2CH1SnL2zXNKUr07RvZ rUYV8ybE5Z2+3fCQ== From: "tip-bot2 for Huacai Chen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/loongson-htvec: Fix initial interrupt clearing Cc: Huacai Chen , Marc Zyngier , stable@vger.kernel.org, x86 , LKML In-Reply-To: <1599819978-13999-2-git-send-email-chenhc@lemote.com> References: <1599819978-13999-2-git-send-email-chenhc@lemote.com> MIME-Version: 1.0 Message-ID: <160243906476.7002.12870041209542641118.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 1d1e5630de78f7253ac24b92cee6427c3ff04d56 Gitweb: https://git.kernel.org/tip/1d1e5630de78f7253ac24b92cee6427c3ff04d56 Author: Huacai Chen AuthorDate: Fri, 11 Sep 2020 18:26:18 +08:00 Committer: Marc Zyngier CommitterDate: Sun, 13 Sep 2020 15:30:11 +01:00 irqchip/loongson-htvec: Fix initial interrupt clearing In htvec_reset() only the first group of initial interrupts is cleared. This sometimes causes spurious interrupts, so let's clear all groups. While at it, fix the nearby comment that to match the reality of what the driver does. Fixes: 818e915fbac518e8c78e1877 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1599819978-13999-2-git-send-email-chenhc@lemote.com --- drivers/irqchip/irq-loongson-htvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip/irq-loongson-htvec.c index 13e6016..6392aaf 100644 --- a/drivers/irqchip/irq-loongson-htvec.c +++ b/drivers/irqchip/irq-loongson-htvec.c @@ -151,7 +151,7 @@ static void htvec_reset(struct htvec *priv) /* Clear IRQ cause registers, mask all interrupts */ for (idx = 0; idx < priv->num_parents; idx++) { writel_relaxed(0x0, priv->base + HTVEC_EN_OFF + 4 * idx); - writel_relaxed(0xFFFFFFFF, priv->base); + writel_relaxed(0xFFFFFFFF, priv->base + 4 * idx); } } @@ -172,7 +172,7 @@ static int htvec_of_init(struct device_node *node, goto free_priv; } - /* Interrupt may come from any of the 4 interrupt line */ + /* Interrupt may come from any of the 8 interrupt lines */ for (i = 0; i < HTVEC_MAX_PARENT_IRQ; i++) { parent_irq[i] = irq_of_parse_and_map(node, i); if (parent_irq[i] <= 0)