[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251210-profiles-v1-3-315a6ff2ca5a@gmail.com>
Date: Wed, 10 Dec 2025 08:13:40 -0800
From: Charlie Jenkins <charlie@...osinc.com>
To: Paul Walmsley <pjw@...nel.org>, Palmer Dabbelt <palmer@...belt.com>,
Alexandre Ghiti <alex@...ti.fr>, Anup Patel <anup@...infault.org>,
Atish Patra <atish.patra@...ux.dev>,
Samuel Holland <samuel.holland@...ive.com>,
Björn Töpel <bjorn@...nel.org>,
Luke Nelson <luke.r.nels@...il.com>, Xi Wang <xi.wang@...il.com>,
Eric Biggers <ebiggers@...nel.org>, Conor Dooley <conor@...nel.org>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Charlie Jenkins <thecharlesjenkins@...il.com>
Subject: [PATCH RFC 03/10] riscv: kconfig: Simply arch selection
Separate out the base arch into kconfig so it's reusable as a string
variable.
Signed-off-by: Charlie Jenkins <thecharlesjenkins@...il.com>
---
arch/riscv/Kconfig | 5 +++++
arch/riscv/Makefile | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 22a6fed0b216..ecf22223962a 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -418,6 +418,11 @@ config ARCH_RV64I
endchoice
+config ARCH
+ string
+ default "rv32ima" if ARCH_RV32I
+ default "rv64ima" if ARCH_RV64I
+
# We must be able to map all physical memory into the kernel, but the compiler
# is still a bit more efficient when generating code if it's setup in a manner
# such that it can only map 2GiB of memory.
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 4c6de57f65ef..ef1a7b1bffe8 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -58,8 +58,7 @@ ifeq ($(CONFIG_SHADOW_CALL_STACK),y)
endif
# ISA string setting
-riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
-riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
+riscv-march-y := $(CONFIG_ARCH)
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
riscv-march-$(CONFIG_RISCV_ISA_V) := $(riscv-march-y)v
--
2.43.0
Powered by blists - more mailing lists