From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 2/6] RISC-V: rename HAS_CACHE to RISCV_ICACHE
Date: Thu, 13 Mar 2025 08:54:12 +0100 [thread overview]
Message-ID: <20250313075416.3202194-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250313075416.3202194-1-a.fatoum@pengutronix.de>
CONFIG_HAS_CACHE only serves a purpose on RISC-V to allow barebox to run
on softcores without fence.i instruction. Rename the symbol to reflect
that in preparation for removing HAS_CACHE altogether.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
- no change
---
arch/riscv/Kconfig.socs | 9 ++++++---
arch/riscv/include/asm/cache.h | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index ccda688faf6d..4a3b56b5fff4 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -19,7 +19,7 @@ config SOC_VIRT
bool "QEMU Virt Machine"
select RISCV_S_MODE
select BOARD_GENERIC_DT
- select HAS_CACHE
+ select RISCV_ICACHE
select HAS_DEBUG_LL
help
Generates an image tht can be be booted by QEMU. The image is called
@@ -46,7 +46,7 @@ config BOARD_RISCVEMU
config CPU_SIFIVE
bool
- select HAS_CACHE
+ select RISCV_ICACHE
config SOC_SIFIVE
bool "SiFive SoCs"
@@ -116,7 +116,7 @@ config SOC_ALLWINNER_SUN20I
bool "Allwinner Sun20i SoCs"
depends on ARCH_RV64I
select HAS_DEBUG_LL
- select HAS_CACHE
+ select RISCV_ICACHE
if SOC_ALLWINNER_SUN20I
@@ -130,6 +130,9 @@ endif
comment "CPU features"
+config RISCV_ICACHE
+ bool
+
config SIFIVE_L2
bool "SiFive L2 cache controller"
depends on CPU_SIFIVE
diff --git a/arch/riscv/include/asm/cache.h b/arch/riscv/include/asm/cache.h
index c787f890017e..8c3cde669c30 100644
--- a/arch/riscv/include/asm/cache.h
+++ b/arch/riscv/include/asm/cache.h
@@ -21,7 +21,7 @@ static inline void thead_local_flush_icache_all(void)
static inline void local_flush_icache_all(void)
{
-#ifdef CONFIG_HAS_CACHE
+#ifdef CONFIG_RISCV_ICACHE
switch(riscv_vendor_id()) {
case THEAD_VENDOR_ID:
thead_local_flush_icache_all();
--
2.39.5
next prev parent reply other threads:[~2025-03-13 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 7:54 [PATCH v2 1/6] arch: move promptless options to end of Kconfig file Ahmad Fatoum
2025-03-13 7:54 ` Ahmad Fatoum [this message]
2025-03-13 7:54 ` [PATCH v2 3/6] treewide: retire CONFIG_HAS_CACHE Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 4/6] arch: move hidden arch options to arch/Kconfig Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 5/6] arch: move PHYS_ADDR_T_64BIT definition " Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 6/6] x86: move CONFIG_PHYS_ADDR_T_64BIT setting into Kconfig Ahmad Fatoum
2025-03-14 16:08 ` [PATCH v2 1/6] arch: move promptless options to end of Kconfig file Sascha Hauer
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=20250313075416.3202194-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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