From: Ivan Kokshaysky <ink@unseen.parts>
To: Richard Henderson <richard.henderson@linaro.org>,
Matt Turner <mattst88@gmail.com>, Oleg Nesterov <oleg@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
"Paul E. McKenney" <paulmck@kernel.org>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>,
Magnus Lindholm <linmag7@gmail.com>,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] alpha: replace hardcoded stack offsets with autogenerated ones
Date: Wed, 29 Jan 2025 10:43:10 +0100 [thread overview]
Message-ID: <20250129094312.27399-3-ink@unseen.parts> (raw)
In-Reply-To: <20250129094312.27399-1-ink@unseen.parts>
Signed-off-by: Ivan Kokshaysky <ink@unseen.parts>
---
arch/alpha/kernel/asm-offsets.c | 4 ++++
arch/alpha/kernel/entry.S | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c
index 4cfeae42c79a..e9dad60b147f 100644
--- a/arch/alpha/kernel/asm-offsets.c
+++ b/arch/alpha/kernel/asm-offsets.c
@@ -19,9 +19,13 @@ static void __used foo(void)
DEFINE(TI_STATUS, offsetof(struct thread_info, status));
BLANK();
+ DEFINE(SP_OFF, offsetof(struct pt_regs, ps));
DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
BLANK();
+ DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack));
+ BLANK();
+
DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
}
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index dd26062d75b3..6fb38365539d 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -15,10 +15,6 @@
.set noat
.cfi_sections .debug_frame
-/* Stack offsets. */
-#define SP_OFF 184
-#define SWITCH_STACK_SIZE 64
-
.macro CFI_START_OSF_FRAME func
.align 4
.globl \func
--
2.39.5
next prev parent reply other threads:[~2025-01-29 9:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 9:43 [PATCH 0/4] alpha: stack fixes Ivan Kokshaysky
2025-01-29 9:43 ` [PATCH 1/4] alpha/uapi: do not expose kernel-only stack frame structures Ivan Kokshaysky
2025-01-29 18:32 ` John Paul Adrian Glaubitz
2025-01-29 19:59 ` Ivan Kokshaysky
2025-01-29 9:43 ` Ivan Kokshaysky [this message]
2025-01-29 9:43 ` [PATCH 3/4] alpha: make stack 16-byte aligned (most cases) Ivan Kokshaysky
2025-01-29 9:43 ` [PATCH 4/4] alpha: align stack for page fault and user unaligned trap handlers Ivan Kokshaysky
2025-01-29 10:06 ` [PATCH 0/4] alpha: stack fixes John Paul Adrian Glaubitz
2025-01-29 16:02 ` Maciej W. Rozycki
2025-01-30 14:33 ` Ivan Kokshaysky
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=20250129094312.27399-3-ink@unseen.parts \
--to=ink@unseen.parts \
--cc=arnd@arndb.de \
--cc=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=mattst88@gmail.com \
--cc=oleg@redhat.com \
--cc=paulmck@kernel.org \
--cc=richard.henderson@linaro.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.