Skip to contentSkip to conversation

riscv: compat: s/failed/unsupported if compat mode isn't supported

PATCH In review Jisheng Zhang 3 participants 3 messages Aug 21, 2022 – Oct 6, 2022 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: compat: s/failed/unsupported if compat mode isn't supported

When compat mode isn't supported(I believe this is the most case now), kernel will emit somthing as:

[    0.050407] riscv: ELF compat mode failed

This msg may make users think there's something wrong with the kernel itself, replace "failed" with "unsupported" to make it clear. In fact this is the real compat_mode_supported meaning. After the patch, the msg would be:

[    0.050407] riscv: ELF compat mode unsupported
---
 arch/riscv/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/process.c +1 -1
index ceb9ebab6558..b0c63e8e867e 100644
@@ -105,7 +105,7 @@ static int __init compat_mode_detect(void)
 	csr_write(CSR_STATUS, tmp);
 
 	pr_info("riscv: ELF compat mode %s",
-			compat_mode_supported ? "supported" : "failed");
+			compat_mode_supported ? "supported" : "unsupported");
 
 	return 0;
 }
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jisheng Zhang

When compat mode isn't supported(I believe this is the most case now), kernel will emit somthing as:

[    0.050407] riscv: ELF compat mode failed

This msg may make users think there's something wrong with the kernel itself, replace "failed" with "unsupported" to make it clear. In fact

Quoted 25 lines

this is the real compat_mode_supported meaning. After the patch, the msg would be:

[    0.050407] riscv: ELF compat mode unsupported
---
 arch/riscv/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/process.c +1 -2
index ceb9ebab6558..b0c63e8e867e 100644
@@ -105,7 +105,7 @@ static int __init compat_mode_detect(void)
        csr_write(CSR_STATUS, tmp);
 
        pr_info("riscv: ELF compat mode %s",
-                       compat_mode_supported ? "supported" : "failed");
+                       compat_mode_supported ? "supported" : "unsupported");
 
        return 0;
 }
--

2.34.1

Signature · 2 lines
Best Regards
 Guo Ren
maintainer
#2 lore raw
In reply to Jisheng Zhang
Quoted 20 lines · On Sun, 21 Aug 2022 07:18:19 PDT (-0700), [email protected] wrote:

When compat mode isn't supported(I believe this is the most case now), kernel will emit somthing as:

[    0.050407] riscv: ELF compat mode failed

This msg may make users think there's something wrong with the kernel itself, replace "failed" with "unsupported" to make it clear. In fact this is the real compat_mode_supported meaning. After the patch, the msg would be:

[    0.050407] riscv: ELF compat mode unsupported
---
 arch/riscv/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/process.c +0 -0
index ceb9ebab6558..b0c63e8e867e 100644

arch/riscv/kernel/process.c static int __init compat_mode_detect(void) · line 111

Quoted 8 lines
arch/riscv/kernel/process.c +1 -1
@@ -105,7 +105,7 @@ static int __init compat_mode_detect(void)
 	csr_write(CSR_STATUS, tmp);
 
 	pr_info("riscv: ELF compat mode %s",
-			compat_mode_supported ? "supported" : "failed");
+			compat_mode_supported ? "supported" : "unsupported");
 
 	return 0;
 }

Thanks, this is on for-next.