Rust for Linux List
 help / color / mirror / Atom feed
From: Link Mauve <linkmauve@linkmauve.fr>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Link Mauve <linkmauve@linkmauve.fr>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org,
	peterz@infradead.org, jpoimboe@kernel.org, jbaron@akamai.com,
	aliceryhl@google.com, rostedt@goodmis.org, ardb@kernel.org,
	ojeda@kernel.org, boqun@kernel.org, gary@garyguo.net,
	bjorn3_gh@protonmail.com, lossin@kernel.org,
	a.hindborg@kernel.org, tmgross@umich.edu, dakr@kernel.org,
	daniel.almeida@collabora.com, tamird@kernel.org,
	acourbot@nvidia.com, work@onurozkan.dev, ndesaulniers@google.com,
	morbo@google.com, justinstitt@google.com,
	fujita.tomonori@gmail.com, joelagnelf@nvidia.com,
	gregkh@linuxfoundation.org, prafulrai522@gmail.com,
	nsc@kernel.org, japo@linux.ibm.com, lina+kernel@asahilina.net,
	j@jannau.net, airlied@gmail.com, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	llvm@lists.linux.dev,
	"Mukesh Kumar Chaurasiya (IBM)" <mkchauras@gmail.com>
Subject: Re: [PATCH V17 0/7] Rust Support for powerpc
Date: Tue, 4 Aug 2026 22:39:27 +0200	[thread overview]
Message-ID: <anJN_3eAlTqxqfnI@desktop> (raw)
In-Reply-To: <20260804202217.GA1109939@ax162>

Hi,

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,
> > 
[…]
> > 
> > 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

Those four are explicitly disabled in arch/powerpc/Makefile, but only
for CONFIG_PPC64, not for CONFIG_PPC…  Maybe they should, I’ve only
tested 32-bit on the Wii which has no altivec or vsx, but has hard
floats, and I’m not sure about mma.

Could you test this patch on your platform?  I’ll submit it properly if
it does fix those four warnings:
```
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 9385db478c59..8fba9310acfa 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -63,10 +63,10 @@ endif

 ifdef CONFIG_PPC64
 KBUILD_RUSTFLAGS       += --target=powerpc64le-unknown-linux-gnu
-KBUILD_RUSTFLAGS       += -Ctarget-feature=-mma,-vsx,-hard-float,-altivec
 else
 KBUILD_RUSTFLAGS       += --target=powerpc-unknown-linux-gnu
 endif
+KBUILD_RUSTFLAGS       += -Ctarget-feature=-mma,-vsx,-hard-float,-altivec

 ifdef CONFIG_CPU_LITTLE_ENDIAN
 KBUILD_CPPFLAGS        += -mlittle-endian
```

> 
>   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

I have no idea about those.

> 
> 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

In the kernel we want to disallow all floats, unless there is a very
specific and cibled usecase.  This issue is about enabling them.

And no, warnings are never expected, you just tested on a platform
neither of us tested until now. :)

> 
> but I don't think I see issues open for the other ones.
> 
> -- 
> Cheers,
> Nathan

-- 
Link Mauve

  reply	other threads:[~2026-08-04 20:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  8:24 [PATCH V17 0/7] Rust Support for powerpc Mukesh Kumar Chaurasiya (IBM)
2026-07-08  8:24 ` [PATCH V17 1/7] rust: Fix "multiple candidates for rmeta dependency core" error Mukesh Kumar Chaurasiya (IBM)
2026-07-08  8:24 ` [PATCH V17 2/7] dma-resv: Fix undefined symbol when CONFIG_DMA_SHARED_BUFFER is disabled Mukesh Kumar Chaurasiya (IBM)
2026-07-11 12:56   ` Miguel Ojeda
2026-07-08  8:24 ` [PATCH V17 3/7] powerpc/jump_label: adjust inline asm to be consistent Mukesh Kumar Chaurasiya (IBM)
2026-07-08  8:24 ` [PATCH V17 4/7] rust/powerpc: Set min rustc version for powerpc Mukesh Kumar Chaurasiya (IBM)
2026-07-08  8:39   ` Link Mauve
2026-07-08 15:09     ` Mukesh Kumar Chaurasiya
2026-07-08  8:24 ` [PATCH V17 5/7] rust: Make __udivdi3() and __umoddi3() panic Mukesh Kumar Chaurasiya (IBM)
2026-07-08  8:24 ` [PATCH V17 6/7] rust: Add PowerPC support Mukesh Kumar Chaurasiya (IBM)
2026-07-08  8:24 ` [PATCH V17 7/7] powerpc: Enable Rust for ppc64le Mukesh Kumar Chaurasiya (IBM)
2026-08-03  6:57 ` [PATCH V17 0/7] Rust Support for powerpc Madhavan Srinivasan
2026-08-04 10:11   ` Link Mauve
2026-08-04 13:40     ` FUJITA Tomonori
2026-08-05 12:29       ` Mukesh Kumar Chaurasiya
2026-08-05 12:56       ` Christophe Leroy (CS GROUP)
2026-08-06  7:53         ` FUJITA Tomonori
2026-08-04 20:22     ` Nathan Chancellor
2026-08-04 20:39       ` Link Mauve [this message]
2026-08-05 12:10       ` Mukesh Kumar Chaurasiya
2026-08-05 12:20         ` Mukesh Kumar Chaurasiya
2026-08-05 12:21         ` Link Mauve
2026-08-05 12:26           ` Mukesh Kumar Chaurasiya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anJN_3eAlTqxqfnI@desktop \
    --to=linkmauve@linkmauve.fr \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=ardb@kernel.org \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=j@jannau.net \
    --cc=japo@linux.ibm.com \
    --cc=jbaron@akamai.com \
    --cc=joelagnelf@nvidia.com \
    --cc=jpoimboe@kernel.org \
    --cc=justinstitt@google.com \
    --cc=lina+kernel@asahilina.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=llvm@lists.linux.dev \
    --cc=lossin@kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mkchauras@gmail.com \
    --cc=morbo@google.com \
    --cc=mpe@ellerman.id.au \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=npiggin@gmail.com \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=prafulrai522@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox