Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5934281ybi; Tue, 28 May 2019 23:36:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQdgyJEn+CbXtluYZ0wzZyl7A56A1A7LCkFWn3ktwhcPzkiFWtUtrnYSSKVwgQLccwyKGq X-Received: by 2002:a65:638e:: with SMTP id h14mr63073937pgv.209.1559111782483; Tue, 28 May 2019 23:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559111782; cv=none; d=google.com; s=arc-20160816; b=KCsrCRTmabNxCHrp9u9g04og4LWMmMXpy5J5Bz0loWZViDtBzTFqlPrBeKr/j3qEAh U8+9F5rpuwrW8RFlrFi+d2w/TztgvxxXas2PZRzOCcNWsEFsVvJFuegRUPnmwTD5N8M3 o+dZ8xP10DekC+puskcsEur+9tNRgEUjj+7HF1v6tBhK0sgQqe3aiBBCcCKjPPVKuZ/E tU/o1yvVJMWaktQjYqoVhXiC8TOr3LzYIkyAkDyhD1kDcgtj6fqpc33pELVZYPhmnSI+ ALaHzLQJPKZdLs0kgz5oA2OvHFdx5/l6TLZYffQZ+WOQE2wdy4WsXelGvdfWp+V4LH+L lAZA== 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=32oNNfOBxR/dIJDiqOCCeX3FJ2erRbG9x3SCfpFAaFc=; b=Av2upxPaMYwefFA4fPVhMo0e1aRjE3KwkXOvCOE6Ua6lFh+rfKA47xDK4UoyE5jhD0 KQMDR/eob3GkyDNBDZIs5UKLCjKrjIm/yBa1skyER/ZanZ57bYPb0Gpb784BXzi+bXKy oZl4h4mR1hWLgNYgjcPWV0j0S1ITWovZx8Mmxo+pU+vv3LYgnvs+tgnFkqjO+4jm4oIJ hR+54hFQpy00ptG+iuwhJhrvJXkQWDKtEIPX8iCapAb24G5dkLfvjSF4sQMIchHOmhsv KwkRCxne1WgnRIMhiR5jqfpvitiLMBNaAljSWJ+qufDM1pee3RWrQefbllqxumyLvHdA srVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A0ThL7X9; 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 s11si24028602pgm.376.2019.05.28.23.36.06; Tue, 28 May 2019 23:36:22 -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=A0ThL7X9; 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 S1726254AbfE2Ge4 (ORCPT + 99 others); Wed, 29 May 2019 02:34:56 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:43869 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725879AbfE2Gez (ORCPT ); Wed, 29 May 2019 02:34:55 -0400 Received: by mail-oi1-f195.google.com with SMTP id t187so1105171oie.10 for ; Tue, 28 May 2019 23:34:55 -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=32oNNfOBxR/dIJDiqOCCeX3FJ2erRbG9x3SCfpFAaFc=; b=A0ThL7X9hLFBwyv6iK++tvStLIKMPWGta2pKdZiVten8r/ND4jT+vyGCCE5oL3sH4K APmx7ul95R/6gOgmEKWfoVrpaGhcozdHFgqQI4OAWBFMI0KT5KqgwRam+1TzGFVE8UzN AAIJVGcoqGd8spLrUOFgdK44JrEKVFmEoFOD6ccDslM4FoQiBPlpqGODKufQm61utEkj IyY35WqR1UX4/a4EJMV6Gi9xkOO4K6Zz4YvKInXqb3CR5bnZ1pP9WLciOAz6pR/rykjo 6wQ4dz2Xsskpd3n7gHc9OUls52XyE3gyNqL52tMRc3LNph5j4qxbiRJWnhoqBxUr2S7E wb8g== 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=32oNNfOBxR/dIJDiqOCCeX3FJ2erRbG9x3SCfpFAaFc=; b=qejmYkoeh2KKvgL4ViwhqShgm9NeQMRyEINoYcHSka4FevuBF+GAHWTuycFbis7YQl G1/0qBsBwbwhkRqu1sfYS6Qk7umCppFmmyNGGvw5IDZshL195VrXynXF4pN7kmIdbrpy Hm93/LGMU47GQkn616Bw5+YLpGBkNZt2GgQS3TlZnNLXH8VuMxxryFSzRZVJAtcfzm4g UOOY8Eafymzb+jWokGIU6ONt40kifStFhZNBIzkp4EVecNi/w5XoqyxGFhsYxd91lEOF AznH5s3J4G+Xyt34PtAHCk2oSdT4M5tvqng85aJXc75JNLA3pEgn/J2Zl0x8OqoSkY+v Tnjg== X-Gm-Message-State: APjAAAUp3sd8LaRifG3on/2U7Pz58KgHIE3RXwhuoSJvh4mRJk6oP14i 6DcRbrkAbhHpRqsfvid7dT5f0A== X-Received: by 2002:aca:342:: with SMTP id 63mr5026668oid.10.1559111695072; Tue, 28 May 2019 23:34:55 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id l184sm6005234oih.49.2019.05.28.23.34.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2019 23:34:54 -0700 (PDT) Date: Wed, 29 May 2019 14:34:49 +0800 From: Leo Yan To: Mathieu Poirier 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: <20190529063449.GA15808@leoy-ThinkPad-X240s> References: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> <20190528051924.GA19112@leoy-ThinkPad-X240s> <20190528145126.GA20714@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190528145126.GA20714@xps15> 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, May 28, 2019 at 08:51:26AM -0600, Mathieu Poirier wrote: > 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. Thanks for confirmation, Mathieu.