Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-02-01 Thread Guo Ren
On Tue, Feb 1, 2022 at 7:48 PM Arnd Bergmann wrote: > > On Tue, Feb 1, 2022 at 11:26 AM Guo Ren wrote: > > > > Hi Arnd & Christoph, > > > > The UXL field controls the value of XLEN for U-mode, termed UXLEN, > > which may differ from the > > value of XLEN for S-mode, termed SXLEN. The encoding of

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-02-01 Thread Arnd Bergmann
On Tue, Feb 1, 2022 at 11:26 AM Guo Ren wrote: > > Hi Arnd & Christoph, > > The UXL field controls the value of XLEN for U-mode, termed UXLEN, > which may differ from the > value of XLEN for S-mode, termed SXLEN. The encoding of UXL is the > same as that of the MXL > field of misa, shown in Table

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-02-01 Thread Guo Ren
Hi Arnd & Christoph, The UXL field controls the value of XLEN for U-mode, termed UXLEN, which may differ from the value of XLEN for S-mode, termed SXLEN. The encoding of UXL is the same as that of the MXL field of misa, shown in Table 3.1. Here is the patch. (We needn't exception helper, because

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-02-01 Thread Arnd Bergmann
On Tue, Feb 1, 2022 at 10:13 AM Guo Ren wrote: > On Tue, Feb 1, 2022 at 3:45 PM Christoph Hellwig wrote: > > On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > > > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig > > > wrote: > > > > > > > > Given that most rv64 implementations can't

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-02-01 Thread Guo Ren
On Tue, Feb 1, 2022 at 3:45 PM Christoph Hellwig wrote: > > On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig > > wrote: > > > > > > Given that most rv64 implementations can't run in rv32 mode, what is the > > > failure mode if

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-01-31 Thread Christoph Hellwig
On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig wrote: > > > > Given that most rv64 implementations can't run in rv32 mode, what is the > > failure mode if someone tries it with the compat mode enabled? > A static linked simple

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-01-31 Thread Guo Ren
On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig wrote: > > Given that most rv64 implementations can't run in rv32 mode, what is the > failure mode if someone tries it with the compat mode enabled? A static linked simple hello_world could still run on a non-compat support hardware. But most rv32

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-01-31 Thread Christoph Hellwig
Given that most rv64 implementations can't run in rv32 mode, what is the failure mode if someone tries it with the compat mode enabled?

[PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

2022-01-29 Thread guoren
From: Guo Ren Adds initial skeletal COMPAT Kbuild (Runing 32bit U-mode on 64bit S-mode) support. - Setup kconfig & dummy functions for compiling. - Implement compat_start_thread by the way. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann Cc: Palmer Dabbelt ---