From patchwork Thu Aug 22 03:33:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13772597 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B519C3DA4A for ; Thu, 22 Aug 2024 03:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ndIYElBQiIJRlNA+Rhfq51L3EXZRYJO3yC/l/ICB21k=; b=BaIZ8YfIsGH/cujowlyxO76+Q7 NnB8H2qqNzfe5GkTU3uz2X3YReJJNXlz5MvM9igrXwtPa3ZDP2EONQriZCPzq3OYzLnsbj8IwDcJH 0z2TD9yX+uEh5khgqQeOv/rOopqtRpOlQFmgY1KOyK3H5gOheWVPd4VchkQiK3hs7hJ/zX5XP4Oss zurmV2yEd7NxGc7PBL0Vs+Iiq7zZ3nf9t43gRFaWJbV82kxw6Q5k3yhPtY599t3GCYaBG8Hrcms4i chgttTKqeIwkyw9bUlvrhv7Yfk6MGhIunEsQlZf4xQrWQa857DKDAtiliuvSRB1pfSSVXH3v4rr1N R75jzGCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgyb6-0000000BDof-3dFD; Thu, 22 Aug 2024 03:34:52 +0000 Received: from out30-97.freemail.mail.aliyun.com ([115.124.30.97]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgya0-0000000BDa1-1hdq for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 03:33:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1724297619; h=From:To:Subject:Date:Message-Id; bh=ndIYElBQiIJRlNA+Rhfq51L3EXZRYJO3yC/l/ICB21k=; b=c/0c9aussY1FqonsOdbgGVF7EGsUR5MzXj3x/PPtU8KmPrfesLdZXn3x+y8l6ffFgy1DKtcckrTRPhjmXwf+0cfjMraHshAeLifSkR/0j7xLayFbpnOSRdpGMCJghr9NoivLAoa4jNn3N5+x+2FQd/grYJKez9GNlr/Ul3Iu+GM= Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0WDNiHbD_1724297613) by smtp.aliyun-inc.com; Thu, 22 Aug 2024 11:33:38 +0800 From: Jing Zhang To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Rutland , Will Deacon , Shuai Xue Subject: [PATCH v2] drivers/perf: Fix ali_drw_pmu driver interrupt status clearing Date: Thu, 22 Aug 2024 11:33:31 +0800 Message-Id: <1724297611-20686-1-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <2a70eaa3-f1c5-4803-948b-4b8eb86190c6@linux.alibaba.com> References: <2a70eaa3-f1c5-4803-948b-4b8eb86190c6@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_203345_128867_DFCF2A86 X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The alibaba_uncore_pmu driver forgot to clear all interrupt status in the interrupt processing function. After the PMU counter overflow interrupt occurred, an interrupt storm occurred, causing the system to hang. Therefore, clear the correct interrupt status in the interrupt handling function to fix it. Fixes: cf7b61073e45 ("drivers/perf: add DDR Sub-System Driveway PMU driver for Yitian 710 SoC") Signed-off-by: Jing Zhang Reviewed-by: Shuai Xue Acked-by: Mark Rutland --- drivers/perf/alibaba_uncore_drw_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/perf/alibaba_uncore_drw_pmu.c b/drivers/perf/alibaba_uncore_drw_pmu.c index 38a2947..c6ff1bc 100644 --- a/drivers/perf/alibaba_uncore_drw_pmu.c +++ b/drivers/perf/alibaba_uncore_drw_pmu.c @@ -400,7 +400,7 @@ static irqreturn_t ali_drw_pmu_isr(int irq_num, void *data) } /* clear common counter intr status */ - clr_status = FIELD_PREP(ALI_DRW_PMCOM_CNT_OV_INTR_MASK, 1); + clr_status = FIELD_PREP(ALI_DRW_PMCOM_CNT_OV_INTR_MASK, status); writel(clr_status, drw_pmu->cfg_base + ALI_DRW_PMU_OV_INTR_CLR); }