From: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: opensbi@lists.infradead.org
Cc: Xianbin Zhu <xianbin.zhu@linux.spacemit.com>,
Anup Patel <anup@brainfault.org>, Bo Gan <ganboing@gmail.com>,
Samuel Holland <samuel.holland@sifive.com>,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
Kevin Zhang <zhangmeng.kevin@linux.spacemit.com>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
E Shattow <e@freeshell.de>
Subject: [PATCH v5 2/6] platform: generic: spacemit: k1: rename cache flush operation
Date: Fri, 23 Oct 2026 11:44:42 +0800 [thread overview]
Message-ID: <20261023-spacemit-k3-v5-2-c5ddfc72caa4@linux.spacemit.com> (raw)
In-Reply-To: <20261023-spacemit-k3-v5-0-c5ddfc72caa4@linux.spacemit.com>
From: Xianbin Zhu <xianbin.zhu@linux.spacemit.com>
MRAOP_ICACHE_INVALID is used to flush the local D-cache before a hart
stops, so the name incorrectly describes I-cache invalidation. Rename
it to MRAOP_CACHE_FLUSH without changing its encoded value.
Signed-off-by: Xianbin Zhu <xianbin.zhu@linux.spacemit.com>
Reviewed-by: E Shattow <e@freeshell.de>
Co-developed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
lib/utils/hsm/fdt_hsm_spacemit.c | 2 +-
platform/generic/include/spacemit/k1.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/utils/hsm/fdt_hsm_spacemit.c b/lib/utils/hsm/fdt_hsm_spacemit.c
index 868e49bf..99c52335 100644
--- a/lib/utils/hsm/fdt_hsm_spacemit.c
+++ b/lib/utils/hsm/fdt_hsm_spacemit.c
@@ -92,7 +92,7 @@ static int spacemit_hart_stop(void)
asm volatile ("fence iorw, iorw");
/* flush local dcache */
- csr_write(CSR_MRAOP, MRAOP_ICACHE_INVALID);
+ csr_write(CSR_MRAOP, MRAOP_CACHE_FLUSH);
asm volatile ("fence iorw, iorw");
/* disable dcache */
diff --git a/platform/generic/include/spacemit/k1.h b/platform/generic/include/spacemit/k1.h
index 7095bc08..8d4f5344 100644
--- a/platform/generic/include/spacemit/k1.h
+++ b/platform/generic/include/spacemit/k1.h
@@ -20,8 +20,7 @@
/* ECC enable */
#define MSETUP_ECCE BIT(16)
-/* icache invalidation */
-#define MRAOP_ICACHE_INVALID GENMASK(1, 0)
+#define MRAOP_CACHE_FLUSH GENMASK(1, 0)
#define PMU_AP_BASE 0xd4282800
--
2.55.0
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next prev parent reply other threads:[~2026-10-23 3:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 3:44 [PATCH v5 0/6] platform: generic: spacemit: add K3 platform support Troy Mitchell
2026-10-23 3:44 ` [PATCH v5 1/6] lib: sbi: select expected trap handler per hart Troy Mitchell
2026-10-23 4:08 ` Anup Patel
2026-10-23 6:14 ` Troy Mitchell
2026-10-23 3:44 ` Troy Mitchell [this message]
2026-10-23 3:44 ` [PATCH v5 3/6] platform: generic: spacemit: k1: move hart init to nascent hook Troy Mitchell
2026-10-23 3:44 ` [PATCH v5 4/6] platform: generic: spacemit: k1: refactor platform support Troy Mitchell
2026-10-23 3:44 ` [PATCH v5 5/6] platform: generic: spacemit: k3: add " Troy Mitchell
2026-10-23 3:44 ` [PATCH v5 6/6] platform: generic: spacemit: k3: override cold_boot_allowed for hart 0 only Troy Mitchell
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=20261023-spacemit-k3-v5-2-c5ddfc72caa4@linux.spacemit.com \
--to=troy.mitchell@linux.spacemit.com \
--cc=anup@brainfault.org \
--cc=e@freeshell.de \
--cc=ganboing@gmail.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=opensbi@lists.infradead.org \
--cc=samuel.holland@sifive.com \
--cc=xianbin.zhu@linux.spacemit.com \
--cc=zhangmeng.kevin@linux.spacemit.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