linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: compat: s/failed/unsupported if compat mode isn't supported
@ 2022-08-21 14:18 Jisheng Zhang
  2022-08-21 14:37 ` Guo Ren
  2022-10-06  2:35 ` Palmer Dabbelt
  0 siblings, 2 replies; 3+ messages in thread
From: Jisheng Zhang @ 2022-08-21 14:18 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren
  Cc: linux-riscv, linux-kernel

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

Signed-off-by: Jisheng Zhang <jszhang@kernel.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 ceb9ebab6558..b0c63e8e867e 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] riscv: compat: s/failed/unsupported if compat mode isn't supported
  2022-08-21 14:18 [PATCH] riscv: compat: s/failed/unsupported if compat mode isn't supported Jisheng Zhang
@ 2022-08-21 14:37 ` Guo Ren
  2022-10-06  2:35 ` Palmer Dabbelt
  1 sibling, 0 replies; 3+ messages in thread
From: Guo Ren @ 2022-08-21 14:37 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel

On Sun, Aug 21, 2022 at 10:27 PM Jisheng Zhang <jszhang@kernel.org> 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
Acked-by: Guo Ren <guoren@kernel.org>

> this is the real compat_mode_supported meaning. After the patch, the
> msg would be:
> [    0.050407] riscv: ELF compat mode unsupported
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.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 ceb9ebab6558..b0c63e8e867e 100644
> --- a/arch/riscv/kernel/process.c
> +++ b/arch/riscv/kernel/process.c
> @@ -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
>


-- 
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] riscv: compat: s/failed/unsupported if compat mode isn't supported
  2022-08-21 14:18 [PATCH] riscv: compat: s/failed/unsupported if compat mode isn't supported Jisheng Zhang
  2022-08-21 14:37 ` Guo Ren
@ 2022-10-06  2:35 ` Palmer Dabbelt
  1 sibling, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2022-10-06  2:35 UTC (permalink / raw)
  To: jszhang; +Cc: Paul Walmsley, aou, guoren, linux-riscv, linux-kernel

On Sun, 21 Aug 2022 07:18:19 PDT (-0700), jszhang@kernel.org 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
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.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 ceb9ebab6558..b0c63e8e867e 100644
> --- a/arch/riscv/kernel/process.c
> +++ b/arch/riscv/kernel/process.c
> @@ -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.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-06  2:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-21 14:18 [PATCH] riscv: compat: s/failed/unsupported if compat mode isn't supported Jisheng Zhang
2022-08-21 14:37 ` Guo Ren
2022-10-06  2:35 ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).