Skip to content
Snippets Groups Projects
Commit 8bddf73d authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Frieder Schrempf
Browse files

alpha: replace hardcoded stack offsets with autogenerated ones


commit 77b823fa619f97d16409ca37ad4f7936e28c5f83 upstream.

This allows the assembly in entry.S to automatically keep in sync with
changes in the stack layout (struct pt_regs and struct switch_stack).

Cc: stable@vger.kernel.org
Tested-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
Tested-by: default avatarMatt Turner <mattst88@gmail.com>
Reviewed-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: default avatarIvan Kokshaysky <ink@unseen.parts>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 002ae62d
No related branches found
No related tags found
1 merge request!191🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.129)
...@@ -32,7 +32,9 @@ void foo(void) ...@@ -32,7 +32,9 @@ void foo(void)
DEFINE(CRED_EGID, offsetof(struct cred, egid)); DEFINE(CRED_EGID, offsetof(struct cred, egid));
BLANK(); BLANK();
DEFINE(SP_OFF, offsetof(struct pt_regs, ps));
DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack));
DEFINE(PT_PTRACED, PT_PTRACED); DEFINE(PT_PTRACED, PT_PTRACED);
DEFINE(CLONE_VM, CLONE_VM); DEFINE(CLONE_VM, CLONE_VM);
DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
......
...@@ -15,10 +15,6 @@ ...@@ -15,10 +15,6 @@
.set noat .set noat
.cfi_sections .debug_frame .cfi_sections .debug_frame
/* Stack offsets. */
#define SP_OFF 184
#define SWITCH_STACK_SIZE 320
.macro CFI_START_OSF_FRAME func .macro CFI_START_OSF_FRAME func
.align 4 .align 4
.globl \func .globl \func
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment