mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	"David Gow" <davidgow@google.com>,
	"Sergio González Collado" <sergio.collado@gmail.com>,
	"Richard Weinberger" <richard@nod.at>,
	tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org
Subject: Re: [PATCH AUTOSEL 4.14 2/5] rust: arch/um: Disable FP/SIMD instruction to match x86
Date: Mon, 20 Mar 2023 13:19:35 +0100	[thread overview]
Message-ID: <ZBhPV61xAvXfjHw3@duo.ucw.cz> (raw)
In-Reply-To: <20230314124435.471553-2-sashal@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

Hi!

> [ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ]
> 
> The kernel disables all SSE and similar FP/SIMD instructions on
> x86-based architectures (partly because we shouldn't be using floats in
> the kernel, and partly to avoid the need for stack alignment, see:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 )
> 
> UML does not do the same thing, which isn't in itself a problem, but
> does add to the list of differences between UML and "normal" x86 builds.
> 
> In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when
> building with SSE, so disabling it fixes rust builds with earlier
> compiler versions, see:
> https://github.com/Rust-for-Linux/linux/pull/881

We don't have rust in 4.14, so cited problem can't hit us. This should
not go to -stable.

(Plus, KBUILD_RUSTFLAGS is not going to exist in -stable).

Best regards,
								Pavel

> +# Disable SSE and other FP/SIMD instructions to match normal x86
> +#
> +KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
> +KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
> +
>  ifeq ($(CONFIG_X86_32),y)
>  START := 0x8048000
>  

-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2023-03-20 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 12:44 [PATCH AUTOSEL 4.14 1/5] mmc: atmel-mci: fix race between stop command and start of next command Sasha Levin
2023-03-14 12:44 ` [PATCH AUTOSEL 4.14 2/5] rust: arch/um: Disable FP/SIMD instruction to match x86 Sasha Levin
2023-03-20 12:19   ` Pavel Machek [this message]
2023-03-21  2:30     ` David Gow
2023-03-14 12:44 ` [PATCH AUTOSEL 4.14 3/5] ext4: fail ext4_iget if special inode unallocated Sasha Levin
2023-03-14 12:44 ` [PATCH AUTOSEL 4.14 4/5] ext4: fix task hung in ext4_xattr_delete_inode Sasha Levin
2023-03-14 12:44 ` [PATCH AUTOSEL 4.14 5/5] sh: intc: Avoid spurious sizeof-pointer-div warning Sasha Levin

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=ZBhPV61xAvXfjHw3@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=davidgow@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=richard@nod.at \
    --cc=sashal@kernel.org \
    --cc=sergio.collado@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®