linux-openrisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] openrisc: rename STACK_FRAME_OVERHEAD to MIN_REDZONE
@ 2025-10-13  9:57 Taimoor Zaeem
  0 siblings, 0 replies; only message in thread
From: Taimoor Zaeem @ 2025-10-13  9:57 UTC (permalink / raw)
  To: jonas, stefan.kristiansson, shorne, oleg; +Cc: linux-openrisc, Taimoor Zaeem

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-13  9:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13  9:57 [PATCH] openrisc: rename STACK_FRAME_OVERHEAD to MIN_REDZONE Taimoor Zaeem

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).