[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231112061514.2306187-11-guoren@kernel.org>
Date: Sun, 12 Nov 2023 01:14:46 -0500
From: guoren@...nel.org
To: arnd@...db.de, guoren@...nel.org, palmer@...osinc.com,
tglx@...utronix.de, conor.dooley@...rochip.com, heiko@...ech.de,
apatel@...tanamicro.com, atishp@...shpatra.org, bjorn@...nel.org,
paul.walmsley@...ive.com, anup@...infault.org, jiawei@...as.ac.cn,
liweiwei@...as.ac.cn, wefu@...hat.com, U2FsdGVkX1@...il.com,
wangjunqiang@...as.ac.cn, kito.cheng@...ive.com,
andy.chiu@...ive.com, vincent.chen@...ive.com,
greentime.hu@...ive.com, wuwei2016@...as.ac.cn, jrtc27@...c27.com,
luto@...nel.org, fweimer@...hat.com, catalin.marinas@....com,
hjl.tools@...il.com
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, Guo Ren <guoren@...ux.alibaba.com>
Subject: [RFC PATCH V2 10/38] riscv: u64ilp32: Remove the restriction of UXL=32
From: Guo Ren <guoren@...ux.alibaba.com>
The u64ilp32 needn't hardware support UXL=32, so remove the
restriction when EF_RISCV_64ILP32 is detected.
Reported-by: Junqiang Wang <wangjunqiang@...as.ac.cn>
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Signed-off-by: Guo Ren <guoren@...nel.org>
---
arch/riscv/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index e32d737e039f..93057ca2e2a7 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -88,7 +88,7 @@ static bool compat_mode_supported __read_mostly;
bool compat_elf_check_arch(Elf32_Ehdr *hdr)
{
- return compat_mode_supported &&
+ return (compat_mode_supported || (hdr->e_flags & EF_RISCV_64ILP32)) &&
hdr->e_machine == EM_RISCV &&
hdr->e_ident[EI_CLASS] == ELFCLASS32;
}
--
2.36.1
Powered by blists - more mailing lists