Linux Hexagon architecture development
 help / color / mirror / Atom feed
From: Brian Cain <brian.cain@oss.qualcomm.com>
To: linux-hexagon@vger.kernel.org
Cc: sid.manning@oss.qualcomm.com, pierrick.bouvier@oss.qualcomm.com,
	Brian Cain <brian.cain@oss.qualcomm.com>
Subject: [PATCH 1/7] hexagon: disable the LLVM packetizer
Date: Sat,  5 Sep 2026 19:17:06 -0700	[thread overview]
Message-ID: <20260906021712.2498266-2-brian.cain@oss.qualcomm.com> (raw)
In-Reply-To: <20260906021712.2498266-1-brian.cain@oss.qualcomm.com>

The Hexagon packetizer can emit invalid instruction packets at runtime.

There's multiple distinct bugs.  We'll re-evaluate after 23.1.0 to see
if this can be version-gated in the future.

Disable the packetizer and new-value jumps unconditionally.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
 arch/hexagon/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile
index ff172cbe5881..4d393bd8163a 100644
--- a/arch/hexagon/Makefile
+++ b/arch/hexagon/Makefile
@@ -7,6 +7,11 @@ KBUILD_DEFCONFIG = comet_defconfig
 KBUILD_CFLAGS += -G0
 LDFLAGS_vmlinux += -G0
 
+# Workaround for the packetizer generating invalid instruction encodings:
+# https://github.com/llvm/llvm-project/issues/178338
+# https://github.com/llvm/llvm-project/issues/218083
+KBUILD_CFLAGS += -mllvm --disable-packetizer -mllvm -disable-nvjump
+
 # Do not use single-byte enums; these will overflow.
 KBUILD_CFLAGS += -fno-short-enums
 
-- 
2.34.1


  reply	other threads:[~2026-09-06  2:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06  2:17 [PATCH 0/7] Hexagon build/syscall/etc fixes Brian Cain
2026-09-06  2:17 ` Brian Cain [this message]
2026-09-06  2:17 ` [PATCH 2/7] hexagon: define ELF_CORE_EFLAGS for V4-and-later architectures Brian Cain
2026-09-06  2:17 ` [PATCH 3/7] hexagon: stop passing -mv${CONFIG_HEXAGON_ARCH_VERSION} to the linker Brian Cain
2026-09-06  2:17 ` [PATCH 4/7] hexagon: read the thread-info register with a volatile asm Brian Cain
2026-09-06  2:17 ` [PATCH 5/7] hexagon: let do_work_pending return without pending work Brian Cain
2026-09-06  2:17 ` [PATCH 6/7] hexagon: set the user stack pointer in start_thread Brian Cain
2026-09-06  2:17 ` [PATCH 7/7] hexagon: return -ENOSYS for unimplemented syscalls Brian Cain

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=20260906021712.2498266-2-brian.cain@oss.qualcomm.com \
    --to=brian.cain@oss.qualcomm.com \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=sid.manning@oss.qualcomm.com \
    /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