Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp157768pxb; Fri, 8 Jan 2021 01:11:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEep7wOsGKE1q7XkTpWz7Gz1mKIUqItofFiy4zQivgHbEdBxFf5AuSQXDNqgMIttAAsRz5 X-Received: by 2002:a17:906:518a:: with SMTP id y10mr2098016ejk.323.1610097116642; Fri, 08 Jan 2021 01:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610097116; cv=none; d=google.com; s=arc-20160816; b=RMfYcbMVno6iAPPX0rLjadiswG+xZ5wK9kv+njJQOjdW96Ga32YmX9RFSzXC1XcrXV 4VociDTyy+VFgHQ+V5B/xjuTomJsHb2q7YDUinguSROCJaD7BstINfhLwqrckPYk37GB fpSHO0juX4MQSQE/PnpArtI3YXrQcexCOMyT4pXlGHzKBV4Pljq4bfjRTWSR1V9HjYPK NITTnmozbINkvb3voYOMv32qFrCfpOoM6NSZkYhbAmYs87EIOcdsDzawo75mt2M5xUF/ eKsIgWJNt8iJ9uNaNFVmnzW6dtNhN9CKi6Jz8Lo9XoIAfKDC4fuRiwpKuaA/LF4tYKTK Shfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=3Ix35sYZ5do3UPFTQcq2tuooc2pSEhXDB2lQ8kjjtEU=; b=QMeQlp+5BD5QZTOrt0f35UZvpjPr9g7BbxIswKfrFto8LYcUuPhuwomqmRIDAHs6mo NJMPSoSeNsO1rJnTJKHAHLVieteXCchkQCuFZBC7etJnnC9AesCQW7fvQx1cX7dLAKsh BUAaUs+6QZDIOIE3RH7f/1Mqqr6dzDQuMc1UuPeTm7SSL/+N/SWC10Z0yv6lBcOB+5M9 FOLmH9nZgYk2gguOg7Lv8P421qm/tqehWKCQK1pbnoHhYIn+mDRX+DVwg7do6rLKP6Aj KxzITShd3bnfjyAEg/k83M9EdOg1n0QWjPcrwROKATU2OylZcBo7H47HFuq2A1DhUgFv EE+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si3562670edn.508.2021.01.08.01.11.32; Fri, 08 Jan 2021 01:11:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728042AbhAHJJB (ORCPT + 99 others); Fri, 8 Jan 2021 04:09:01 -0500 Received: from foss.arm.com ([217.140.110.172]:47510 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727824AbhAHJI5 (ORCPT ); Fri, 8 Jan 2021 04:08:57 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 49FEC31B; Fri, 8 Jan 2021 01:08:11 -0800 (PST) Received: from [10.57.37.195] (unknown [10.57.37.195]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F1583F70D; Fri, 8 Jan 2021 01:08:08 -0800 (PST) Subject: Re: [PATCH v6 00/26] coresight: etm4x: Support for system instructions To: Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, leo.yan@linaro.org, mike.leach@linaro.org, anshuman.khandual@arm.com References: <20210107123859.674252-1-suzuki.poulose@arm.com> <20210108010907.GJ43045@xps15> From: Suzuki K Poulose Message-ID: <7f3304f7-8c68-3a61-48da-553de87c027d@arm.com> Date: Fri, 8 Jan 2021 09:08:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210108010907.GJ43045@xps15> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu On 1/8/21 1:09 AM, Mathieu Poirier wrote: > Hi Suzuki, > > On Thu, Jan 07, 2021 at 12:38:33PM +0000, Suzuki K Poulose wrote: >> CoreSight ETMv4.4 obsoletes memory mapped access to ETM and >> mandates the system instructions for registers. >> This also implies that they may not be on the amba bus. >> Right now all the CoreSight components are accessed via memory >> map. Also, we have some common routines in coresight generic >> code driver (e.g, CS_LOCK, claim/disclaim), which assume the >> mmio. In order to preserve the generic algorithms at a single >> place and to allow dynamic switch for ETMs, this series introduces >> an abstraction layer for accessing a coresight device. It is >> designed such that the mmio access are fast tracked (i.e, without >> an indirect function call). >> >> This will also help us to get rid of the driver+attribute specific >> sysfs show/store routines and replace them with a single routine >> to access a given register offset (which can be embedded in the >> dev_ext_attribute). This is not currently implemented in the series, >> but can be achieved. >> >> Further we switch the generic routines to work with the abstraction. >> With this in place, we refactor the etm4x code a bit to allow for >> supporting the system instructions with very little new code. >> >> We use TRCDEVARCH for the detection of the ETM component, which >> is a standard register as per CoreSight architecture, rather than >> the etm specific id register TRCIDR1. This is for making sure >> that we are able to detect the ETM via system instructions accurately, >> when the the trace unit could be anything (etm or a custom trace unit). >> To keep the backward compatibility for any existing broken >> impelementation which may not implement TRCDEVARCH, we fall back to TRCIDR1. >> Also this covers us for the changes in the future architecture [0]. >> >> Also, v8.4 self-hosted tracing extensions (coupled with ETMv4.4) adds >> new filtering registers for trace by exception level. So on a v8.4 >> system, with Trace Filtering support, without the appropriate >> programming of the Trace filter registers (TRFCR_ELx), tracing >> will not be enabled. This series also includes the TraceFiltering >> support to cover the ETM-v4.4 support. >> >> The series has been mildly tested on a model for system instructions. >> I would really appreciate any testing on real hardware. > > I have queued your work in my local tree. I will have a final pass before > pushing to coresight-next tomorrow or on Monday. > Thanks for the review and fixups. Please let me know if you need a respin. Cheers Suzuki