From: "Pali Rohár" <pali@kernel.org>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
Subject: [PATCH u-boot] powerpc/mpc85xx: Disable AltiVec and VSX instructions
Date: Mon, 19 Dec 2022 22:46:22 +0100 [thread overview]
Message-ID: <20221219214622.20929-1-pali@kernel.org> (raw)
All vector instructions on powerpc mpc85xx must not be used because U-Boot
does not enable them. Usage cause random crashes. SPE vector instructions
are already disabled by compiler flags, so disable also AltiVec and VSX
vector instructions.
Linux kernel disables AltiVec and VSX instructions too.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
arch/powerpc/cpu/mpc85xx/config.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
index 482bb90cb120..71a98f05c902 100644
--- a/arch/powerpc/cpu/mpc85xx/config.mk
+++ b/arch/powerpc/cpu/mpc85xx/config.mk
@@ -13,6 +13,10 @@ PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables
PLATFORM_CPPFLAGS += $(call cc-option,-mno-spe) \
$(call cc-option,-mspe=no)
+# No AltiVec or VSX instructions when building u-boot
+PLATFORM_CPPFLAGS += $(call cc-option,-mno-altivec)
+PLATFORM_CPPFLAGS += $(call cc-option,-mno-vsx)
+
ifdef CONFIG_E6500
PLATFORM_CPPFLAGS += -mcpu=e6500
else ifdef CONFIG_E5500
--
2.20.1
next reply other threads:[~2022-12-19 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 21:46 Pali Rohár [this message]
2022-12-23 15:01 ` [PATCH u-boot] powerpc/mpc85xx: Disable AltiVec and VSX instructions Tom Rini
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=20221219214622.20929-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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