From patchwork Mon Feb 27 23:54:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13154314 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 739E3C64ED6 for ; Mon, 27 Feb 2023 23:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pXQJhf87p9kRX3Vl9rDSXOXdW1F0r1AujfrRFUQKTOc=; b=sM/T1kOur37L87 Ceiw9NeO+b1REZ7kTynAVbZDivSFvmV/x2rGPZQLVERT7XzupLlvtcSzB+D1gOpNed2Du1TMxdKIl zanLa1OYVc4EeG1hxhWXy45iMyDFEAcTMqi71m9y4kAypN5FL+/6QVTdiii62ueJmmEHDWuqWdn9A ISuURvWhexAgyDG1A009MiltrEqqe6MIw3A6iTX614CoIALOUZr34Jf++tZf6F0L7rySrZUemTq6f qkZA9Y3JVBbANUHZSLnBrXw/ivzf10jTUjNOOZAsGA//uH5UWCp5UVqf2sbajwEnNmHOpsUzsRb5x 5B5C2NbQxxbGMU7QOfig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWnKl-00Barj-R6; Mon, 27 Feb 2023 23:55:07 +0000 Received: from mail-bn8nam11on20700.outbound.protection.outlook.com ([2a01:111:f400:7eae::700] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWnKj-00BarP-6C for linux-arm-kernel@lists.infradead.org; Mon, 27 Feb 2023 23:55:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aFM/LWTI4KiZEaDV8DtwGT4K37hNGitqUS/ie/aneRPy7srBvYE1eghv0uGH2oUxeotr8MFl3lhHdm9PpdXbqmayNjkrAHfb5cAJaTngaB97mVuqBEM8KuHciVl8Nvv7MFxxg481zZyUCUt5aYNzt4d14SuSaYto/C7I/N0/x2Qg+CIwPPQP3t0ARB/tE06lKMG0U7xFKNLd+WP4/YrGYhtEH6UElg+KMgsg7k83j0kevdSVwdDCGp6xSaplydUS+7R2+GDO29ksp9l8waVHH1FHCRwWUSA87LiIrOy9hHM5tD1JP50SclT6iCjekulm1pa8do+Yp8Dn7J6Nd4NOww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iqzMJBbKsxoIib2hd68WF4T5qolwZvhPyLqSnrPv5zo=; b=jpS+YgkVn0lIM91lPC7c9fohuaCgUKl54RQbONO4lDHg2TJNHjoiKbPq15HdRHncc701G+yX6493+Tvqm38s7u8Bl46OqMz5ouMvZ2GMlK2O87kFyZnewBOtltXMhJKtgCiobsVbUBXBuBHgvjDmFfRm/gJ1dKlZ7G7nFHwPGdFYlmlmlQq31puImehniKzAW7RS1JK80ezJIHVzWZ5xLB6j57zSH1RAErLJPfietACugBpImRHgvlkp7AaSdUw+2bIXau0OhhhHG37pH5sMfBwAkv1wJw8GWGak/a36LkY5L7LwSYGWb3zi+ZmNpoRfT4X5FojtgmDD+BW/16lVgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iqzMJBbKsxoIib2hd68WF4T5qolwZvhPyLqSnrPv5zo=; b=iL7A0qTX1yObQMUiCUsf4eGUaLhFVx8bPiszHCJqcxLsAIKFFMxUSvcD32SCUlNauzSnvjV6YK7lR4r5ybd/ns9uf0Luwsriykw6W/QanI0uqQ640HahqgS/TIXwcrMreUxKNlbpx0Q/o270q+WjJn2683AASXDVGgK95qkjb/Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SA1PR01MB8062.prod.exchangelabs.com (2603:10b6:806:335::13) by DM5PR01MB2252.prod.exchangelabs.com (2603:10b6:3:8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Mon, 27 Feb 2023 23:54:58 +0000 Received: from SA1PR01MB8062.prod.exchangelabs.com ([fe80::fb0b:d681:8228:bd50]) by SA1PR01MB8062.prod.exchangelabs.com ([fe80::fb0b:d681:8228:bd50%6]) with mapi id 15.20.6134.027; Mon, 27 Feb 2023 23:54:58 +0000 From: Steve Clevenger To: mathieu.poirier@linaro.org, suzuki.poulose@arm.com Cc: mike.leach@linaro.org, leo.yan@linaro.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug Date: Mon, 27 Feb 2023 16:54:32 -0700 Message-Id: <4a4ee61ce8ef402615a4528b21a051de3444fb7b.1677540079.git.scclevenger@os.amperecomputing.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: CH2PR10CA0019.namprd10.prod.outlook.com (2603:10b6:610:4c::29) To SA1PR01MB8062.prod.exchangelabs.com (2603:10b6:806:335::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR01MB8062:EE_|DM5PR01MB2252:EE_ X-MS-Office365-Filtering-Correlation-Id: 82c9b492-cdcc-460b-9ea2-08db191e0802 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EG9Ve9p/uRvs+QlkXwtjB0DSx/cPD1OzOzDuXa9F9UNXFqS9RGRXAatPges9eGhPGfTHN3A2kVuhYrsD1uz7ihgGvGCn/jCco1EhjmG9x237LZshMRYV7XetTr6yi5Z/3FLTqtyzRRMALM3o56TrlsREEZnCWIIhqclpQya6O7Qg02eq8Nzk+ccVKd0XlWADfV90L1t2nhbh040LjUc8+Kel9Ux0jHpL71NwyS/Dah1qq/ntg8RuuhNN7c9F1yFAxAb16hTLtbyDOIzgexFddBdMf5+AeZtdwz5/Hi1uoOq0NpdAP5ga/zesNfAplP0qH/17xMqkyIcIvTVb8BtTxgDdMAWMgyEVY6Rt5VrbmuNmrwQuwuVdtM8G84wOP/A9sbMJccQKkLdBrQ7lOCHj5rkhveXhjUvCDeNl1MPnzLfPSNj9y5IeHnU1wJjkQMjSMftQTT3++OvFLXj2VrdQfP2JnWOv7PalpB6y2SQMGio+Ph9AXIN9egifodveLCdQjI2p0xcPmRlx8VprOh7V8RBzqURc7MTXdDG2Ov7WN+UteoWX23rlv+A0Cy4sOCeXv2nqxVvN8Nm3rRobw1HnBqkoeLnxQMCOHWPed3aU8yMyv5mK8NysU/tVQX5c8uWiWwkBXj26Y2RWCeU3i+3WgMYR2BlJ9hS7C0YJR2NFzXOmocKTcmUGF2MBx5hTQoaJDpws7DQ1i+wtjbOiv1//Wg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR01MB8062.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(376002)(136003)(39850400004)(346002)(366004)(451199018)(83380400001)(316002)(52116002)(6666004)(6486002)(6512007)(26005)(6506007)(478600001)(2616005)(186003)(8936002)(86362001)(41300700001)(5660300002)(66556008)(4744005)(2906002)(66946007)(66476007)(38100700002)(38350700002)(4326008)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E1BU09HcvkxtBwVQcH9FNz9rCPuqBP3Px5+zC7CfWmOsaWczO7VISTJr65/d3X+mMyGt1d8kzancT0tg65Ef/SCsAzq+Sz6i1w4pgoTeTXTRQXK2aY6Y7D9w0tm6ilDUN4sFsUp11YYKzfVLuLza8TbWO/s60pO2dDAulTd4+RB7C+hqApGObJ4QFdds69goCNx31HTmxwoUIwu6Jf9Be40bVvI5f9nZm+aJEAW27R/s6yH7sPsLV/glUMh+YN3GwlFzCWGJhRBWXLKGEhejPbMTvAW/hJQM3WsjdEJI1qybnLuBXVk+yU5n/Kxll8QpzgBaLcOaC/baMuby9Hq9meUJwb+UOTFz7T7pftKJA51+GHZOe2+tX5vCn3c8Pl/u7PkEXn5Z172LBz3JLsuvxGVngrFKFQFjDCUP01Hfu+uqzK5dRHPBVgYhY30sjG8M8r3EHnJdb505gWG9Duvclg4NW73xnEan6/a4HG5RdLeRnj9OE6aBqg5/SW2+Au0P77/DNdmUvNo4REx6TLLNLi0LgP/Pg9Oaa7i6K8ZKxoqcvZDx5Zvjwl6Vh334nMxDNDSN8W11D/kr6dcTNpJ6oGdHOXuZrky580UkCTrHgrqGuJ0AESkzpcbzYifTlHJK7aknISiEfKTkrxF4PHndQUzEt4begefyCwAWw5ULhx7s/7sPIc4lluNdE3GbQE9tX+dWQgr8DmlIIGEj1RkzsXfjx9K8Bkdf0dO3qIJerCZcoL8nxkmSUMnlK2PqlQx+Hh1kwg7/ysxSJ+pI9fOnvV8cP4WJWYRK3uOzBA0Na4cC1z6J1UcjGa/McDIJOdFgpNS7VRX95SmgVxrc9br2KxbzdJe/Yt/pEYtXgITzWaZMU20xrzm9elNK46afNuRgWOLJmVOsaiXNaRl++VoxI51/PKC1JL56ExOy8Dj+wn8vNVt2KoFtZs9vtIY39fVMkVV4i57FdOkXc5BbEJCINC8mhV3KSHIf4N00BCQ4gT8LdY7NTUqPGqlG45gWRNs8CrX4oMlvRPBCJ0mr6BBGZENpH5a5OUuO6KZt1kvfnvi/CvgjaVb4AsG9wnGjIWB09MlLJOpeJDm+53oO4ztdiZRorbI8XdhLv9Zr/MHuXbByPMS3TiSUPQsiNN773UZDFRy6NZYA8Wj4JF3eP5qxz0fhq57stkxajj9pPPFH8QYfVsinAk/E+i7LhW68xdd3FGcNiuq734feisOBxTgWWD3MjoZD3HZJ+fMjJWWR424XuDc2s0Ji495edQzQ00tigbjbOzyGy3rE5cwvL4fTtXrGY3yR6B2cG+mMIguUcKn4KoMXHgRsrOna8dE6rGgY2v3kPipLAbMP6yT4G2lQaj1C8bk6vTT/3+4RcQyLRE7ppj78Bn9xb90cYFXsyXUPIpxdqcyyT2dPvdpWkINJhq0ADxIof/3vZ5+Tnf5fx56zThw11FRAuw7eVQzIbTpl97UqssHiaSX5UXBLrbu8Nlhi/oqJgr+lOiIRkR3spWxsOmFSEXwJcU2/pS6MbKrsNshZyXRtrzKC1vkiVktBmnuforctjH1kcqOxWpktISfcGYN2XcRCmxZxqoUrY7mNJ3HPq6l8yHiBcuH6VJ/RoJrwZWl3eO6uUG7rO53vKcEj6P0789x7YYGVS3Ad0ASf X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82c9b492-cdcc-460b-9ea2-08db191e0802 X-MS-Exchange-CrossTenant-AuthSource: SA1PR01MB8062.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 23:54:57.9034 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QCjKrGppvNiQMmh6HLdSVnw4mMGrEX/VkRpfOUsXodYta4YHoO0OEPQFCx1NIdKPuQZaEE3xpkWBPiOoQ5ufsSF4zKUSHsU0OhGv6ETC1MQ1t+fiEX7LgJn+/dWe+Tzb X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR01MB2252 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230227_155505_475462_9045B174 X-CRM114-Status: GOOD ( 10.42 ) 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 In etm4_enable_hw, fix for() loop range to represent address comparator pairs. Signed-off-by: Steve Clevenger Reviewed-by: James Clark --- 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 1ea8f173cca0..104333c2c8a3 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -472,7 +472,7 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata) if (etm4x_sspcicrn_present(drvdata, i)) etm4x_relaxed_write32(csa, config->ss_pe_cmp[i], TRCSSPCICRn(i)); } - for (i = 0; i < drvdata->nr_addr_cmp; i++) { + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) { etm4x_relaxed_write64(csa, config->addr_val[i], TRCACVRn(i)); etm4x_relaxed_write64(csa, config->addr_acc[i], TRCACATRn(i)); }