Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3672681rdg; Wed, 18 Oct 2023 02:36:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFocOW7ustOuYyggWVkYSucB4QBMwqHX/GRl2P0bENATjqE9Ek/8SBsyfhin8i4/svHtNSy X-Received: by 2002:a05:6a21:6d93:b0:163:4288:1c3d with SMTP id wl19-20020a056a216d9300b0016342881c3dmr4394837pzb.43.1697621802862; Wed, 18 Oct 2023 02:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697621802; cv=none; d=google.com; s=arc-20160816; b=MCUfhQROYW44Qh8dutxTsUYSVL0odhdIp4IaQWUiNy6uFEgkBPyL9To3S8S6s4IbAu O/9FjGxrbauMkS1/HkSmSJNb2eVDRZMI+l22kVmG6GkMabmVy6FvXTK0XUSB1DVaoHcV eqIDn6fZmf8jxNg9RhvQdIue7oBT9owjryqqZ+mDDEMZ/3S1J0coj84W2elHZioTo0+Y p4CoTKz8TFe0Sf3wd1PBpDohAnvmHVh1QOgZ8ZV4D58K0GYe+JRYoutcvGufhv/cntbI uS67XLC7EuECkl5vT7NgAFz5ho2hPIi2P/ykPfoXT26jTGFvn4vzkX21oH33agxrRQej ZrXg== 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=fQl8Tno8n/r6FvQV8sLRmj/Jnw+TdLU6JwYcedMw8i8=; fh=KVVYz5UHZU2SvU8wnex0C6I7xej0w8EwkORKci/ApAo=; b=tF0t5XL+HFUXVbpWWtz5kNy/OcPsKJ2LhnPArXCygRc2qczR/mubMH/90d5+vtGbIV ux8yzlqlhGrCxJ3l07VAbFogjihEupGCAJRgYmtUX9baFbo426XY+q0f/r39VsImvWen JqW000kz6Zh2qT6El1xLanxrF8zB5vgmr+oxijeZjNL45VsmLiEB6qmqrdMUzBciLGfk bPwHqImRIP0qq6NFoWoUj+3zoUe0ntU1lmdTylgzNQfHAbCE1K7EiZ39/7aZTh818tcQ IhHrPqiQQo9x2I1/CKLnxFIbrTKx2yppJzonedJcD+wJAV4X8a/Z/J1MmQkBuDwpNsZ4 lzGw== 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:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f1-20020a170902f38100b001c470e70cf7si3526236ple.273.2023.10.18.02.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 5FF3E8131AA0; Wed, 18 Oct 2023 02:36:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbjJRJgj (ORCPT + 99 others); Wed, 18 Oct 2023 05:36:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbjJRJgh (ORCPT ); Wed, 18 Oct 2023 05:36:37 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 69D73102 for ; Wed, 18 Oct 2023 02:36:35 -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 9F2732F4; Wed, 18 Oct 2023 02:37:15 -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 750DD3F64C; Wed, 18 Oct 2023 02:36:33 -0700 (PDT) Message-ID: Date: Wed, 18 Oct 2023 10:36:32 +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> <206d5b79-dcd8-05b7-86c8-d6fb5790439e@linux.alibaba.com> From: Suzuki K Poulose In-Reply-To: <206d5b79-dcd8-05b7-86c8-d6fb5790439e@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 02:36:41 -0700 (PDT) Hi On 18/10/2023 10:30, Ruidong Tian wrote: > Hi Suzuki, > > Now ETM4X driver use MMIO or system instruction depends on this check in > function etm4_init_csdev_access: > >         if (drvdata->base) >                 return etm4_init_iomem_access(drvdata, csa); > > This check always true if firmware provides a address range in ACPI > table of ETE, and as a result, the ETE device in this case cannot be > successfully probed. > > I think OS should be compatible with this situation, no matter firmware > how to organize ETE information in ACPI table. How do you feel about > it? My question is not about "What the patch does". But, why can't we use system instructions on your system, when ETE was designed to be used with that in the first place and get rid of the MMIO. Suzuki > > Thank you > > Ruidong Tian > 在 2023/10/18 16:28, Suzuki K Poulose 写道: >> 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; >>>       }