From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EA8EC64E69 for ; Mon, 23 Nov 2020 09:57:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A9EF206F7 for ; Mon, 23 Nov 2020 09:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728586AbgKWJ4i (ORCPT ); Mon, 23 Nov 2020 04:56:38 -0500 Received: from foss.arm.com ([217.140.110.172]:39282 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728571AbgKWJ4h (ORCPT ); Mon, 23 Nov 2020 04:56:37 -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 CD6E1101E; Mon, 23 Nov 2020 01:56:36 -0800 (PST) Received: from [10.57.53.209] (unknown [10.57.53.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5C8B83F70D; Mon, 23 Nov 2020 01:56:35 -0800 (PST) Subject: Re: [RFC 06/11] coresight: ete: Detect ETE as one of the supported ETMs To: Tingwei Zhang , Anshuman Khandual Cc: coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org References: <1605012309-24812-1-git-send-email-anshuman.khandual@arm.com> <1605012309-24812-7-git-send-email-anshuman.khandual@arm.com> <20201114053650.GA28964@codeaurora.org> From: Suzuki K Poulose Message-ID: <4b03b32c-edca-a19a-e10e-40d6fcd3cfcd@arm.com> Date: Mon, 23 Nov 2020 09:56:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201114053650.GA28964@codeaurora.org> 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 Tingwei, On 11/14/20 5:36 AM, Tingwei Zhang wrote: > Hi Anshuman, > > On Tue, Nov 10, 2020 at 08:45:04PM +0800, Anshuman Khandual wrote: >> From: Suzuki K Poulose >> >> Add ETE as one of the supported device types we support >> with ETM4x driver. The devices are named following the >> existing convention as ete. >> >> ETE mandates that the trace resource status register is programmed >> before the tracing is turned on. For the moment simply write to >> it indicating TraceActive. >> >> Signed-off-by: Suzuki K Poulose >> Signed-off-by: Anshuman Khandual >> --- >> @@ -1742,6 +1758,19 @@ static int etm4_probe(struct device *dev, void >> __iomem *base) >> if (!desc.access.io_mem || >> fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up")) >> drvdata->skip_power_up = true; >> + major = ETM_ARCH_MAJOR_VERSION(drvdata->arch); >> + minor = ETM_ARCH_MINOR_VERSION(drvdata->arch); >> + if (drvdata->arch >= ETM_ARCH_ETE) { >> + type_name = "ete"; >> + major -= 4; >> + } else { >> + type_name = "etm"; >> + } >> + > When trace unit supports ETE, could it be still compatible with ETMv4.4? > Can use selectively use it as ETM instead of ETE? No. Even though most of the register sets are compatible, there are additional restrictions and some new rules for the ETE. So, when you treat the ETE as an ETMv4.4, you could be treading into "UNPREDICTABLE" behaviors. Suzuki