From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: yiru zhang <yiru.zhang@mediatek.com>,
Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] [Patch v1]Add ETE devarch condition in etm4_init_iomem_access
Date: Tue, 8 Apr 2025 10:05:47 +0100 [thread overview]
Message-ID: <98f6fa74-f14e-48f1-b550-c1ff962df53d@arm.com> (raw)
In-Reply-To: <20250408073651.17140-1-yiru.zhang@mediatek.com>
Hi Yiru
On 08/04/2025 08:36, yiru zhang wrote:
> Due to ETE supported, so add ETE devarch condition in etm4_init_iomem_access.
Is there a reason why you cannot use the "system instructions to access
the ETE" ?
The patch as such is fine by me (withe some minor styling nits). But, we
do not recommend using the MMIO for ETE, when it can be accessed
directly by sysreg.
FWIW, if you remove the "mmio base" address from the DT/ACPI, it
should automatically use the system instructions for ETE.
> Signed-off-by: yiru zhang <yiru.zhang@mediatek.com>
> ---
> 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 2b8f10463840..971b9f0fe5e4 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> @@ -1135,8 +1135,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) {
We could use a switch case ?
switch (devarch & ETM_DEVARCH_ID_MASK) {
case ETM_DEVARCH_ETMv4x_ARCH:
case ETM_DEVARCH_ETE_ARCH:
break;
default:
pr_warn_once("Unknown ETM architecture: %x\n",
devarch & ETM_DEVARCH_ID_MASK);
return false;
}
Suzuki
> + pr_warn_once("TRCDEVARCH doesn't match ETMv4&ETE architecture\n");
> return false;
> }
>
next prev parent reply other threads:[~2025-04-08 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 7:36 yiru zhang
2025-04-08 9:05 ` Suzuki K Poulose [this message]
2025-04-09 3:10 ` Yiru Zhang (张熠儒)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98f6fa74-f14e-48f1-b550-c1ff962df53d@arm.com \
--to=suzuki.poulose@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=coresight@lists.linaro.org \
--cc=james.clark@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mike.leach@linaro.org \
--cc=yiru.zhang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®