From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Cc: Chris Packham <judge.packham@gmail.com>,
Luis <luis.machado.foss@gmail.com>, Tom Tromey <tom@tromey.com>,
Simon Marchi <simark@simark.ca>,
sunilkumar.dora@windriver.com
Subject: [PATCH v4 4/6] GDB: aarch64-linux: Reorganize SME-related definitions
Date: Tue, 3 Mar 2026 02:06:39 -0300 [thread overview]
Message-ID: <20260303050641.198127-5-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20260303050641.198127-1-thiago.bauermann@linaro.org>
The HWCAP2_SME, HWCAP2_SME2 and HWCAP2_SME2P1 definitions should be in a
file under gdb/nat/, so move them to aarch64-scalable-linux-ptrace.h.
Also, I noticed that gdb/aarch64-linux-nat.c and
gdbserver/linux-aarch64-low.cc don't need anything from the
arch/aarch64-scalable-linux.h header, so make them not include it.
---
gdb/aarch64-linux-nat.c | 1 -
gdb/arch/aarch64-scalable-linux.h | 11 -----------
gdb/nat/aarch64-scalable-linux-ptrace.h | 11 +++++++++++
gdbserver/linux-aarch64-low.cc | 1 -
4 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index d12e2ddcfb28..4b86ae9ebe16 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -55,7 +55,6 @@
#include "arch-utils.h"
#include "arch/aarch64-gcs-linux.h"
-#include "arch/aarch64-scalable-linux.h"
#include <string.h>
diff --git a/gdb/arch/aarch64-scalable-linux.h b/gdb/arch/aarch64-scalable-linux.h
index 813d06562055..e20d094e79d7 100644
--- a/gdb/arch/aarch64-scalable-linux.h
+++ b/gdb/arch/aarch64-scalable-linux.h
@@ -23,17 +23,6 @@
#include "gdbsupport/common-regcache.h"
-/* Feature check for Scalable Matrix Extension. */
-#ifndef HWCAP2_SME
-#define HWCAP2_SME (1 << 23)
-#endif
-
-/* Feature check for Scalable Matrix Extension 2. */
-#ifndef HWCAP2_SME2
-#define HWCAP2_SME2 (1UL << 37)
-#define HWCAP2_SME2P1 (1UL << 38)
-#endif
-
/* Streaming mode enabled/disabled bit. */
#define SVCR_SM_BIT (1 << 0)
/* ZA enabled/disabled bit. */
diff --git a/gdb/nat/aarch64-scalable-linux-ptrace.h b/gdb/nat/aarch64-scalable-linux-ptrace.h
index 453f19dfe8d9..f3424baf7092 100644
--- a/gdb/nat/aarch64-scalable-linux-ptrace.h
+++ b/gdb/nat/aarch64-scalable-linux-ptrace.h
@@ -34,6 +34,17 @@
#include <stdarg.h>
#include "aarch64-scalable-linux-sigcontext.h"
+/* Feature check for Scalable Matrix Extension. */
+#ifndef HWCAP2_SME
+#define HWCAP2_SME (1 << 23)
+#endif
+
+/* Feature check for Scalable Matrix Extension 2. */
+#ifndef HWCAP2_SME2
+#define HWCAP2_SME2 (1UL << 37)
+#define HWCAP2_SME2P1 (1UL << 38)
+#endif
+
/* Indicates whether a SVE ptrace header is followed by SVE registers or a
fpsimd structure. */
#define HAS_SVE_STATE(header) ((header).flags & SVE_PT_REGS_SVE)
diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc
index a00ee1556c80..c44f75167141 100644
--- a/gdbserver/linux-aarch64-low.cc
+++ b/gdbserver/linux-aarch64-low.cc
@@ -43,7 +43,6 @@
#include "arch/aarch64-gcs-linux.h"
#include "arch/aarch64-mte-linux.h"
#include "arch/aarch64-pauth-linux.h"
-#include "arch/aarch64-scalable-linux.h"
#include "linux-aarch32-tdesc.h"
#include "linux-aarch64-tdesc.h"
#include "nat/aarch64-fpmr-linux.h"
next prev parent reply other threads:[~2026-03-03 5:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 5:06 [PATCH v4 0/6] GDB: aarch64-linux: Some header fixes Thiago Jung Bauermann
2026-03-03 5:06 ` [PATCH v4 1/6] GDB: Add aarch64-pauth-linux.h to gdb/arch/ and gdb/nat/ Thiago Jung Bauermann
2026-03-03 15:51 ` Simon Marchi
2026-03-04 4:04 ` Thiago Jung Bauermann
2026-03-10 14:18 ` Luis
2026-03-04 3:59 ` Thiago Jung Bauermann
2026-03-03 5:06 ` [PATCH v4 2/6] GDB: Add aarch64-fpmr-linux.h " Thiago Jung Bauermann
2026-03-04 4:14 ` Thiago Jung Bauermann
2026-03-10 14:14 ` Luis
2026-03-03 5:06 ` [PATCH v4 3/6] GDB: aarch64-linux: Reorganize MTE-related definitions Thiago Jung Bauermann
2026-03-04 4:17 ` Thiago Jung Bauermann
2026-03-10 14:12 ` Luis
2026-03-03 5:06 ` Thiago Jung Bauermann [this message]
2026-03-04 4:21 ` [PATCH v4 4/6] GDB: aarch64-linux: Reorganize SME-related definitions Thiago Jung Bauermann
2026-03-10 14:07 ` Luis
2026-03-03 5:06 ` [PATCH v4 5/6] GDB: aarch64-linux: Reorganize GCS-related definitions Thiago Jung Bauermann
2026-03-04 4:27 ` Thiago Jung Bauermann
2026-03-10 14:05 ` Luis
2026-03-03 5:06 ` [PATCH v4 6/6] GDB: aarch64-linux: Fix build failure on musl systems Thiago Jung Bauermann
2026-03-03 16:14 ` [PATCH v4 0/6] GDB: aarch64-linux: Some header fixes Simon Marchi
2026-03-04 3:52 ` Thiago Jung Bauermann
2026-03-10 14:19 ` Luis
2026-03-17 2:29 ` Thiago Jung Bauermann
2026-03-17 2:49 ` Simon Marchi
2026-03-17 23:43 ` Thiago Jung Bauermann
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=20260303050641.198127-5-thiago.bauermann@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=judge.packham@gmail.com \
--cc=luis.machado.foss@gmail.com \
--cc=simark@simark.ca \
--cc=sunilkumar.dora@windriver.com \
--cc=tom@tromey.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