RISC-V big-endian support
Subsystems (8)
This is a new series for experimental support for big-endian RISC-V operation. This has now been tested on both QEMU and a Codethink built CVA6 FPGA as well as being joined by MIPS and their I8500.
Since MIPS will be shipping systems with big-endian support and the work we have done with QEMU, we feel that there there is now a good case for this support to be upstreamed.
The support is currently gated by CONFIG_EXPRIMENTAL until we get more testing through, and removes CONFIG_VECTOR and the 32bit compatibiltiy as this has not been tested and needs work.
The KVM support does include an interface to allow access to the HSTATUS to allow running KVM with different endian-ness to the host (which has been through a very quick test). We'll push kvmtool pathches once this has been reviewed.
We have a big-endian buildroot with ucblic on our project page, and will be working to send updates to buildroot, uclibc, u-boot and qemu with more work being done by MIPS which will include glibc, clang/llvm, etc.
Project page: https://gitlab.com/CodethinkLabs/riscv_bigendian
MIPS I8500: https://mips.com/products/hardware/i8500/
Kernel branch: https://gitlab.com/CodethinkLabs/linux-kernel/-/commits/bjdooks/dev_v617_rc2
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 1/18 riscv: add initial kconfig and build flags for big-endian
Add initial kconfig and makefile updates to get a base big-endian build for arch/riscv. Will require header updates for IO code and features whcih are known to not work.
Make this depend on CONFIG_EXPERIMENTAL for now as there are bits that have not been fully fixed to work big-endian.
--- arch/riscv/Kconfig | 22 ++++++++++++++++++++++ arch/riscv/Makefile | 15 ++++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-)
arch/riscv/Kconfig +22 -0
@@ -436,6 +436,28 @@ choice bool "medium any code model" endchoice +choice + prompt "Data endian" + default CPU_LITTLE_ENDIAN + help + Configure the endiannes of data access performed by the CPU. + This will require system to be booted from M mode in big endian + and the userland to be compiled for the same endian-ness. + +config CPU_BIG_ENDIAN + bool "Build big-endian kernel" + depends on EXPERT + help + Say Y if you want to run big-endian kernel and userspace + Set for expert as this experimental + +config CPU_LITTLE_ENDIAN + bool "Build little-endian kernel (default)" + help + Say Y if you want to run little-endian kernel and userspace + This is the default for most distributions +endchoice + config MODULE_SECTIONS bool select HAVE_MOD_ARCH_SPECIFIC
arch/riscv/Makefile +12 -3
@@ -21,6 +21,11 @@ else endif endif +ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) +KBUILD_CPPFLAGS += -mbig-endian -D__RISCVEB__ +CHECKFLAGS += -D__RISCVEB__ +endif + ifeq ($(CONFIG_CMODEL_MEDLOW),y) KBUILD_CFLAGS_MODULE += -mcmodel=medany endif
@@ -28,13 +33,17 @@ endif export BITS ifeq ($(CONFIG_ARCH_RV64I),y) BITS := 64 - UTS_MACHINE := riscv64 + ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) + UTS_MACHINE := riscv64_be + KBUILD_LDFLAGS += -melf64briscv + else + UTS_MACHINE := riscv64 + KBUILD_LDFLAGS += -melf64lriscv + endif KBUILD_CFLAGS += -mabi=lp64 KBUILD_AFLAGS += -mabi=lp64 - KBUILD_LDFLAGS += -melf64lriscv - KBUILD_RUSTFLAGS += -Ctarget-cpu=generic-rv64 --target=riscv64imac-unknown-none-elf \ -Cno-redzone else
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 2/18 riscv: update byteorder.h for big-endian
In reply to Ben DooksAdd checks for big-endian, using BYTE_ORDER as
modern compilers should define this and anything
that isn't is probably too old to build a system.
---
v2:
- rewritten to add better __BYTE_ORDER check
--- arch/riscv/include/uapi/asm/byteorder.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/riscv/include/uapi/asm/byteorder.h +4 -0
@@ -7,6 +7,10 @@#ifndef _UAPI_ASM_RISCV_BYTEORDER_H#define _UAPI_ASM_RISCV_BYTEORDER_H +#if defined(__RISCVEB__) || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#include <linux/byteorder/big_endian.h> +#else #include <linux/byteorder/little_endian.h> +#endif #endif /* _UAPI_ASM_RISCV_BYTEORDER_H */
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 3/18 riscv: disable vector if big-endian, gcc unsupported option
In reply to Ben DooksYou can't build with vector enabled at the moment so remove this until gcc is changed.
--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
@@ -656,6 +656,7 @@ config RISCV_ISA_V bool "Vector extension support" depends on TOOLCHAIN_HAS_V depends on FPU + depends on CPU_LITTLE_ENDIAN select DYNAMIC_SIGFRAME default y help
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 4/18 riscv: word-at-atime: move to generic if we're big endian
In reply to Ben DooksUse the generic word at a time code if we're running in big endian for now otherwise this doesn't work. Add better support later.
--- arch/riscv/include/asm/word-at-a-time.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
arch/riscv/include/asm/word-at-a-time.h +10 -1
@@ -8,8 +8,13 @@#ifndef _ASM_RISCV_WORD_AT_A_TIME_H#define _ASM_RISCV_WORD_AT_A_TIME_H -#include <asm/asm-extable.h> + +#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +/* use the generic one for big-endian */ +#include <asm-generic/word-at-a-time.h> +#else +#include <linux/bitops.h> #include <linux/wordpart.h>
@@ -47,6 +52,10 @@ static inline unsigned long find_zero(unsigned long mask)/* The mask we created is directly usable as a bytemask */ #define zero_bytemask (mask) (mask) +#endif /* little endian case*/ + + +#ifdef CONFIG_DCACHE_WORD_ACCESS /*
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 5/18 riscv: asm: use .insn for making custom instructioons
In reply to Ben DooksUsing .word breaks with big endian builds, making something which is not a valid or worse an instruction or pair that does something which is not intended.
--- arch/riscv/include/asm/insn-def.h | 7 +++++++ 1 file changed, 7 insertions(+)
arch/riscv/include/asm/insn-def.h +7 -0
@@ -256,10 +256,17 @@INSN_S (OPCODE_OP_IMM ,FUNC3 (6 ),__RS2 (3 ), \ SIMM12((offset) & 0xfe0), RS1(base)) +#ifndef CONFIG_AS_HAS_INSN #define RISCV_PAUSE ".4byte 0x100000f"#define ZAWRS_WRS_NTO ".4byte 0x00d00073"#define ZAWRS_WRS_STO ".4byte 0x01d00073"#define RISCV_NOP4 ".4byte 0x00000013" +#else +#define RISCV_PAUSE ".insn 0x100000f" +#define ZAWRS_WRS_NTO ".insn 0x00d00073" +#define ZAWRS_WRS_STO ".insn 0x01d00073" +#define RISCV_NOP4 ".insn 0x00000013" +#endif #define RISCV_INSN_NOP4 _AC(0x00000013, U)
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 05/18] riscv: asm: use .insn for making custom instructioons
Quoted 18 lines · Ben Dooks
Using .word breaks with big endian builds, making something which is not a valid or worse an instruction or pair that does something which is not intended.
Signed-off-by Ben Dooks <[email protected]>--- arch/riscv/include/asm/insn-def.h | 7 +++++++ 1 file changed, 7 insertions(+)arch/riscv/include/asm/insn-def.h +1
-0@@ -256,10 +256,17 @@INSN_S (OPCODE_OP_IMM ,FUNC3 (6 ),__RS2 (3 ), \ SIMM12((offset) & 0xfe0), RS1(base)) +#ifndef CONFIG_AS_HAS_INSN
arch/riscv/include/asm/insn-def.h line 269
Quoted 10 lines
arch/riscv/include/asm/insn-def.h +6
-0#define RISCV_PAUSE ".4byte 0x100000f"#define ZAWRS_WRS_NTO ".4byte 0x00d00073"#define ZAWRS_WRS_STO ".4byte 0x01d00073"#define RISCV_NOP4 ".4byte 0x00000013" +#else +#define RISCV_PAUSE ".insn 0x100000f" +#define ZAWRS_WRS_NTO ".insn 0x00d00073" +#define ZAWRS_WRS_STO ".insn 0x01d00073" +#define RISCV_NOP4 ".insn 0x00000013" +#endif
I agree we should use .insn when possible because it provides validation and allows mapping symbols to identify the words as instructions. So ack to the change, but without adding a depends on AS_HAS_INSN to the riscv CPU_BIG_ENDIAN config, then the commit message should drop the reference to big endian for its motivation.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 05/18] riscv: asm: use .insn for making custom instructioons
Quoted 27 lines · Andrew Jones
Quoted 26 lines · Ben Dooks
Using .word breaks with big endian builds, making something which is not a valid or worse an instruction or pair that does something which is not intended.
Signed-off-by Ben Dooks <[email protected]>--- arch/riscv/include/asm/insn-def.h | 7 +++++++ 1 file changed, 7 insertions(+)arch/riscv/include/asm/insn-def.h +5
-0@@ -256,10 +256,17 @@INSN_S (OPCODE_OP_IMM ,FUNC3 (6 ),__RS2 (3 ), \ SIMM12((offset) & 0xfe0), RS1(base)) +#ifndef CONFIG_AS_HAS_INSN #define RISCV_PAUSE ".4byte 0x100000f"#define ZAWRS_WRS_NTO ".4byte 0x00d00073"#define ZAWRS_WRS_STO ".4byte 0x01d00073"#define RISCV_NOP4 ".4byte 0x00000013" +#else +#define RISCV_PAUSE ".insn 0x100000f" +#define ZAWRS_WRS_NTO ".insn 0x00d00073" +#define ZAWRS_WRS_STO ".insn 0x01d00073"
Quoted 9 lines
arch/riscv/include/asm/insn-def.h line 269
Quoted 2 lines
arch/riscv/include/asm/insn-def.h +2
-0+#define RISCV_NOP4 ".insn 0x00000013" +#endif I agree we should use .insn when possible because it provides validation and allows mapping symbols to identify the words as instructions. So ack to the change, but without adding a depends on
AS_HAS_INSNto the riscvCPU_BIG_ENDIANconfig, then the commit message should drop the reference to big endian for its motivation.
And Patch14 of this series looks good, but it should be squashed into this one.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 05/18] riscv: asm: use .insn for making custom instructioons
Quoted 38 lines · Andrew Jones
Quoted 27 lines · Andrew Jones
Quoted 26 lines · Ben Dooks
Using .word breaks with big endian builds, making something which is not a valid or worse an instruction or pair that does something which is not intended.
Signed-off-by Ben Dooks <[email protected]>--- arch/riscv/include/asm/insn-def.h | 7 +++++++ 1 file changed, 7 insertions(+)arch/riscv/include/asm/insn-def.h +5
-0@@ -256,10 +256,17 @@INSN_S (OPCODE_OP_IMM ,FUNC3 (6 ),__RS2 (3 ), \ SIMM12((offset) & 0xfe0), RS1(base)) +#ifndef CONFIG_AS_HAS_INSN #define RISCV_PAUSE ".4byte 0x100000f"#define ZAWRS_WRS_NTO ".4byte 0x00d00073"#define ZAWRS_WRS_STO ".4byte 0x01d00073"#define RISCV_NOP4 ".4byte 0x00000013" +#else +#define RISCV_PAUSE ".insn 0x100000f" +#define ZAWRS_WRS_NTO ".insn 0x00d00073" +#define ZAWRS_WRS_STO ".insn 0x01d00073"Quoted 9 lines
arch/riscv/include/asm/insn-def.h line 269
Quoted 2 lines
arch/riscv/include/asm/insn-def.h +2
-0+#define RISCV_NOP4 ".insn 0x00000013" +#endif I agree we should use .insn when possible because it provides validation and allows mapping symbols to identify the words as instructions. So ack to the change, but without adding a depends on
AS_HAS_INSNto the riscvCPU_BIG_ENDIANconfig, then the commit message should drop the reference to big endian for its motivation.
Quoted 6 lines
And Patch14 of this series looks good, but it should be squashed into this one.
Thanks,
drew
ok, thanks.
Signature · 9 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 6/18 kconfig: remove CONFIG_COMAPT for big-endian
In reply to Ben DooksThis code does not currently build with big-endian so disable it for now.
--- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/Kconfig +1 -1
@@ -1119,7 +1119,7 @@ config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION config COMPAT bool "Kernel support for 32-bit U-mode" default 64BIT - depends on 64BIT && MMU + depends on 64BIT && MMU && !CPU_BIG_ENDIAN help This option enables support for a 32-bit U-mode running under a 64-bit kernel at S-mode. riscv32-specific components such as system calls,
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 7/18 riscv: fixup use of natural endian on instructions
In reply to Ben DooksThe priveldged ISA spec says that all instructions should be treated as little endian, so if we load them from memory we should do le{16,32}_to_cpu on these and the reverse when storing.
This fixes jump_label, bug and related functions for big endian builds.
--- arch/riscv/kernel/alternative.c | 10 +++++++++- arch/riscv/kernel/cfi.c | 3 ++- arch/riscv/kernel/jump_label.c | 5 ++++- arch/riscv/kernel/traps.c | 2 ++ arch/riscv/kernel/traps_misaligned.c | 3 +++ 5 files changed, 20 insertions(+), 3 deletions(-)
arch/riscv/kernel/alternative.c +9 -1
@@ -62,11 +62,16 @@ static void riscv_fill_cpu_mfr_info(struct cpu_manufacturer_info_t *cpu_mfr_info } } +static u32 get_u16 (u16 *ptr) +{ +return le16_to_cpu (*ptr); +} +static u32 riscv_instruction_at (void *p) {u16 *parcel = p; -return (u32 )parcel[0 ] | (u32 )parcel[1 ] <<16 ; +return (u32 )get_u16 (parcel+0 ) | (u32 )get_u16 (parcel+1 ) <<16 ; } static void riscv_alternative_fix_auipc_jalr(void *ptr, u32 auipc_insn,
@@ -83,6 +88,8 @@ static void riscv_alternative_fix_auipc_jalr(void *ptr, u32 auipc_insn,riscv_insn_insert_utype_itype_imm (&call[0 ], &call[1 ], imm);/* patch the call place again */ + call[0 ] =cpu_to_le32 (call[0 ]); + call[1 ] =cpu_to_le32 (call[1 ]);patch_text_nosync (ptr, call,sizeof (u32) *2 ); }
@@ -98,6 +105,7 @@ static void riscv_alternative_fix_jal(void *ptr, u32 jal_insn, int patch_offset)riscv_insn_insert_jtype_imm (&jal_insn, imm);/* patch the call place again */ + jal_insn =cpu_to_le32 (jal_insn);patch_text_nosync (ptr, &jal_insn,sizeof (u32)); }
arch/riscv/kernel/cfi.c +2 -1
@@ -37,15 +37,16 @@ static bool decode_cfi_insn(struct pt_regs *regs, unsigned long *target,*/ if (get_kernel_nofault (insn, (void *)regs->epc -4 ))return false; + insn =le32_to_cpu (insn);if (!riscv_insn_is_beq (insn))return false; - *type = (u32 )regs_ptr[RV_EXTRACT_RS1_REG (insn)];if (get_kernel_nofault (insn, (void *)regs->epc) ||get_kernel_nofault (insn, (void *)regs->epc +GET_INSN_LENGTH (insn)))return false; + insn =le32_to_cpu (insn);if (riscv_insn_is_jalr (insn)) rs1_num =RV_EXTRACT_RS1_REG (insn);else if (riscv_insn_is_c_jalr (insn))
arch/riscv/kernel/jump_label.c +4 -1
@@ -19,7 +19,7 @@ bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type) {void *addr = (void *)jump_entry_code (entry); -u32 insn; +__le32 insn;if (type ==JUMP_LABEL_JMP ) {long offset =jump_entry_target (entry) -jump_entry_code (entry);
@@ -36,6 +36,9 @@ bool arch_jump_label_transform_queue(struct jump_entry *entry, insn =RISCV_INSN_NOP4 ; } + + insn =cpu_to_le32 (insn); +if (early_boot_irqs_disabled) { riscv_patch_in_stop_machine =1 ;patch_insn_write (addr, &insn,sizeof (insn));
arch/riscv/kernel/traps.c +2 -0
@@ -263,6 +263,7 @@ static inline unsigned long get_break_insn_length(unsigned long pc)if (get_kernel_nofault (insn, (bug_insn_t *)pc))return 0 ; + insn =le32_to_cpu (insn);return GET_INSN_LENGTH (insn); }
@@ -411,6 +412,7 @@ int is_valid_bugaddr(unsigned long pc)return 0 ;if (get_kernel_nofault (insn, (bug_insn_t *)pc))return 0 ; + insn =cpu_to_le32 (insn);if ((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32)return (insn == __BUG_INSN_32);else
arch/riscv/kernel/traps_misaligned.c +3 -0
@@ -299,6 +299,7 @@ static inline int get_insn(struct pt_regs *regs, ulong epc, ulong *r_insn)* below with the upper 16 bits half. */ insn &=GENMASK (15 ,0 ); + insn =le16_to_cpu (insn);if ((insn & __INSN_LENGTH_MASK) != __INSN_LENGTH_32) { *r_insn = insn;return 0 ;
@@ -306,12 +307,14 @@ static inline int get_insn(struct pt_regs *regs, ulong epc, ulong *r_insn) epc +=sizeof (u16);if (__read_insn (regs, tmp, epc, u16))return -EFAULT ; + tmp =le16_to_cpu (tmp); *r_insn = (tmp <<16 ) | insn;return 0 ; }else {if (__read_insn (regs, insn, epc, u32))return -EFAULT ; + insn =le32_to_cpu (insn);if ((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) { *r_insn = insn;return 0 ;
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 8/18 riscv: bpf: big endian fixes, updated BPF_ALU ops
In reply to Ben DooksIf running big endian then the instruction stream needs to be written le16/le323 and the BPF BSWAP instrictions need to correctly set the endian.
--- arch/riscv/net/bpf_jit.h | 14 +++++++++----- arch/riscv/net/bpf_jit_comp64.c | 29 +++++++++++++++++------------ 2 files changed, 26 insertions(+), 17 deletions(-)
arch/riscv/net/bpf_jit.h +9 -5
@@ -28,6 +28,12 @@ static inline bool rvzbb_enabled(void)return IS_ENABLED (CONFIG_RISCV_ISA_ZBB ) &&riscv_has_extension_likely (RISCV_ISA_EXT_ZBB ); } +static inline bool alu_end_should_swap (u32 code) +{ +u32 endian =IS_ENABLED (CONFIG_CPU_BIG_ENDIAN ) ?BPF_FROM_BE :BPF_FROM_LE ; +return (code &BPF_FROM_BE ) != endian; +} +enum {RV_REG_ZERO =0 ,/* The constant value 0 */ RV_REG_RA =1 ,/* Return address */
@@ -117,10 +123,8 @@ static inline void bpf_flush_icache(void *start, void *end)/* Emit a 4-byte riscv instruction. */ static inline void emit (const u32 insn,struct rv_jit_context *ctx) { -if (ctx->insns) { - ctx->insns[ctx->ninsns] = insn; - ctx->insns[ctx->ninsns +1 ] = (insn >>16 ); - } +if (ctx->insns) +put_unaligned_le32 (insn, ctx->insns+ctx->ninsns); ctx->ninsns +=2 ; }
@@ -131,7 +135,7 @@ static inline void emitc(const u16 insn, struct rv_jit_context *ctx)BUILD_BUG_ON (!rvc_enabled ());if (ctx->insns) - ctx->insns[ctx->ninsns] = insn; + ctx->insns[ctx->ninsns] =cpu_to_le16 (insn); ctx->ninsns++; }
arch/riscv/net/bpf_jit_comp64.c +17 -12
@@ -1479,20 +1479,25 @@ int bpf_jit_emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,/* dst = BSWAP##imm(dst) */ case BPF_ALU |BPF_END |BPF_FROM_LE : -switch (imm) { -case 16 : -emit_zexth (rd, rd, ctx); -break ; -case 32 : -if (!aux->verifier_zext) -emit_zextw (rd, rd, ctx); -break ; -case 64 : -/* Do nothing */ -break ; +case BPF_ALU |BPF_END |BPF_FROM_BE : +if (alu_end_should_swap (code)) { +emit_bswap (rd, imm, ctx); + }else { +switch (imm) { +case 16 : +emit_zexth (rd, rd, ctx); +break ; +case 32 : +if (!aux->verifier_zext) +emit_zextw (rd, rd, ctx); +break ; +case 64 : +/* Do nothing */ +break ; + } }break ; -case BPF_ALU |BPF_END |BPF_FROM_BE : +case BPF_ALU64 |BPF_END |BPF_FROM_LE :emit_bswap (rd, imm, ctx);break ;
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 9/18 riscv: probes: sort out endian-ness
In reply to Ben DooksUpdated {k,u}probe code to deal with big endian mode where the instruction stream is always in little endian.
--- arch/riscv/kernel/probes/decode-insn.c | 2 +- arch/riscv/kernel/probes/decode-insn.h | 5 +++++ arch/riscv/kernel/probes/kprobes.c | 30 ++++++++++++++++---------- arch/riscv/kernel/probes/uprobes.c | 10 ++++----- 4 files changed, 30 insertions(+), 17 deletions(-)
arch/riscv/kernel/probes/decode-insn.c +1 -1
@@ -16,7 +16,7 @@enum probe_insn __kprobes riscv_probe_decode_insn (probe_opcode_t *addr,struct arch_probe_insn *api) { -probe_opcode_t insn = *addr; +probe_opcode_t insn =le32_to_cpu (*addr);/* * Reject instructions list:
arch/riscv/kernel/probes/decode-insn.h +5 -0
@@ -15,4 +15,9 @@ enum probe_insn {enum probe_insn __kprobes riscv_probe_decode_insn (probe_opcode_t *addr,struct arch_probe_insn *asi); +static inline int read_insn_length (void *ptr) +{ +return GET_INSN_LENGTH (le16_to_cpu (*(__le16 *)ptr)); +} +#endif /* _RISCV_KERNEL_KPROBES_DECODE_INSN_H */
arch/riscv/kernel/probes/kprobes.c +19 -11
@@ -24,13 +24,13 @@ post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *);static void __kprobes arch_prepare_ss_slot (struct kprobe *p) { -size_t len =GET_INSN_LENGTH (p->opcode); -u32 insn = __BUG_INSN_32; +size_t len =read_insn_length (&p->opcode); +u32 insn =cpu_to_le32 (__BUG_INSN_32); p->ainsn.api.restore = (unsigned long )p->addr + len;patch_text_nosync (p->ainsn.api.insn, &p->opcode, len); -patch_text_nosync ((void *)p->ainsn.api.insn + len, &insn,GET_INSN_LENGTH (insn)); +patch_text_nosync ((void *)p->ainsn.api.insn + len, &insn,GET_INSN_LENGTH (__BUG_INSN_32)); }static void __kprobes arch_prepare_simulate (struct kprobe *p)
@@ -58,7 +58,7 @@ static bool __kprobes arch_check_kprobe(struct kprobe *p)if (tmp == addr)return true; - tmp +=GET_INSN_LENGTH (*(u16 *)tmp); + tmp +=read_insn_length ((u16 *)tmp); }return false;
@@ -75,9 +75,9 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)return -EILSEQ ;/* copy instruction */ - p->opcode = (kprobe_opcode_t)(*insn++); -if (GET_INSN_LENGTH (p->opcode) ==4 ) - p->opcode |= (kprobe_opcode_t)(*insn) <<16 ; + *((u16 *)&p->opcode) = (*insn++); +if (read_insn_length (&p->opcode) ==4 ) + p->opcode = (kprobe_opcode_t)(*(u32 *)p->addr);/* decode instruction */ switch (riscv_probe_decode_insn (p->addr, &p->ainsn.api)) {
@@ -107,16 +107,24 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)/* install breakpoint in text */ void __kprobes arch_arm_kprobe (struct kprobe *p) { -size_t len =GET_INSN_LENGTH (p->opcode); -u32 insn = len ==4 ? __BUG_INSN_32 : __BUG_INSN_16; +size_t len =read_insn_length (&p->opcode); +u32 insn; + +if (len ==4 ) + insn =cpu_to_le32 (__BUG_INSN_32); +else { + insn =cpu_to_le16 (__BUG_INSN_16); + insn |=cpu_to_le16 (__BUG_INSN_16) <<16 ; + } +pr_info ("%s: patching %px (%d bytes)\n" , __func__, p->addr, (int )len);patch_text (p->addr, &insn, len); }/* remove breakpoint from text */ void __kprobes arch_disarm_kprobe (struct kprobe *p) { -size_t len =GET_INSN_LENGTH (p->opcode); +size_t len =read_insn_length (&p->opcode);patch_text (p->addr, &p->opcode, len); }
@@ -336,7 +344,7 @@ kprobe_single_step_handler(struct pt_regs *regs)struct kprobe *cur =kprobe_running ();if (cur && (kcb->kprobe_status & (KPROBE_HIT_SS |KPROBE_REENTER )) && - ((unsigned long )&cur->ainsn.api.insn[0 ] +GET_INSN_LENGTH (cur->opcode) == addr)) { + ((unsigned long )&cur->ainsn.api.insn[0 ] +read_insn_length (&cur->opcode) == addr)) {kprobes_restore_local_irqflag (kcb, regs);post_kprobe_handler (cur, kcb, regs);return true;
arch/riscv/kernel/probes/uprobes.c +5 -5
@@ -12,9 +12,9 @@bool is_swbp_insn (uprobe_opcode_t *insn) {#ifdef CONFIG_RISCV_ISA_C -return (*insn &0xffff ) ==UPROBE_SWBP_INSN ; +return (*(u16 *)insn) ==cpu_to_le16 (UPROBE_SWBP_INSN );#else -return *insn ==UPROBE_SWBP_INSN ; +return *insn ==cpu_to_le32 (UPROBE_SWBP_INSN );#endif }
@@ -35,7 +35,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, opcode = *(probe_opcode_t *)(&auprobe->insn[0 ]); - auprobe->insn_size =GET_INSN_LENGTH (opcode); + auprobe->insn_size =GET_INSN_LENGTH (le32_to_cpu (opcode));switch (riscv_probe_decode_insn (&opcode, &auprobe->api)) {case INSN_REJECTED :
@@ -173,8 +173,8 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,/* Add ebreak behind opcode to simulate singlestep */ if (vaddr) { - dst +=GET_INSN_LENGTH (*(probe_opcode_t *)src); - *(uprobe_opcode_t *)dst = __BUG_INSN_32; + dst +=read_insn_length (src); + *(uprobe_opcode_t *)dst =cpu_to_le32 (__BUG_INSN_32); }flush_icache_range (start, start + len);
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 10/18 riscv: ftrace big endian updates
In reply to Ben DooksMake the ftrace code work with big endian by ensuring the instruction stream is accessed little endian.
--- arch/riscv/include/asm/ftrace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/include/asm/ftrace.h +2 -2
@@ -99,8 +99,8 @@ struct dyn_arch_ftrace {do { \unsigned int offset = \ (unsigned long ) (callee) - (unsigned long ) (caller); \ - call[0 ] =to_auipc_t0 (offset); \ - call[1 ] =to_jalr_t0 (offset); \ + call[0 ] =cpu_to_le32 (to_auipc_t0 (offset)); \ + call[1 ] =cpu_to_le32 (to_jalr_t0 (offset)); \ }while (0 )/*
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 11/18 riscv: traps: make insn fetch common in unknown instruction
In reply to Ben DooksAdd the trapped instruction (insn) as the second argument to riscv_v_first_use_handler() from the trap handler so when we add more handlers we can do the fetch of the instruction just once.
---
- fixed wording of patch from rfc
v2:
- fixed todo by going to illegal instruction error if get_user fails
- added pointer print for failed read
- fixed issues with rebasing onto main branch
v3:
- removed print from v2
- rebased onto latest kernel
--- arch/riscv/include/asm/vector.h | 4 ++-- arch/riscv/kernel/traps.c | 7 +++++-- arch/riscv/kernel/vector.c | 11 +---------- 3 files changed, 8 insertions(+), 14 deletions(-)
arch/riscv/include/asm/vector.h +2 -2
@@ -43,7 +43,7 @@extern unsigned long riscv_v_vsize;int riscv_v_setup_vsize (void );bool insn_is_vector (u32 insn_buf); -bool riscv_v_first_use_handler (struct pt_regs *regs); +bool riscv_v_first_use_handler (struct pt_regs *regs,u32 insn);void kernel_vector_begin (void );void kernel_vector_end (void );void get_cpu_vector_context (void );
@@ -410,7 +410,7 @@ static __always_inline bool has_vector(void) { return false; } static __always_inline bool insn_is_vector(u32 insn_buf) { return false; } static __always_inline bool has_xtheadvector_no_alternatives(void) { return false; } static __always_inline bool has_xtheadvector(void) { return false; } -static inline bool riscv_v_first_use_handler (struct pt_regs *regs) {return false; } +static inline bool riscv_v_first_use_handler (struct pt_regs *regs,u32 insn) {return false; }static inline bool riscv_v_vstate_query (struct pt_regs *regs) {return false; }static inline bool riscv_v_vstate_ctrl_user_allowed (void ) {return false; }#define riscv_v_vsize (0)
arch/riscv/kernel/traps.c +5 -2
@@ -172,13 +172,16 @@ DO_ERROR_INFO(do_trap_insn_fault, asmlinkage __visible __trap_section void do_trap_insn_illegal(struct pt_regs *regs) { -bool handled; +bool handled = false;if (user_mode (regs)) { +u32 insn = (u32 )regs->badaddr; +irqentry_enter_from_user_mode (regs);local_irq_enable (); - handled =riscv_v_first_use_handler (regs); + handled =riscv_v_first_use_handler (regs, insn); +if (!handled)do_trap_error (regs,SIGILL ,ILL_ILLOPC , regs->epc,"Oops - illegal instruction" );
arch/riscv/kernel/vector.c +1 -10
@@ -178,11 +178,8 @@ bool riscv_v_vstate_ctrl_user_allowed(void) }EXPORT_SYMBOL_GPL (riscv_v_vstate_ctrl_user_allowed); -bool riscv_v_first_use_handler (struct pt_regs *regs) +bool riscv_v_first_use_handler (struct pt_regs *regs,u32 insn) { -u32 __user *epc = (u32 __user *)regs->epc; -u32 insn = (u32 )regs->badaddr; -if (!(has_vector () ||has_xtheadvector ()))return false;
@@ -194,12 +191,6 @@ bool riscv_v_first_use_handler(struct pt_regs *regs)if (riscv_v_vstate_query (regs))return false; -/* Get the instruction */ -if (!insn) { -if (__get_user (insn, epc)) -return false; - } -/* Filter out non-V instructions */ if (!insn_is_vector (insn))return false;
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 12/18 riscv: threads need UBE flag setting if big-endian
In reply to Ben DooksIf operating in big-endian, start all threads with UBE to keep them the same endian as the system.
--- arch/riscv/include/asm/csr.h | 1 + arch/riscv/kernel/process.c | 2 ++ 2 files changed, 3 insertions(+)
arch/riscv/include/asm/csr.h +1 -0
@@ -13,6 +13,7 @@#define SR_SIE _AC(0x00000002, UL)/* Supervisor Interrupt Enable */ #define SR_MIE _AC(0x00000008, UL)/* Machine Interrupt Enable */ #define SR_SPIE _AC(0x00000020, UL)/* Previous Supervisor IE */ +#define SR_UBE _AC(0x00000040, UL)/* User mode is big-endian */ #define SR_MPIE _AC(0x00000080, UL)/* Previous Machine IE */ #define SR_SPP _AC(0x00000100, UL)/* Previously Supervisor */ #define SR_MPP _AC(0x00001800, UL)/* Previously Machine */
arch/riscv/kernel/process.c +2 -0
@@ -144,6 +144,8 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) { regs->status =SR_PIE ; +if (IS_ENABLED (CONFIG_CPU_BIG_ENDIAN )) + regs->status |=SR_UBE ;if (has_fpu ()) { regs->status |=SR_FS_INITIAL ;/*
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 13/18 riscv: fixes for big-endian library routines
In reply to Ben DooksUpdate the unaligned handling of memory when in big-endian and the byte positions inside a loaded word change. Do this by wrapping the shift macros and swapping the left and right shfits.
--- arch/riscv/lib/memmove.S | 28 ++++++++++++++++++++-------- arch/riscv/lib/uaccess.S | 16 ++++++++++++++-- 2 files changed, 34 insertions(+), 10 deletions(-)
arch/riscv/lib/memmove.S +20 -8
@@ -6,6 +6,18 @@ #include <linux/linkage.h> #include <asm/asm.h> +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define M_SLL sll +#define M_SRL srl +#else + /* in big-endian, swap the direction of shifts to deal + * with the fact the order of bytes in a word has changed + * from ABCD to DCBA. + */ +#define M_SLL srl +#define M_SRL sll +#endif + SYM_FUNC_START(__memmove) /* * Returns
@@ -133,8 +145,8 @@ SYM_FUNC_START(__memmove) 1: REG_L t1, (1 * SZREG)(a1) addi t3, t3, (2 * SZREG) - srl t0, t0, a6 - sll t2, t1, a7 + M_SRL t0, t0, a6 + M_SLL t2, t1, a7 or t2, t0, t2 REG_S t2, ((0 * SZREG) - (2 * SZREG))(t3)
@@ -142,8 +154,8 @@ SYM_FUNC_START(__memmove) REG_L t0, (2 * SZREG)(a1) addi a1, a1, (2 * SZREG) - srl t1, t1, a6 - sll t2, t0, a7 + M_SRL t1, t1, a6 + M_SLL t2, t0, a7 or t2, t1, t2 REG_S t2, ((1 * SZREG) - (2 * SZREG))(t3)
@@ -195,8 +207,8 @@ SYM_FUNC_START(__memmove) 1: REG_L t0, (-1 * SZREG)(a4) addi t4, t4, (-2 * SZREG) - sll t1, t1, a7 - srl t2, t0, a6 + M_SLL t1, t1, a7 + M_SRL t2, t0, a6 or t2, t1, t2 REG_S t2, ( 1 * SZREG)(t4)
@@ -204,8 +216,8 @@ SYM_FUNC_START(__memmove) REG_L t1, (-2 * SZREG)(a4) addi a4, a4, (-2 * SZREG) - sll t0, t0, a7 - srl t2, t1, a6 + M_SLL t0, t0, a7 + M_SRL t2, t1, a6 or t2, t0, t2 REG_S t2, ( 0 * SZREG)(t4)
arch/riscv/lib/uaccess.S +14 -2
@@ -6,6 +6,18 @@ #include <asm/hwcap.h> #include <asm/alternative-macros.h> +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define M_SLL sll +#define M_SRL srl +#else + /* in big-endian, swap the direction of shifts to deal + * with the fact the order of bytes in a word has changed + * from ABCD to DCBA. + */ +#define M_SLL srl +#define M_SRL sll +#endif + .macro fixup op reg addr lbl 100: \op \reg, \addr
@@ -178,10 +190,10 @@ SYM_FUNC_START(fallback_scalar_usercopy_sum_enabled) */ /* At least one iteration will be executed */ - srl a4, a5, t3 + M_SRL a4, a5, t3 fixup REG_L a5, SZREG(a1), 10f addi a1, a1, SZREG - sll a2, a5, t4 + M_SLL a2, a5, t4 or a2, a2, a4 fixup REG_S a2, 0(a0), 10f addi a0, a0, SZREG
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 14/18 riscv: update to add ASM_INSN for .2byte instructions
In reply to Ben DooksIt would seem sensible to add an ASM_INSN() wrapper for anyone to use for hand assembly of instructions.
--- arch/riscv/include/asm/asm.h | 6 ++++++ arch/riscv/include/asm/insn-def.h | 15 ++++----------- 2 files changed, 10 insertions(+), 11 deletions(-)
arch/riscv/include/asm/asm.h +6 -0
@@ -12,6 +12,12 @@#define __ASM_STR (x) #x#endif +#ifndef CONFIG_AS_HAS_INSN +#define ASM_INSN (__x) ".4byte " __x +#else +#define ASM_INSN (__x) ".insn " __x +#endif +#if __riscv_xlen ==64 #define __REG_SEL (a, b) __ASM_STR(a)#elif __riscv_xlen ==32
arch/riscv/include/asm/insn-def.h +4 -11
@@ -256,17 +256,10 @@INSN_S (OPCODE_OP_IMM ,FUNC3 (6 ),__RS2 (3 ), \ SIMM12((offset) & 0xfe0), RS1(base)) -#ifndef CONFIG_AS_HAS_INSN -#define RISCV_PAUSE ".4byte 0x100000f" -#define ZAWRS_WRS_NTO ".4byte 0x00d00073" -#define ZAWRS_WRS_STO ".4byte 0x01d00073" -#define RISCV_NOP4 ".4byte 0x00000013" -#else -#define RISCV_PAUSE ".insn 0x100000f" -#define ZAWRS_WRS_NTO ".insn 0x00d00073" -#define ZAWRS_WRS_STO ".insn 0x01d00073" -#define RISCV_NOP4 ".insn 0x00000013" -#endif +#define RISCV_PAUSE ASM_INSN("0x100000f") +#define ZAWRS_WRS_NTO ASM_INSN("0x00d00073") +#define ZAWRS_WRS_STO ASM_INSN("0x01d00073") +#define RISCV_NOP4 ASM_INSN("0x00000013")#define RISCV_INSN_NOP4 _AC(0x00000013, U)
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 15/18 KVM: riscv: set HSTATUS big endian same as build
In reply to Ben DooksStart the guest in the same endian as the host.
--- arch/riscv/kvm/vcpu.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/riscv/kvm/vcpu.c +4 -0
@@ -75,6 +75,10 @@ static void kvm_riscv_vcpu_context_reset(struct kvm_vcpu *vcpu, cntx->hstatus |=HSTATUS_VTW ; cntx->hstatus |=HSTATUS_SPVP ; cntx->hstatus |=HSTATUS_SPV ; + +/* If configured big-endian, start guest in big endian */ +if (IS_ENABLED (CONFIG_CPU_BIG_ENDIAN )) + cntx->hstatus |=HSTATUS_VSBE ; }static void kvm_riscv_reset_vcpu (struct kvm_vcpu *vcpu,bool kvm_sbi_reset)
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 16/18 KVM: riscv: add hstatus to allow endian control
In reply to Ben Dooks--- arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 9 +++++++++ 2 files changed, 10 insertions(+)
arch/riscv/include/uapi/asm/kvm.h +1 -0
@@ -81,6 +81,7 @@ struct kvm_riscv_csr {unsigned long satp;unsigned long scounteren;unsigned long senvcfg; +unsigned long hstatus; };/* AIA CSR registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
arch/riscv/kvm/vcpu_onereg.c +9 -0
@@ -484,6 +484,7 @@ static int kvm_riscv_vcpu_general_get_csr(struct kvm_vcpu *vcpu,unsigned long reg_num, unsigned long *out_val) { + struct kvm_cpu_context *cntx = &vcpu->arch.guest_context;struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr;if (reg_num >=sizeof (struct kvm_riscv_csr ) /sizeof (unsigned long ))
@@ -493,6 +494,8 @@ static int kvm_riscv_vcpu_general_get_csr(struct kvm_vcpu *vcpu,kvm_riscv_vcpu_flush_interrupts (vcpu); *out_val = (csr->hvip >>VSIP_TO_HVIP_SHIFT ) &VSIP_VALID_MASK ; *out_val |= csr->hvip & ~IRQ_LOCAL_MASK ; + }else if (reg_num ==KVM_REG_RISCV_CSR_REG (hstatus)) { + *out_val = cntx->hstatus; }else *out_val = ((unsigned long *)csr)[reg_num];
@@ -503,6 +506,7 @@ static int kvm_riscv_vcpu_general_set_csr(struct kvm_vcpu *vcpu, unsigned long reg_num, unsigned long reg_val) { +struct kvm_cpu_context *cntx = &vcpu->arch.guest_context;struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr;if (reg_num >=sizeof (struct kvm_riscv_csr ) /sizeof (unsigned long ))
@@ -511,6 +515,11 @@ static int kvm_riscv_vcpu_general_set_csr(struct kvm_vcpu *vcpu,if (reg_num ==KVM_REG_RISCV_CSR_REG (sip)) { reg_val &=VSIP_VALID_MASK ; reg_val <<=VSIP_TO_HVIP_SHIFT ; + }else if (reg_num ==KVM_REG_RISCV_CSR_REG (hstatus)) { +/* for now only allow the S level endianness */ + cntx->hstatus &= ~HSTATUS_VSBE ; + cntx->hstatus |= reg_val &HSTATUS_VSBE ; +return 0 ; } ((unsigned long *)csr)[reg_num] = reg_val;
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 17/18 KVM: riscv: instructions are little endian
In reply to Ben DooksThe instructions are always little endian, so ensure the correct instruction endian.
--- arch/riscv/kvm/vcpu_insn.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/riscv/kvm/vcpu_insn.c +6 -0
@@ -453,6 +453,8 @@ int kvm_riscv_vcpu_virtual_insn(struct kvm_vcpu *vcpu, struct kvm_run *run,kvm_riscv_vcpu_trap_redirect (vcpu, &utrap);return 1 ; } + + insn =le32_to_cpu (insn); }if (INSN_IS_16BIT (insn))return truly_illegal_insn (vcpu, run, insn);
@@ -509,6 +511,8 @@ int kvm_riscv_vcpu_mmio_load(struct kvm_vcpu *vcpu, struct kvm_run *run,kvm_riscv_vcpu_trap_redirect (vcpu, &utrap);return 1 ; } + + insn =le32_to_cpu (insn); insn_len =INSN_LEN (insn); }
@@ -635,6 +639,8 @@ int kvm_riscv_vcpu_mmio_store(struct kvm_vcpu *vcpu, struct kvm_run *run,kvm_riscv_vcpu_trap_redirect (vcpu, &utrap);return 1 ; } + + insn =le32_to_cpu (insn); insn_len =INSN_LEN (insn); }
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 18/18 KVM: riscv: add warning if undecoded instruction
In reply to Ben DooksIt seems a good idea if we get an undecoded instruction here to at-least print an error.
--- arch/riscv/kvm/vcpu_insn.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/riscv/kvm/vcpu_insn.c +4 -0
@@ -557,6 +557,8 @@ int kvm_riscv_vcpu_mmio_load(struct kvm_vcpu *vcpu, struct kvm_run *run, len =4 ; shift =8 * (sizeof (ulong) - len); }else { +pr_err ("%s: insn 0x%08lx not decoded at %lx\n" , + __func__, insn, vcpu->arch.guest_context.sepc);return -EOPNOTSUPP ; }
@@ -674,6 +676,8 @@ int kvm_riscv_vcpu_mmio_store(struct kvm_vcpu *vcpu, struct kvm_run *run, len =4 ; data32 =GET_RS2C (insn, &vcpu->arch.guest_context); }else { +pr_err ("%s: insn 0x%08lx not decoded at %lx\n" , + __func__, insn, vcpu->arch.guest_context.sepc);return -EOPNOTSUPP ; }
Signature · 7 lines
2.37.2.352.g3c44437643 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv