Re: [PATCH v2 3/3] rust: Enable for MIPS

2024-09-10 Thread Jiaxun Yang
在2024年9月10日九月 下午5:03,Maciej W. Rozycki写道: > On Mon, 9 Sep 2024, Jiaxun Yang wrote: > >> > What's the consequence of using `mips2' rather than `mips1' here? How >> > about other ISA revisions, e.g. `mips4' (that also applies to the 64BIT >&g

Re: [PATCH v2 3/3] rust: Enable for MIPS

2024-09-08 Thread Jiaxun Yang
在2024年9月8日九月 下午9:43,Maciej W. Rozycki写道: > On Thu, 5 Sep 2024, Jiaxun Yang wrote: > >> diff --git a/scripts/generate_rust_target.rs >> b/scripts/generate_rust_target.rs >> index 863720777313..bbdf8a4dd169 100644 >> --- a/scripts/generate_rust_target.rs >> +

[PATCH v2 2/3] MIPS: Rename mips_instruction type to workaround bindgen issue

2024-09-05 Thread Jiaxun Yang
and aligned with struct name here. Signed-off-by: Jiaxun Yang --- v2: Reword commit messsage --- arch/mips/include/asm/dsemul.h | 2 +- arch/mips/include/asm/inst.h | 6 +++--- arch/mips/kernel/ftrace.c | 2 +- arch/mips/kernel/kprobes.c | 2 +- arch/mips/math-emu/cp1emu.c

[PATCH v2 3/3] rust: Enable for MIPS

2024-09-05 Thread Jiaxun Yang
ff-by: Jiaxun Yang --- v2: - Add micromips flags - Sync issues with upstream --- Documentation/rust/arch-support.rst| 1 + .../translations/zh_CN/rust/arch-support.rst | 1 + arch/mips/Kconfig | 2 + sc

[PATCH v2 1/3] rust: Introduce HAVE_GENERATE_RUST_TARGET config option

2024-09-05 Thread Jiaxun Yang
control the per-arch usage of generate_rust_target.rs. Signed-off-by: Jiaxun Yang --- v2: - Reword Kconfig help - Remove x86 specific condition for UM --- Makefile | 3 +++ arch/Kconfig | 8 arch/um/Kconfig | 1 + arch/x86/Makefile| 1 - arch

[PATCH v2 0/3] rust: Initial MIPS support

2024-09-05 Thread Jiaxun Yang
Hi Folks, This series added MIPS arch support to rust for linux, hopefully MIPS is not too late to the party :-) Sample rust module tested on R4000(el),mips32,mips32r2el,mips64, mips64r2el,mips64r6el. Please review. Thanks Signed-off-by: Jiaxun Yang --- Changes in v2: - Address review

Re: [PATCH 3/3] rust: Enable for MIPS

2024-09-04 Thread Jiaxun Yang
在2024年9月3日九月 下午8:01,Miguel Ojeda写道: > On Tue, Sep 3, 2024 at 8:32 PM Jiaxun Yang wrote: >> >> Ahh thanks for the elaboration. > > You're welcome! > >> However, kernel supports many ISA variants that are not defined by any rust >> target >> tri

Re: [PATCH 3/3] rust: Enable for MIPS

2024-09-03 Thread Jiaxun Yang
在2024年9月3日九月 下午7:17,Miguel Ojeda写道: [...] > > I guess you mean you are getting the warning about the > unknown/unstable feature passed to the backend? i.e. `rustc` knows > about those LLVM ones and forwards them when enabled via > `-Ctarget-feature` (with a warning): > > rustc --target mips6

Re: [PATCH 2/3] MIPS: Rename mips_instruction type to workaround bindgen issue

2024-09-03 Thread Jiaxun Yang
在2024年9月3日九月 下午6:43,Miguel Ojeda写道: > On Tue, Sep 3, 2024 at 7:15 PM Jiaxun Yang wrote: >> >> We have a union and a type both named after mips_instruction, >> rust bindgen is not happy with this kind of naming alias. > > For this sort of thing, you may be able to

Re: [PATCH 3/3] rust: Enable for MIPS

2024-09-03 Thread Jiaxun Yang
在2024年9月3日九月 下午6:44,Miguel Ojeda写道: > On Tue, Sep 3, 2024 at 7:15 PM Jiaxun Yang wrote: >> >> We don't use builtin target as there is no sutiable baremetal >> target for us that can cover all ISA variants supported by kernel. > > Since we should try to go awa

[PATCH 0/3] rust: Initial MIPS support

2024-09-03 Thread Jiaxun Yang
Hi Folks, This series added MIPS arch support to rust for linux, hopefully MIPS is not too late to the party :-) Sample rust module tested on R4000(el),mips32,mips32r2el,mips64, mips64r2el,mips64r6el. Please review. Thanks Signed-off-by: Jiaxun Yang --- Jiaxun Yang (3): rust: Introduce

[PATCH 2/3] MIPS: Rename mips_instruction type to workaround bindgen issue

2024-09-03 Thread Jiaxun Yang
and fits the name of header. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/dsemul.h | 2 +- arch/mips/include/asm/inst.h | 6 +++--- arch/mips/kernel/ftrace.c | 2 +- arch/mips/kernel/kprobes.c | 2 +- arch/mips/math-emu/cp1emu.c| 18 +- arch/mips/math

[PATCH 1/3] rust: Introduce HAVE_GENERATE_RUST_TARGET config option

2024-09-03 Thread Jiaxun Yang
control the per-arch usage of generate_rust_target.rs. Signed-off-by: Jiaxun Yang --- Makefile | 4 arch/Kconfig | 8 arch/um/Kconfig | 1 + arch/x86/Makefile| 1 - arch/x86/Makefile.um | 1 - rust/Makefile| 2 +- scripts/Makefile | 4 +--- 7

[PATCH 3/3] rust: Enable for MIPS

2024-09-03 Thread Jiaxun Yang
ff-by: Jiaxun Yang --- Documentation/rust/arch-support.rst| 1 + .../translations/zh_CN/rust/arch-support.rst | 1 + arch/mips/Kconfig | 2 + scripts/generate_rust_target.rs| 64 ++ 4 files change