Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5121499ybi; Tue, 28 May 2019 07:55:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXJEBeYnwr1lcAKY6kJzdYeIu69Z9EYO3HCT3nsYwCnOKHAVgm4EBOyIRAzsraiwYpw5Jm X-Received: by 2002:a17:902:205:: with SMTP id 5mr19874407plc.165.1559055303166; Tue, 28 May 2019 07:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559055303; cv=none; d=google.com; s=arc-20160816; b=SekKC3JvwL8LjY0XtmJ+IChaAjksBXAa4ExtXaESSM24KaSH8BhPELA1lSGJI7ugQL 66l/fbqWklg4cDkZQyFKS6CuZBq/UnbBFEpn2VR8CdfvyUh3M01EJru1/KNoE5bbZZ1H 2V9UbRhBJ1+7LK+juxm7xkrDeppnltl7tZ34CnFap80jbaZsOJLdDacR2ypGlrx8IMNC fQNhli8E4RkobgZjhbXPnMwTfmf+RD8wPhtPULZQFAqdicUD3A15NN+rclv0Yq6NoCVU McLyGBpDSmNruaE0d1dNx+hnjYSbVqNbfmVQbv39/kVVqYqUaORthAZENuyllLgOY4Ju aNFg== 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=4htO74nlZTTjjSOZRb+2oGEss+Qcefe+hGWQCyYkWoQ=; b=njPFdGfDJgReXEafxz0hC36TT3Ph/qgogihyHs2SBgjRAF4YAk/bjV4sAJMdUVAjaM tyqh1/aikaiQSgPmui3reLcFrSI8ZG4amnMeqS7arRsp/a7iosV5ICepSq8Es9y0JQZp 90c032EGb+3DaSlaUMv0U4u4t7tqkDZ+X6vmcvkjgo7YTLpfeMThsS07qcSZe7dVczf6 nFW3DHy5ATnSp4bm2jEsjtn3g3Vhe6r/TOvaxc9YHb275gnNzrNsg+pFYLqZAO8PnOt8 E2i4h9tAMxrKoAUk5OpfbOR4Uh4D9EECWCy/K5vao4GgC0yFqapsr5Mak4aH/p1M1dLO 6DzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=au44pDeg; 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 ca10si22588118plb.172.2019.05.28.07.54.47; Tue, 28 May 2019 07:55:03 -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=au44pDeg; 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 S1726912AbfE1Ovb (ORCPT + 99 others); Tue, 28 May 2019 10:51:31 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46683 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbfE1Ova (ORCPT ); Tue, 28 May 2019 10:51:30 -0400 Received: by mail-pl1-f194.google.com with SMTP id bb3so827140plb.13 for ; Tue, 28 May 2019 07:51:30 -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=4htO74nlZTTjjSOZRb+2oGEss+Qcefe+hGWQCyYkWoQ=; b=au44pDegu6gwO+Cf4teDgSVrwJlkGNEtG6C7VatYjseuou/yAacTS7Evb5615xq3g+ CQ2KSL3YZAs5nW/Lu1FAkoZiLAg//aOMW1cai/0fWPB//zHyX7fonkQudab87mrGCWwO 0rAlaXMI0UCuAAOuwoDiVWHn7Jp4SbacA+da05vZMNGzDhCnvgcFBtasTYz547ybOgq/ dp0EQrHKeo1v1ougIdh51QKOB/otNfr9UrlhpwTdNPvZgTPKXs9VgQ5f1CloYbiU1dV2 Rw7OzaW0syjJt2WODgNPxMcD1qxAm00CSJVg/dNu4RKe8HOo+iZW0uMPI8Ate3xRG+Zt WZhQ== 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=4htO74nlZTTjjSOZRb+2oGEss+Qcefe+hGWQCyYkWoQ=; b=hSFBgysqS6UGF+mP8dL6FxbW/drc85xcaPF7Avviz0Bpofq7lV/CVafJgMehh63TgQ 4gWR2tnJFenUvAOzQB7fVKiT0OSqqgKvAh6POnZU/3gTJF0iqqzpOmQx5x6PBRW+uFyI EILATL+VrLC8M2TxrFKpZi0HmYHhAknEX8gWt2ujK/5Ixwu6Sa01pe7SIgz94TiIi7aR Pqo8/pwXtpdSHgDPgK/Mo2GBg90mGDK8JXzEsIpX7pA5NJ4D0Oc4CnX7CjP6jEPxbaif 5x35oqPeR/wQ0e6G/8oNT2RvsFjjh61WgY5gfCHqoXQLtXyaB76f6BjENNxKPk6eL74r PZDg== X-Gm-Message-State: APjAAAUlsIfsX/cbFKr/rw1kK7TO5zmqhLtKekFw4KiQAbs/F2kKOvpP SiDHLk8E7it8yg6nE1kNOZdW9g== X-Received: by 2002:a17:902:760f:: with SMTP id k15mr60674375pll.125.1559055089555; Tue, 28 May 2019 07:51:29 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m1sm2701885pjv.22.2019.05.28.07.51.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2019 07:51:28 -0700 (PDT) Date: Tue, 28 May 2019 08:51:26 -0600 From: Mathieu Poirier To: Leo Yan Cc: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 00/30] coresight: Support for ACPI bindings Message-ID: <20190528145126.GA20714@xps15> References: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> <20190528051924.GA19112@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190528051924.GA19112@leoy-ThinkPad-X240s> 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 Good day, On Tue, May 28, 2019 at 01:19:24PM +0800, Leo Yan wrote: > Hi Suzuki, > > On Wed, May 22, 2019 at 11:34:33AM +0100, Suzuki K Poulose wrote: > > This series adds the support for CoreSight devices on ACPI based > > platforms. The device connections are encoded as _DSD graph property[0], > > with CoreSight specific extensions to indicate the direction of data > > flow as described in [1]. Components attached to CPUs are listed > > as child devices of the corresponding CPU, removing explicit links > > to the CPU like we do in the DT. > > > > The majority of the series cleans up the driver and prepares the subsystem > > for platform agnostic firwmare probing, naming scheme, searching etc. > > > > We introduce platform independent helpers to parse the platform supplied > > information. Thus we rename the platform handling code from: > > of_coresight.c => coresight-platform.c > > > > The CoreSight driver creates shadow devices that appear on the Coresight > > bus, in addition to the real devices (e.g, AMBA bus devices). The name > > of these devices match the real device. This makes the device name > > a bit cryptic for ACPI platform. So this series also introduces a generic > > platform agnostic device naming scheme for the shadow Coresight devices. > > Towards this we also make changes to the way we lookup devices to resolve > > the connections, as we can't use the names to identify the devices. So, > > we use the "fwnode_handle" of the real device for the device lookups. > > Towards that we clean up the drivers to keep track of the "CoreSight" > > device rather than the "real" device. However, all real operations, > > like DMA allocation, Power management etc. must be performed on > > the real device which is the parent of the shadow device. > > > > Finally we add the support for parsing the ACPI platform data. The power > > management support is missing in the ACPI (and this is not specific to > > CoreSight). The firmware must ensure that the respective power domains > > are turned on. > > > > Applies on v5.2-rc1 > > > > Tested on a Juno-r0 board with ACPI bindings patch (Patch 31/30) added on > > top of [2]. You would need to make sure that the debug power domain is > > turned on before the Linux kernel boots. (e.g, connect the DS-5 to the > > Juno board while at UEFI). arm32 code is only compile tested. > > After I applied this patch set, I found all device names under > '/sys/bus/event_source/devices/cs_etm/sinks/' have been changed as > below on my DB410c board: > # ls /sys/bus/event_source/devices/cs_etm/sinks/ > tmc_etf0 tmc_etr0 tpiu0 Yes, that is the expected behavior. > > This leads to below command failure when open PMU device: > # perf record -e cs_etm/@826000.etr/ --per-thread uname > failed to set sink "826000.etr" on event cs_etm/@826000.etr/ with 2 (No such file or directory) Correct. > > I must use below command so that perf can match string with the > device name under '/sys/bus/event_source/devices/cs_etm/sinks/': > # perf record -e cs_etm/@tmc_etr0/ --per-thread uname Correct. > > Seems to me, this is an unexpected change and when I worked on the > patch set v2, IIRC that version still can use '826000.etr' to open PMU > device. Correct - v2 did not address the new naming convention for devices present under 'event_source', something that was corrected in v3. > Please help confirm for this. Thanks! > > Leo.