Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1127774ybi; Wed, 17 Jul 2019 09:56:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqtgukbb0R/xpOrABMlU436h5bCDTDU259dfWK6ClLAVe/2tuRLQFYV9AknJYGQKOp9Wld X-Received: by 2002:a17:902:846:: with SMTP id 64mr44562069plk.265.1563382603915; Wed, 17 Jul 2019 09:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563382603; cv=none; d=google.com; s=arc-20160816; b=wN2zOcwh4XP9ipgMCZ+pP00OVyJ0c7IF5UR1rvFo2iXG5JkVmsnff8BnK6B1q6YUAz pcafCujSh+g2eOk4YWO9g58dQCBjBBUb5OJ2RoSMOJPAnEEPnFA0fDHTVEsvwvRKuVmS T0fWPezX1QyzNHOszfhfqRyhMJ5GYiYLEZ5H+7Otz8St72unc10SgvIki5pMV6/+RLLV pUDejjtReK3cwq216pMfrD3PYfEP/iA0570D21DbkbJdVTmDypff8D1E0Ej3+pC53aDH XzmUXKxn3MfG334EDArTiI0D6oVlal4sBlb1s4u+GyRfsLnGGJIy2DNxnG4eOR77A7qy Y4IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eRdvNNXf680pv7D/wawCnGMGaTK8ArdDiNd3rmgruSA=; b=zLUb6aZBxu7xXrmCKUYN/S9AB89syW82dIKK7kAxOhkblda2dLl1C8TEy1a3buCXne xbx29QJNLR1MTZFopPwl0rFAkkapIWPPcP3L4Uhr9U1amF8gDMkiEFNflO6cl/D20gPm 55AKRGU27EiAyjftddcHL6B1qnGeMuZe1OQLGK/mvNXiO9vmWVK5s4zntqiFFV+kt3L2 rp9zinQVELoHPl5S6+4dDSVVD1bXLideR2vyOIBDq/P9fqtRITXNCqcel5X9glquCgJD kAXZD95hN4ftUyfiU/1QhgFtHPnDlgiSLkPVCYV7IJ7TMYjKfOVsPIK6RoiwB6pq7KPM QwuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OqS301R6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si24160837pgb.204.2019.07.17.09.56.26; Wed, 17 Jul 2019 09:56:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OqS301R6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727278AbfGQQ4H (ORCPT + 99 others); Wed, 17 Jul 2019 12:56:07 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42209 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbfGQQ4H (ORCPT ); Wed, 17 Jul 2019 12:56:07 -0400 Received: by mail-pg1-f196.google.com with SMTP id t132so11434530pgb.9 for ; Wed, 17 Jul 2019 09:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=eRdvNNXf680pv7D/wawCnGMGaTK8ArdDiNd3rmgruSA=; b=OqS301R6mRNRehR4uGTXv0VV1/d8X2+7vTjX40IJdztlF7CzIMf3gdlKs4Pw1YDka6 ozi9wO9oZxUUrRGTzGu8Whn2pSDRIlKEGO2+krx+DRpJZCgP5HzdMRUQ0NbWIB416Yse PI6925mzzQHd1KpPXXFlWZbOgeN/4tsS1S/8ri6Nch+UPiWm+olERXNItaZK3AMI6gZa qAl2TeWVJuzYoOrbiBe2iYE3JaALmHSv3AKG0QQ6dxIUNqWCquBedCQfcfg0XPQgU88P OSsw1MypUZry4HI6b4AlYcPflWFVtpxhVp2/Wb9x5NhQd0PcJ3pKEX5QJ2MWssneAp8g jLiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eRdvNNXf680pv7D/wawCnGMGaTK8ArdDiNd3rmgruSA=; b=XYA5lk48Dnc104gE1vGn3vLO+t0Djm1Odut57z9keskxexd1FuOPsPOtkm1s+nkzSW Qw5xNkO2ndlldyrOdOIDPshByyf9HSYAMDAi3VH7DTPHo2t5OmetXxQrvOf/I5HLQ4/A x4NlYRMwpJ+D+ewZiEcggDW+deb0ps32GAfdjVZxNi3SVoA0dZ/E5lpTBe66wEoxRDUz 9Z/2N0SsKNHQH4PdWcLOV4c5OIQ5gfS14w6MyqY0pxd56chRUh0DSPMNOeKJjAkGm226 jN9os4cIXTW2n61pS/fnL7+LqTIAM4dDMH/bJhv1l8kbD+XBRl6PnMVM36dDpPg4Oqwi 340g== X-Gm-Message-State: APjAAAVmriq/mXxesQ8Dw6q6KJf2m3e6Ph4g81y1pXAxk4lkZBRPa5Dx Y/QHoT58UF93Thtg+pUlaCsvmw== X-Received: by 2002:a63:4846:: with SMTP id x6mr5659707pgk.332.1563382565821; Wed, 17 Jul 2019 09:56:05 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id e5sm30815070pfd.56.2019.07.17.09.56.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2019 09:56:05 -0700 (PDT) Date: Wed, 17 Jul 2019 10:56:02 -0600 From: Mathieu Poirier To: Sai Prakash Ranjan Cc: Greg Kroah-Hartman , Suzuki K Poulose , Leo Yan , Alexander Shishkin , Mike Leach , Rob Herring , Bjorn Andersson , devicetree@vger.kernel.org, David Brown , Mark Rutland , Rajendra Nayak , Vivek Gautam , Sibi Sankar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Marc Gonzalez Subject: Re: [PATCHv8 5/5] coresight: cpu-debug: Add support for Qualcomm Kryo Message-ID: <20190717165602.GA4271@xps15> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 12, 2019 at 07:46:27PM +0530, Sai Prakash Ranjan wrote: > Add support for coresight CPU debug module on Qualcomm > Kryo CPUs. This patch adds the UCI entries for Kryo CPUs > found on MSM8996 which shares the same PIDs as ETMs. > > Without this, below error is observed on MSM8996: > > [ 5.429867] OF: graph: no port node found in /soc/debug@3810000 > [ 5.429938] coresight-etm4x: probe of 3810000.debug failed with error -22 > [ 5.435415] coresight-cpu-debug 3810000.debug: Coresight debug-CPU0 initialized > [ 5.446474] OF: graph: no port node found in /soc/debug@3910000 > [ 5.448927] coresight-etm4x: probe of 3910000.debug failed with error -22 > [ 5.454681] coresight-cpu-debug 3910000.debug: Coresight debug-CPU1 initialized > [ 5.487765] OF: graph: no port node found in /soc/debug@3a10000 > [ 5.488007] coresight-etm4x: probe of 3a10000.debug failed with error -22 > [ 5.493024] coresight-cpu-debug 3a10000.debug: Coresight debug-CPU2 initialized > [ 5.501802] OF: graph: no port node found in /soc/debug@3b10000 > [ 5.512901] coresight-etm4x: probe of 3b10000.debug failed with error -22 > [ 5.513192] coresight-cpu-debug 3b10000.debug: Coresight debug-CPU3 initialized > > Signed-off-by: Sai Prakash Ranjan > --- > .../hwtracing/coresight/coresight-cpu-debug.c | 33 +++++++++---------- > drivers/hwtracing/coresight/coresight-priv.h | 10 +++--- > 2 files changed, 21 insertions(+), 22 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c > index 2463aa7ab4f6..96544b348c27 100644 > --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c > +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c > @@ -646,24 +646,23 @@ static int debug_remove(struct amba_device *adev) > return 0; > } > > +static const struct amba_cs_uci_id uci_id_debug[] = { > + { > + /* CPU Debug UCI data */ > + .devarch = 0x47706a15, > + .devarch_mask = 0xfff0ffff, > + .devtype = 0x00000015, > + } > +}; > + > static const struct amba_id debug_ids[] = { > - { /* Debug for Cortex-A53 */ > - .id = 0x000bbd03, > - .mask = 0x000fffff, > - }, > - { /* Debug for Cortex-A57 */ > - .id = 0x000bbd07, > - .mask = 0x000fffff, > - }, > - { /* Debug for Cortex-A72 */ > - .id = 0x000bbd08, > - .mask = 0x000fffff, > - }, > - { /* Debug for Cortex-A73 */ > - .id = 0x000bbd09, > - .mask = 0x000fffff, > - }, > - { 0, 0 }, > + CS_AMBA_ID(0x000bbd03), /* Cortex-A53 */ > + CS_AMBA_ID(0x000bbd07), /* Cortex-A57 */ > + CS_AMBA_ID(0x000bbd08), /* Cortex-A72 */ > + CS_AMBA_ID(0x000bbd09), /* Cortex-A73 */ > + CS_AMBA_UCI_ID(0x000f0205, uci_id_debug), /* Qualcomm Kryo */ > + CS_AMBA_UCI_ID(0x000f0211, uci_id_debug), /* Qualcomm Kryo */ > + {}, > }; > > static struct amba_driver debug_driver = { > diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h > index 7d401790dd7e..41ae5863104d 100644 > --- a/drivers/hwtracing/coresight/coresight-priv.h > +++ b/drivers/hwtracing/coresight/coresight-priv.h > @@ -185,11 +185,11 @@ static inline int etm_writel_cp14(u32 off, u32 val) { return 0; } > } > > /* coresight AMBA ID, full UCI structure: id table entry. */ > -#define CS_AMBA_UCI_ID(pid, uci_ptr) \ > - { \ > - .id = pid, \ > - .mask = 0x000fffff, \ > - .data = uci_ptr \ > +#define CS_AMBA_UCI_ID(pid, uci_ptr) \ > + { \ > + .id = pid, \ > + .mask = 0x000fffff, \ > + .data = (void *)uci_ptr \ > } I will pickup this patch - it will show up in my next tree when rc1 comes out. Thanks, Mathieu > > /* extract the data value from a UCI structure given amba_id pointer. */ > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation >