Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0906042E430; Sat, 12 Sep 2026 08:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789202606; cv=none; b=ocYOgJystGlxUZjPdfHASPpirR+B0ipK6ghhR/W9k0nKA8T7txohDp8D9kPyGqY/pmAp0/fjbLLEBL57TVBXJuXZ4f+kwKW8W8ERUNhZmSMGYxGfpu8n7WzoslZ6is8JwmisG3Yuad8ljG0Y8sLMNRcXp3sWnBWuIABMOZiVme8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789202606; c=relaxed/simple; bh=FRKnJljoYDhQRSPeHHF9WUwPUrE6LaOLezHFOzPaFk4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tJNcgf7id91P4GtZxAaAKIjNaiVUuswtw+QVU/niyREJ63lByDnU98UuzlgA5t1uYrIovwJMl7uoTakPBDSkzkTFxtiMVPB2LcAiItxktyEPkpfoYYW/qaiB10DrYJMaD/AjAwqWBW5GsVjKXHEIPkaJIwkDEJ29cchS7RLygkw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0PepdRWz; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0PepdRWz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 648361F000FF; Sat, 12 Sep 2026 08:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789202604; bh=7CYsCuH6BmtKmigj2RiEOm2Um4O0CeaEtjTgg5vJ6iE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0PepdRWz/rJaRdZjxKjo+4MwPkrwu+DO1qCxQLqLNeb5ONBi1kkF6mdO7RHPyXwjZ t6+laVMxZYQctb/1v4LvAcQ5wWt/2DLp7ZDzEcqUFRuDgeOHOfEyNXR0+TolFdUIlK c1j4NDa+IUkoRUDXBiaJzUWi5Ico/iN6q+kEtdZg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Leo Yan , Yeoreum Yun , Suzuki K Poulose , Sasha Levin Subject: [PATCH 7.2 1194/1815] coresight: etm4x: fix wrong check of etm4x_sspcicrn_present() Date: Sat, 12 Sep 2026 08:49:04 +0200 Message-ID: <20260912065717.039151749@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yeoreum Yun [ Upstream commit 0e1cd4270b42a257c139165622091e1e8c7104a7 ] According to Embedded Trace Macrocell Architecture Specification ETMv4.0 to ETM4.6 [0], TRCSSPCICR is present only if all of the following are true: - TRCIDR4.NUMSSCC > n. - TRCIDR4.NUMPC > 0b0000. - TRCSSCSR.PC == 0b1. Comment for etm4x_sspcicrn_present() is align with the specification. However, the check should use drvdata->nr_pe_cmp to check TRCIDR4.NUMPC not nr_pe. Link: https://developer.arm.com/documentation/ihi0064/latest/ [0] Fixes: f6a18f354c58 ("coresight: etm4x: Handle access to TRCSSPCICRn") Reviewed-by: Leo Yan Signed-off-by: Yeoreum Yun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20260725113645.57519-2-yeoreum.yun@arm.com Signed-off-by: Sasha Levin --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 14bb31bd6a0b9..1e3b0344dc002 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -93,7 +93,7 @@ static int etm4_probe_cpu(unsigned int cpu); static bool etm4x_sspcicrn_present(struct etmv4_drvdata *drvdata, int n) { return (n < drvdata->nr_ss_cmp) && - drvdata->nr_pe && + drvdata->nr_pe_cmp && (drvdata->config.ss_status[n] & TRCSSCSRn_PC); } -- 2.53.0