Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3646175rdg; Wed, 18 Oct 2023 01:29:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOFSd0ShRYEDAEGGvZ4Qau/+BI3WGMRpU9Rt6e02iVoB5KXZCHUfN/jhZUQi7AkFaDySdd X-Received: by 2002:a17:90b:a0c:b0:27d:5693:7340 with SMTP id gg12-20020a17090b0a0c00b0027d56937340mr4162000pjb.24.1697617775003; Wed, 18 Oct 2023 01:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697617774; cv=none; d=google.com; s=arc-20160816; b=OhIfLpe3AoBSc7qE3v7BtzZlDg9zuJE7xDnaWPSbILKWfBUH0LrDlAtRG7YfVYDOt+ yXQJq+PWZH4f4JG8WdTkd7Mfzc6A/j51mqjTDphb5O/Ot5iiO8ELkCbqqipzH2lzvRCM /g8NlcB31sE8n73Bm7AeqxUEOAF3cPMC/xf52SsAn24MWcI4sqbKjru7LhXO9ai2Z356 Rb06qCoXb/w87C9kiY4qzYaJApyssllbnu3uSKehyKFdYZlXMuwZt4FR8wF9820WmsTA d+paEP986CMr8N14N/dXlDlss0Dcl8JQ2VD5Wvb5Wi25zzVcH47seLdlEsVWfabVmsuS o9WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=CCGvPMTJvvUo5lWVCb5Dpi8ZE9r4XQYYLKEjdgO9RvQ=; fh=KVVYz5UHZU2SvU8wnex0C6I7xej0w8EwkORKci/ApAo=; b=p+vvRkAwdbQbN6osxnhySNWkOuJSheRIpoLe4DXZU3iLTXymSDx4M5lB8elG03/rRc vlxKBpU1gN0gGWBWACXkaANB5ezMd+gor7vP7gCrzf5GuyF/i2LSUMwdApYO0iZndtk7 zxjrBDnAaJEpHxQlZndVyIWbQ+b67haIKbtEvorxnqnfUmlj/PcYFm68ddntsgoI5Ktq gmWMKDeW1qhLIVrN6Af4o43hhbEbySuyIOUDz7d+mWW9//QJYAmUsBwqcYMygWneRR9P C7ABZWyys26USwgVkFoi4LpL9lzcHEUGDNcTEje1YoJoWrnNnZhUp8+aqnCvfp52U4An iB9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id p1-20020a17090a868100b0025c1d114af0si1009723pjn.93.2023.10.18.01.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 01:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 62E9D80280ED; Wed, 18 Oct 2023 01:29:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235167AbjJRI3G (ORCPT + 99 others); Wed, 18 Oct 2023 04:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344651AbjJRI3F (ORCPT ); Wed, 18 Oct 2023 04:29:05 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6426BEA for ; Wed, 18 Oct 2023 01:29:02 -0700 (PDT) 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 1E1452F4; Wed, 18 Oct 2023 01:29:43 -0700 (PDT) Received: from [10.57.3.139] (unknown [10.57.3.139]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 223043F64C; Wed, 18 Oct 2023 01:29:01 -0700 (PDT) Message-ID: Date: Wed, 18 Oct 2023 09:28:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] coresight: etm4x: Enable ETE device accessed via MMIO To: Ruidong Tian , linux-kernel@vger.kernel.org Cc: james.clark@arm.com, coresight@lists.linaro.org, mike.leach@linaro.org, alexander.shishkin@linux.intel.com, linux-arm-kernel@lists.infradead.org References: <20231018070506.65320-1-tianruidong@linux.alibaba.com> From: Suzuki K Poulose In-Reply-To: <20231018070506.65320-1-tianruidong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 18 Oct 2023 01:29:27 -0700 (PDT) On 18/10/2023 08:05, Ruidong Tian wrote: > The ETM4X driver now assume that all ETE as CPU system instructions > accessed device, in fact the ETE device on some machines also accessed > via MMIO. > > Signed-off-by: Ruidong Tian Why are we going backwards to MMIO from system instructions ? Is it because of an "unfriendly" hypervisor preventing access ? As such, without a sufficiently acceptable explanation, I am reluctant to make this change Suzuki > --- > drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index 285539104bcc..ad298c9cc87e 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -1103,8 +1103,9 @@ static bool etm4_init_iomem_access(struct etmv4_drvdata *drvdata, > * with MMIO. But we cannot touch the OSLK until we are > * sure this is an ETM. So rely only on the TRCDEVARCH. > */ > - if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH) { > - pr_warn_once("TRCDEVARCH doesn't match ETMv4 architecture\n"); > + if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH && > + (devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETE_ARCH) { > + pr_warn_once("TRCDEVARCH doesn't match ETMv4/ETE architecture\n"); > return false; > } >