From: yiru zhang <yiru.zhang@mediatek.com>
To: <yiru.zhang@mediatek.com>
Cc: <alexander.shishkin@linux.intel.com>,
<angelogioacchino.delregno@collabora.com>,
<coresight@lists.linaro.org>, <james.clark@linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>, <matthias.bgg@gmail.com>,
<mike.leach@linaro.org>, <suzuki.poulose@arm.com>,
kernel test robot <lkp@intel.com>
Subject: [PATCH] [Patch v3]Add ETE devarch condition in etm4_init_iomem_access
Date: Thu, 10 Apr 2025 17:51:58 +0800 [thread overview]
Message-ID: <20250410095158.8966-1-yiru.zhang@mediatek.com> (raw)
In-Reply-To: <20250409032917.7580-1-yiru.zhang@mediatek.com>
Due to ETE supported, so add ETE devarch condition in etm4_init_iomem_access.
Signed-off-by: yiru zhang <yiru.zhang@mediatek.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504101759.7Ls0Uy4o-lkp@intel.com/
v1->v2: use switch case way
v2->v3: clean build warning
---
drivers/hwtracing/coresight/coresight-etm4x-core.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
index 2b8f10463840..4002a2823fd0 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@ -1135,11 +1135,15 @@ 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");
+ switch (devarch & ETM_DEVARCH_ID_MASK) {
+ case ETM_DEVARCH_ETMv4x_ARCH:
+ case ETM_DEVARCH_ETE_ARCH:
+ break;
+ default:
+ pr_warn_once("Unknown ETM architecture: 0x%lx\n",
+ devarch & ETM_DEVARCH_ID_MASK);
return false;
}
-
drvdata->arch = etm_devarch_to_arch(devarch);
*csa = CSDEV_ACCESS_IOMEM(drvdata->base);
return true;
--
2.46.0
next prev parent reply other threads:[~2025-04-10 9:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 3:29 [PATCH] [Patch v2]Add " yiru zhang
2025-04-10 7:25 ` kernel test robot
2025-04-10 9:28 ` kernel test robot
2025-04-10 9:51 ` yiru zhang [this message]
2025-04-10 13:21 ` [PATCH] [Patch v3]Add " Mike Leach
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=20250410095158.8966-1-yiru.zhang@mediatek.com \
--to=yiru.zhang@mediatek.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=lkp@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.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®