From patchwork Fri Jan 20 00:51:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13109025 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 6CB4BC38142 for ; Fri, 20 Jan 2023 00:54:09 +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:References:In-Reply-To: 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: List-Owner; bh=oSg3OxPepVliVFMIq/D7B412EGVzd95N+iVS8XGdGtQ=; b=K6Rb6kgWiyzVgU iHpqJL/vf85gF8oSPZNZK4unh+K2jBBVWsuady2vL8pyb8VciekyCA+ipMfN7AjfjNwxtExDVEmu1 lNdOM7ijg7Y4qZCHbQvSKEfRstBCS6fLkdtdrWTCNv9udvrplt9LPopzjlFkzDPGXZZpaMpjUz8qT 0+WGLsosDQKAacXYHzc4lHfr+kXKvhHxEtSBTb/FIH46l7FePqGti63+dERcnHvsYtOtwWuWkhvEa NnJwGZXC/arKi2la87PPUb2wpEs2xGrVlE2B29iO6dCTHmg6MhHu9oK7HA9cVaOQvN1/HbidZHoFe J2WZMcr6loM3phIz4+8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfeJ-007of8-BO; Fri, 20 Jan 2023 00:52:55 +0000 Received: from mail-bn1nam02on2103.outbound.protection.outlook.com ([40.107.212.103] helo=NAM02-BN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfdr-007oXt-2A for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:52:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AblKEvfxAStJXuAJNMmLgDycCW8TOT+jIoQ4X5OL0FPbuExUUj8iV+OR6aPcBq4sfCUMPGHNpJLGwz26UvvRetE5DuiqtGVJ0b8BjkbbkOsvg4H/18dgKxlnDHICv4zcg9Z2h5UbTcgERnJ+6AsWy1Za+PqE4KilvTXyiPI4yXG/K0SuNfjqp+FmxtfTeISksVUxFQjBuqJyxRHDMVGNlXfjI+ZaqUIK5YlE1TSFZu7ybuC2M6S7iqlEd+KKg/SY0k6LM06PznT60cTBeIiiBZCJssQn7sszd9bENIGpJwNT7k5ZGXO/VMJnMKIZijdQgj7NVkFdbO8yf3pjWP8Ivw== 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=rYNG/1TvR0Mny2YukJyj0QN0R6woeU9kedLFvDm8v04=; b=ayIvb9R726Y1c6fWzVFqBKeAaLIfFXghjwJDbuwlhk+wqM/j/bKQTpnZBdA8JOIXEEw18r3rtLVQ/Foecv6QZrhHQD0Ax/8orjTtcBLn61lv8nBifcrlKdqyDTrRfhkGxaXKDgIqdwmCRdGE25tDWbPfiB1Wx/ZQhWrw6VunBJ3OLS7xZjnJ2aNpJwSLUIXjyCSNmtV14fMGDXiW4ooeELiEjB6Q9otqBcIu0UzNy/PxS4QkXn+CuLOuoTNZpZuqAOj9hchQwpgFj3jqdSXdaJfdmP/FUJSgSN9uGLM6h9q3dOANLHCK0t+RYtKh/8sSklqx6KtrIRxPhOpa70tWKw== 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=rYNG/1TvR0Mny2YukJyj0QN0R6woeU9kedLFvDm8v04=; b=GRES65NhDFR5QXmgTtv3uUDyAk9Ew0ns6sYAZO8wVJ0NnWTSG1W+UN+Wk8/F7ZViyXChuIIwWXQlZbbJJ+lmc66jeJZ8D5AqVC9R8zzjL98Sp6p9ZTuWR4HUJ24d0CnJ39ZQi/gTAbDExYbh00SFTKPGftL628YvLkyA9h01Sts= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SN2PR01MB2143.prod.exchangelabs.com (2603:10b6:804:d::13) by SN6PR0102MB3407.prod.exchangelabs.com (2603:10b6:805:11::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Fri, 20 Jan 2023 00:52:22 +0000 Received: from SN2PR01MB2143.prod.exchangelabs.com ([fe80::eef8:5973:baee:184c]) by SN2PR01MB2143.prod.exchangelabs.com ([fe80::eef8:5973:baee:184c%12]) with mapi id 15.20.5986.023; Fri, 20 Jan 2023 00:52:22 +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 3/3] coresight etm4x: Add pr_debug statement for Coresight component PID/CID Date: Thu, 19 Jan 2023 17:51:56 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: CH2PR04CA0008.namprd04.prod.outlook.com (2603:10b6:610:52::18) To SN2PR01MB2143.prod.exchangelabs.com (2603:10b6:804:d::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN2PR01MB2143:EE_|SN6PR0102MB3407:EE_ X-MS-Office365-Filtering-Correlation-Id: 54073a74-6fea-4be0-6d3b-08dafa8096ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5n0XfbKb12BKMaf7zkx3aNYR6s3x4ZWwAr2aVISw1llqcYTK1RhMB6MPhN4vofj/nrm2uBHqpFem0WAo7LUIkp8x+8CjwfYOi4/8YeoNLkEkKQHAsiPpwGQu0htRRAYbKIO3/UH17BsxFnOulRO8vteuWMJ5QQchMDnyOAm6oPZTn710fw7ryn9HjMkcJ26QKQDUAH0n6MhYHIaoNvOyp7fCA/vW5/iq6qfbo4hoSWJoldp/UfTQx/804xc8mb1HA+RRcT3vXfd6Mpey4wAO4g2K6N851lpKVPRG8zBRSmkLjKpSVicG57J2VafMIkVq9Xp5xxKZ8RIOtc1nS3rlVTKiqr3s/Tu2J4NlMAL5nKDV9QowbVq1tWdfeVaMf5NSORz86dyvPf+Q0nurQCKyZj8/WOXdUcYYMvZHVmMEhalvVF35UhTswoEZgmiy0U332sJYE6MInd8pXcnL40iiCnAUIz33O6L7JPbr94SOzhkZg4cz6LUKRvcB9c2qmcZ6c10cblM2x0g2SJfepafSZ8Q72uu6ntVFv6QaDacT+jn33fK5mGfKXFTfChz5flSx0X4Glr06kw05sJ5kbjrs9+UZnZG2JNZcPy99fvCvyuWNcm8HnIgcGcMe1/us4tIbYhxX32DLyS++ucZsVsC8iCYVc97G6HeMdFcijqf5m3SDlun9FtBunSnAc1O+JUsekdaknhD7ihCn9fRqMo81ZHBDUrEHlZfErhsJu363fhY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN2PR01MB2143.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(39850400004)(376002)(396003)(136003)(451199015)(26005)(66946007)(186003)(478600001)(6506007)(6486002)(6512007)(6666004)(52116002)(8676002)(4326008)(66476007)(41300700001)(8936002)(316002)(2616005)(83380400001)(2906002)(66556008)(38100700002)(5660300002)(86362001)(38350700002)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zSz4+ACXWUGeV+b9W/7/86n6+RYDMA9yoqOaJuWRBNw9DKzsI65q0GBfCptfDiY0SGDLvF9XNSAqIdk7UcC8sYJo0M6RGEff+2Ri7Oc33Q38DRFHaxCHxsJzxIljDgEcxKuxLHdEOb+V8VpPFyBN0RndLMFWXxq66zTpjKE0AdtkQRnIJ58pvUXbSs8PjMeqS7W3Ja40op4y/3zPFGCywu9+FDmOaFHKTvSk6/EOrdDVescPxYo9PwKW12jABiBXvZVHIYVnbLT4YJMAAprmNFQBBq0dSOB/vn+nGyE9/MDWRVIIz/3VOXItSlaGxnRzaXqv6KMG+PSdYAusR4Flcf95hlcBUhHg0OSlE7LDnJQxfgjtJDEbFe2lBhG/An5HhZyiUV3ZWDtTNnELJPVHsYWdn/Bifggr3IvouMMtjZdEnkesv7p13J6NyEjfEXcoZNf9Y39xFOPK+fDzwNZ7OWZYeEK8/mezcyWo5FErIfV0Y06csLyVqFyc3V3RP5YsBOcgR+OIPtSdog+LYlFn21zG2IBcP6EaXOK0KWKd9W3ccENDz2YEmg5iimJvSCyiLIr7NvGaKh7zHZ2OjrUwayUNaHXcrSKXLfMyOhK/Vvq088In65iRLVaLtdFZTJZhHDnWBe+8QFFD67gVGEosVdiM6CFXyOhlRuWE2Ey3TucEQsnOSki4dIExJjp/VLJZbA+LC1pAssIrSq4ahTrwQ1jaT6jQtajIjvjeglqhfZVfeKZAUoPlGkRcgOTs0dlq0+gt8ZQrogKlxB34dSfhqOM+q7nkezLZkeih/VBWXssDz7Z0PhrKq+E9YK3NfG8f4kFSvAXdDCIzhz/gt1yEWNZoJiMVN9Q626Wz5xvIDoPNlOajQoXP3JR7WZKYVf3WgjMTnMiTiJDMK1PxvLjO9JLiu3Vz5iqAEyLqHYt3p9Ghkb4Nxjpn3e1+T9LSwgqMx3bI3EULBDoPo7MRmE09pk3TNOCgEBLWpL/1AI1VHPiVhXNsw9ADN4GMEq2YWQrpjm41+/od7J1kvLBR/dThKcLfMFt9WKHDs2Ks98RbDWpVzRj1MOTYFTfq8C/p/mx2MtdgmlfImENWHSLSqYEQr7Xk0IYWjYaiXGkDpkkmHWw71pgy3UqD1giH4KXrPrhem8CfDy59Y7couXSaJxxezszwpDvSGUvrTpzW9Y4GVKz7eHbFULtYs1mxoGal8N2bO2Rd6ycgJBcswOG52x279Gj0C4Z1pm2ULTOuVcmfoLNluMS0Rid0+QHRRumD6wSGUPPfox06aQ4iow0lFSwrqtQxmIf+KdZm4FIINGcnCoynCFtNzcZwdxOXBM8zL4/ChG57XxZBWij0ZMg1ch2CloD6Pd3UdCa7heLRMf4iqky0oFxzZBXnf8mFAFN98CG3hLqCY+6m/nk19U6s698lOc56d+o0RVMSASVXNYgK5BmGjwAmP4XjKIN+ez+sBg59LjrPAMpns1djftLdxAg9CbUWuG+eb2+xtdarLrbmg0UaLSb5+MOp4j0H+HORav130Mf0nLyN74qHlOoFGvWlH9hOq5NiB8QsNkx7hW585Ky7CeVmKrH7i20a0kG/YINOgUYtPK5L7CiZ7iTXCd5XFieBwPx+bKeURu4WFWoeHaQBXv/b/xok1PMIPxRqvZKH X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54073a74-6fea-4be0-6d3b-08dafa8096ec X-MS-Exchange-CrossTenant-AuthSource: SN2PR01MB2143.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2023 00:52:22.5712 (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: o4xlJWUT55iaC6KVgAXh/Qf7jDh/H94ulLHsfTbyoS0qEnz3VCupeTNSvbgs0bNCknpo+y9MWsiqAdidkouVsRD3qLCx5BJza7+OIqMCiGw56C2JnqxgpyOT3IwuLtTA X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR0102MB3407 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_165227_129867_FB0AF998 X-CRM114-Status: GOOD ( 11.88 ) 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 Add pr_debug statement to provide visibility into Coresight component PID and CID settings. This helped debug an intermittent clock related issue resulting in bad PID/CID values. Signed-off-by: Steve Clevenger --- drivers/amba/bus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index ff7454a38058..7c432442862c 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -136,6 +136,7 @@ static int amba_read_periphid(struct amba_device *dev) u32 size, pid, cid; void __iomem *tmp; int i, ret; + u32 cid_addr, pid_addr; ret = dev_pm_domain_attach(&dev->dev, true); if (ret) { @@ -178,6 +179,12 @@ static int amba_read_periphid(struct amba_device *dev) for (cid = 0, i = 0; i < 4; i++) cid |= (readl(tmp + size - 0x10 + 4 * i) & 255) << (i * 8); + /* physical address as meaningful */ + cid_addr = (u64)(dev->res.start + size - 0x20); + pid_addr = (u64)(dev->res.start + size - 0x10); + + pr_debug("pid (%llX): %08X cid (%llX): %08X\n", pid_addr, pid, cid_addr, cid); + if (cid == CORESIGHT_CID) { /* set the base to the start of the last 4k block */ void __iomem *csbase = tmp + size - 4096;