Skip to contentSkip to conversation

x86/traps: Make get_stack_{trace,dump}_bottom() static

PATCH In review Andrew Cooper 2 participants 2 messages Nov 10

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/traps: Make get_stack_{trace,dump}_bottom() static

They have no external callers.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>

This has apparently been sat around in my tree for 6 years.

---
 xen/arch/x86/include/asm/current.h | 8 --------
 xen/arch/x86/traps.c               | 4 ++--
 2 files changed, 2 insertions(+), 10 deletions(-)
xen/arch/x86/include/asm/current.h +0 -8
index fe9a86a3f7d4..875fe41d924f 100644
@@ -118,14 +118,6 @@ static inline attr_const struct cpu_info *get_cpu_info(void)
 #define get_stack_bottom()                      \
     ((unsigned long)(&get_cpu_info()->guest_cpu_user_regs + 1))
 
-/*
- * Get the reasonable stack bounds for stack traces and stack dumps.  Stack
- * dumps have a slightly larger range to include exception frames in the
- * printed information.  The returned word is inside the interesting range.
- */
-unsigned long get_stack_trace_bottom(unsigned long sp);
-unsigned long get_stack_dump_bottom (unsigned long sp);
-
 #ifdef CONFIG_LIVEPATCH
 # define CHECK_FOR_LIVEPATCH_WORK "call check_for_livepatch_work;"
 #elif defined(CONFIG_DEBUG)
xen/arch/x86/traps.c +2 -2
index 6d83162a967c..d2ca33f9e45c 100644
@@ -673,7 +673,7 @@ static void show_hvm_stack(struct vcpu *v, const struct cpu_user_regs *regs)
  * For the cases where the stack should not be inspected, pretend that the
  * passed stack pointer is already out of reasonable bounds.
  */
-unsigned long get_stack_trace_bottom(unsigned long sp)
+static unsigned long get_stack_trace_bottom(unsigned long sp)
 {
     switch ( get_stack_page(sp) )
     {
@@ -690,7 +690,7 @@ unsigned long get_stack_trace_bottom(unsigned long sp)
     }
 }
 
-unsigned long get_stack_dump_bottom(unsigned long sp)
+static unsigned long get_stack_dump_bottom(unsigned long sp)
 {
     switch ( get_stack_page(sp) )
     {
Signature · 1 line
2.39.5