Re: [PATCH V17 0/7] Rust Support for powerpc

Mukesh Kumar Chaurasiya <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded,gmane.linux.kernel,gmane.linux.kernel.rust
Message-ID <[email protected]>
On Wed, Aug 05, 2026 at 05:40:42PM +0530, Mukesh Kumar Chaurasiya wrote:
> On Tue, Aug 04, 2026 at 01:22:17PM -0700, Nathan Chancellor wrote:
> > On Tue, Aug 04, 2026 at 12:11:57PM +0200, Link Mauve wrote:
> > > Hi,
> > > 
> > > On Mon, Aug 03, 2026 at 12:27:13PM +0530, Madhavan Srinivasan wrote:
> > > > On Wed, 08 Jul 2026 13:54:47 +0530, Mukesh Kumar Chaurasiya (IBM) wrote:
> > > > > Enable experimental rust support for ppc64le and ppc32be. The patch for
> > > > > ppc32 has been provided by Link Mauve[1] and ppc64le support[2] has been
> > > > > merged over it. ppc32 needs some toolchain fixes mentioned in the patch
> > > > > `rust: Add PowerPC support` and the discussion for that is done here[1].
> > > > > 
> > > > > This has been tested on
> > > > > - powernv9 hardware
> > > > > - pseries P11 hardware
> > > > > - pseries(9, 10) qemu
> > > > > - powernv(9, 10) qemu
> > > > > - rustdoc on x86 and powerpc64le
> > > > > - rusttest on x86 and powerpc64le
> > > > > 
> > > > > [...]
> > > > 
> > > > Applied to powerpc/next.
> > > > 
> > > > [1/7] rust: Fix "multiple candidates for rmeta dependency core" error
> > > >       https://git.kernel.org/powerpc/c/00cdfd072c709c608606461d7d44d4613119bfa9
> > > > [2/7] dma-resv: Fix undefined symbol when CONFIG_DMA_SHARED_BUFFER is disabled
> > > >       https://git.kernel.org/powerpc/c/be809b60cbb61aab96179f44ac3670242ae72996
> > > > [3/7] powerpc/jump_label: adjust inline asm to be consistent
> > > >       https://git.kernel.org/powerpc/c/13244c0a40139fe66c4c5c5655f4d732a6002957
> > > > [4/7] rust/powerpc: Set min rustc version for powerpc
> > > >       https://git.kernel.org/powerpc/c/e299147cdc8e19c6421a6b7863dc82a35b09d967
> > > > [5/7] rust: Make __udivdi3() and __umoddi3() panic
> > > >       https://git.kernel.org/powerpc/c/c93c194e4ee71a734986fd99a8b1ec9fbb7a9b8b
> > > > [6/7] rust: Add PowerPC support
> > > >       https://git.kernel.org/powerpc/c/73b741adb264967093ef4eb59905618a7e0d0de0
> > > > [7/7] powerpc: Enable Rust for ppc64le
> > > >       https://git.kernel.org/powerpc/c/bc87cbdb952e9223616b839d64bdb4723aa2ed1d
> > > > 
> > > > cheers
> > > > 
> > > 
> > > I just tested those again in linux-next, with the Wii support series on
> > > top, but now the kernel fails to build due to ARCH_WARN_ASM and
> > > ARCH_WARN_REACHABLE not being defined on PowerPC:
> > 
> > I also see the following warnings (in addition to that error):
> > 
> >   warning: unknown and unstable feature specified for `-Ctarget-feature`: `mma`
> >     |
> >     = note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
> >     = help: consider filing a feature request
> > 
> >   warning: unstable feature specified for `-Ctarget-feature`: `vsx`
> >     |
> >     = note: this feature is not stably supported; its behavior can change in the future
> > 
> >   warning: unknown and unstable feature specified for `-Ctarget-feature`: `hard-float`
> >     |
> >     = note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
> >     = help: consider filing a feature request
> > 
> >   warning: unstable feature specified for `-Ctarget-feature`: `altivec`
> >     |
> >     = note: this feature is not stably supported; its behavior can change in the future
> > 
> Hey Nathan,
> 
> For these i'll raise issues.
Here's bug on rustc for the same.
https://github.com/rust-lang/rust/issues/160561

Regards,
Mukesh
> >   clang diag: arch/powerpc/include/uapi/asm/ioctl.h:5:9: warning: '_IOC_SIZEBITS' macro redefined [-Wmacro-redefined]
> >   clang diag: arch/powerpc/include/uapi/asm/ioctl.h:6:9: warning: '_IOC_DIRBITS' macro redefined [-Wmacro-redefined]
> >   clang diag: arch/powerpc/include/uapi/asm/ioctl.h:8:9: warning: '_IOC_NONE' macro redefined [-Wmacro-redefined]
> >   clang diag: arch/powerpc/include/uapi/asm/ioctl.h:10:9: warning: '_IOC_WRITE' macro redefined [-Wmacro-redefined]
> >   warning: 4 warnings emitted
> > 
> For these warnings below diff should fix it. I'll send out a patch soon.
> 
> diff --git a/rust/uapi/uapi_helper.h b/rust/uapi/uapi_helper.h
> index 06d7d1a2e8da..acec2d2fede7 100644
> --- a/rust/uapi/uapi_helper.h
> +++ b/rust/uapi/uapi_helper.h
> @@ -6,7 +6,7 @@
>   * Sorted alphabetically.
>   */
>  
> -#include <uapi/asm-generic/ioctl.h>
> +#include <uapi/linux/ioctl.h>
>  #include <uapi/drm/drm.h>
>  #include <uapi/drm/nova_drm.h>
>  #include <uapi/drm/panthor_drm.h>
> 
> Regards,
> Mukesh
> 
> > when building this series in next-20260804 with rustc 1.97.1. I am not
> > sure where the clang diagnostic warnings come from. I assume the target
> > feature warnings are expected but it would be good to get those
> > addressed sooner rather than later. I see '-hard-float' has an issue
> > open
> > 
> >   https://github.com/rust-lang/rust/issues/117347
> > 
> > but I don't think I see issues open for the other ones.
> > 
> > -- 
> > Cheers,
> > Nathan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.