From: Taimoor Zaeem <taimoorzaeem@gmail.com>
To: jonas@southpole.se, stefan.kristiansson@saunalahti.fi,
shorne@gmail.com, oleg@redhat.com
Cc: linux-openrisc@vger.kernel.org, Taimoor Zaeem <taimoorzaeem@gmail.com>
Subject: [PATCH] openrisc: rename STACK_FRAME_OVERHEAD to MIN_REDZONE
Date: Mon, 13 Oct 2025 14:57:04 +0500 [thread overview]
Message-ID: <20251013095704.43277-1-taimoorzaeem@gmail.com> (raw)
As mentioned in the TODO, the STACK_FRAME_OVERHEAD is
the red zone, hence renamed to MIN_REDZONE in ptrace.h
and processor.h.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
---
arch/openrisc/include/asm/processor.h | 2 +-
arch/openrisc/include/asm/ptrace.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h
index 3ff893a67c13..b0a00dcebf0c 100644
--- a/arch/openrisc/include/asm/processor.h
+++ b/arch/openrisc/include/asm/processor.h
@@ -55,7 +55,7 @@ struct thread_struct {
* user->kernel transition registers are reached by this (i.e. not regs
* for running signal handler)
*/
-#define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE - STACK_FRAME_OVERHEAD)) - 1)
+#define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE - MIN_REDZONE)) - 1)
/*
* Dito but for the currently running task
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h
index 28facf2f3e00..0b86764653ef 100644
--- a/arch/openrisc/include/asm/ptrace.h
+++ b/arch/openrisc/include/asm/ptrace.h
@@ -94,8 +94,7 @@ struct pt_regs {
long dummy2; /* Cheap alignment fix */
};
-/* TODO: Rename this to REDZONE because that's what it is */
-#define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */
+#define MIN_REDZONE 128 /* size of minimum stack frame */
#define MAX_REG_OFFSET offsetof(struct pt_regs, orig_gpr11)
--
2.43.0
reply other threads:[~2025-10-13 9:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251013095704.43277-1-taimoorzaeem@gmail.com \
--to=taimoorzaeem@gmail.com \
--cc=jonas@southpole.se \
--cc=linux-openrisc@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=shorne@gmail.com \
--cc=stefan.kristiansson@saunalahti.fi \
/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;
as well as URLs for NNTP newsgroup(s).