Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4655721imu; Tue, 29 Jan 2019 05:26:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN55v1zjFjbd655CoIcCvZarVPkDEtXE0x84fDbUBDqeLqxcz9NvD7vnRZmkSqM2BQX2rj9p X-Received: by 2002:a17:902:820d:: with SMTP id x13mr26792137pln.229.1548768360601; Tue, 29 Jan 2019 05:26:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548768360; cv=none; d=google.com; s=arc-20160816; b=mBdQn1UwSoZHg65NxVlDWl/oOQHp7DAYdmZheF8taGS8I/VjjtJTJiSR5tdBDx2ju6 oKOdr40KXzHLNHd0tsbq9QX5q45j8dCTkdgn+5HwRe1ATif6uJKisFhR/LapXfslRpuF U++DZDQJC+BI+Sal02eo4uJNttZ1JTx5QWMr2eO1lK/3aa/ivaYHzxgB0+Fk0zSud+Tr 3gYPqulnHlXWMyEo5Qn0FkoM0ryR9CCsezWnqiivAiSToueg0bBDyzOJhEEW7m1mBgh/ uCjysoMks8NoaFnJxICVx0r27IsRZ64LsDORzWNrpuQaXQBLLONCLIjJWkCIdkCgjXJe Bn+A== 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=XGbd9FlQew8gsGNv/Xgm9xhO0xmJWMowaC4xsZZP7yY=; b=lcQ9hMuSzgHYJqq/IAm4OYd86kRdD36ANlt7KJxKVrjgWOSSQ1RTvzK1cmxTxeUaKn 7iV994L3mih3SPMgRFkqMI80yJw/A+2ixIPU7oM8rlKuchAieM1LUOwlDAIP052YF/D1 7DFAFa+W5r2IJ/AIUur1qpHAQfumYD11sL7xc5o4jMy1a7ITMbBPXiMCwHLRMol+cck0 PUuQtF/CuRQXafUQELgArKK8getd23INt6RC6MvvfyOQDdqK+rC8nUk5s7IHEJQMAa4k urX+pEk8WCtRHF7gWjrTwwyP091GOL9zUwU18kW8M5o9L/t3XVb5gg8EfreqVJpEMxiJ WMCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cxn0TIWB; 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 d13si26792193pgh.196.2019.01.29.05.25.44; Tue, 29 Jan 2019 05:26:00 -0800 (PST) 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=Cxn0TIWB; 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 S1727323AbfA2NZi (ORCPT + 99 others); Tue, 29 Jan 2019 08:25:38 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39188 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726390AbfA2NZh (ORCPT ); Tue, 29 Jan 2019 08:25:37 -0500 Received: by mail-pf1-f196.google.com with SMTP id r136so9664021pfc.6 for ; Tue, 29 Jan 2019 05:25:37 -0800 (PST) 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=XGbd9FlQew8gsGNv/Xgm9xhO0xmJWMowaC4xsZZP7yY=; b=Cxn0TIWBAsHYOlURpxDsg/3ERpvMc8OhoR8R9OUUvx2FeE0L65jyWLxTa5+4Q6pWV1 tuTQSIJoT58Q0KnBrhc7+AldTeCT98GMMnagr4K2dlc6SDu14Oj9b88TgRSe2B8ZRRGv hK0cwUsQTgLzqn6xL64dkDJDKAN8zfkGkUVnE= 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=XGbd9FlQew8gsGNv/Xgm9xhO0xmJWMowaC4xsZZP7yY=; b=e0dPMWwagtafrofxC8Z+mH4AN4SKd0LdN/rmWJ8Yx6p9JWepyQpp0aAp76HtT6V2f0 M2VRbS1OUECYySvYlSxIgBAQWVRdrxxk8MPEalnUzgNCRLrWumq/D70vFxKeWe5nGxGE 1lchxBMKZgMIetig542/hBjUCaG9JBrrW2W86XpBjI+NXx6vVK9zR9FEFc3y4MBeA/eq NHNMwHcDVEoMtLAccAKcMrUPjB7eizOF4ZXOYM4BpyTU3reH3kZoAUFDVnZTJuZ6U6P0 VQnanQvpPp4Ge6oK0JCJoXNLgpI4lZLzoh4g796/GAWN/k9yzxHBBHoR/7QFd187zmun 2mjA== X-Gm-Message-State: AJcUukfNP9gJs2MJuVyzDHo/8PI/tsQBPdD9MaVm447z+nGKgju6AWYl ahPUCMoz78buuQJ+DmUh8CC1prBPn/k= X-Received: by 2002:a65:624c:: with SMTP id q12mr23764054pgv.379.1548768336816; Tue, 29 Jan 2019 05:25:36 -0800 (PST) Received: from leoy-ThinkPad-X240s (li569-141.members.linode.com. [192.155.82.141]) by smtp.gmail.com with ESMTPSA id v15sm44146419pfn.94.2019.01.29.05.25.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Jan 2019 05:25:35 -0800 (PST) Date: Tue, 29 Jan 2019 21:25:28 +0800 From: Leo Yan To: Sai Prakash Ranjan Cc: Rob Herring , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , Andy Gross , David Brown , Vivek Gautam , Jeffrey Hugo , Doug Anderson , Stephen Boyd , Bjorn Andersson , devicetree@vger.kernel.org, Mark Rutland , Marc Gonzalez , Rajendra Nayak , Sibi Sankar , Tingwei Zhang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCHv5 6/7] coresight: debug: Add Unique Component Identifier (UCI) table Message-ID: <20190129132528.GA16669@leoy-ThinkPad-X240s> References: <1019e6fed1ade6a580f01df9b3f70c2a9df5b3be.1548419933.git.saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1019e6fed1ade6a580f01df9b3f70c2a9df5b3be.1548419933.git.saiprakash.ranjan@codeaurora.org> 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 Tue, Jan 29, 2019 at 12:44:03AM +0530, Sai Prakash Ranjan wrote: > Add UCI table and a helper macro for coresight CPU debug > module. This patch adds the UCI entries for Krypo 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 > > Also add a helper macro to make adding CPU PIDs easier > similar to ETM4X driver. > > Signed-off-by: Sai Prakash Ranjan Looks good to me and tested on my Hikey board (though I cannot test for a device with UCI ID): Reviewed-and-tested-by: Leo Yan > --- > This patch depends on UCI support by Mike Leach in below link: > https://lore.kernel.org/lkml/20190121233151.13363-2-mike.leach@linaro.org/ > --- > .../hwtracing/coresight/coresight-cpu-debug.c | 41 +++++++++++++------ > 1 file changed, 28 insertions(+), 13 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c > index 45b2460f3166..a126ed0b9a76 100644 > --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c > +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c > @@ -655,20 +655,35 @@ static int debug_remove(struct amba_device *adev) > return 0; > } > > +#define DEBUG_AMBA_ID(pid) \ > + { \ > + .id = pid, \ > + .mask = 0x000fffff, \ > + } > + > +static struct amba_cs_uci_id uci_id_debug[] = { > + { > + /* CPU Debug UCI data */ > + .devarch = 0x47706a15, > + .devarch_mask = 0xfff0ffff, > + .devtype = 0x00000015, > + } > +}; > + > +#define DEBUG_AMBA_UCI_ID(pid) \ > + { \ > + .id = pid, \ > + .mask = 0x000fffff, \ > + .data = uci_id_debug, \ > + } > + > 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, > - }, > - { 0, 0 }, > + DEBUG_AMBA_ID(0x000bbd03), /* Cortex-A53 */ > + DEBUG_AMBA_ID(0x000bbd07), /* Cortex-A57 */ > + DEBUG_AMBA_ID(0x000bbd08), /* Cortex-A72 */ > + DEBUG_AMBA_UCI_ID(0x000f0205), /* Qualcomm Kryo */ > + DEBUG_AMBA_UCI_ID(0x000f0211), /* Qualcomm Kryo */ > + {}, > }; > > static struct amba_driver debug_driver = { > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation >