diff mbox

[06/18] arm/arm64: get rid of get_sp()

Message ID 1422815686-24591-7-git-send-email-drjones@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Jones Feb. 1, 2015, 6:34 p.m. UTC
get_sp() only worked by accident, because gcc inlined calls
to it. It should have always been explicitly inlined. It was
also only added for debugging, and not in any use now.
Furthermore, while we will have need for a "get_sp", we'll
add it back with a new name, current_stack_pointer, in order
to be consistent with Linux.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 lib/arm/asm/processor.h   | 1 -
 lib/arm/processor.c       | 6 ------
 lib/arm64/asm/processor.h | 1 -
 lib/arm64/processor.c     | 6 ------
 4 files changed, 14 deletions(-)
diff mbox

Patch

diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h
index a56f8d1fc9797..9c37db66640e8 100644
--- a/lib/arm/asm/processor.h
+++ b/lib/arm/asm/processor.h
@@ -23,7 +23,6 @@  typedef void (*exception_fn)(struct pt_regs *);
 extern void install_exception_handler(enum vector v, exception_fn fn);
 
 extern void show_regs(struct pt_regs *regs);
-extern void *get_sp(void);
 
 static inline unsigned long current_cpsr(void)
 {
diff --git a/lib/arm/processor.c b/lib/arm/processor.c
index 5ad999c6b378b..d2fd597fcd139 100644
--- a/lib/arm/processor.c
+++ b/lib/arm/processor.c
@@ -64,12 +64,6 @@  void show_regs(struct pt_regs *regs)
 	}
 }
 
-void *get_sp(void)
-{
-	register unsigned long sp asm("sp");
-	return (void *)sp;
-}
-
 static exception_fn exception_handlers[EXCPTN_MAX];
 
 void install_exception_handler(enum vector v, exception_fn fn)
diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h
index a33f70afb3a3e..d287f55b8dac6 100644
--- a/lib/arm64/asm/processor.h
+++ b/lib/arm64/asm/processor.h
@@ -51,7 +51,6 @@  extern void default_vector_handler(enum vector v, struct pt_regs *regs,
 				   unsigned int esr);
 
 extern void show_regs(struct pt_regs *regs);
-extern void *get_sp(void);
 extern bool get_far(unsigned int esr, unsigned long *far);
 
 static inline unsigned long current_level(void)
diff --git a/lib/arm64/processor.c b/lib/arm64/processor.c
index efc78353d7ec0..7f61b3fff281f 100644
--- a/lib/arm64/processor.c
+++ b/lib/arm64/processor.c
@@ -78,12 +78,6 @@  void show_regs(struct pt_regs *regs)
 	printf("\n");
 }
 
-void *get_sp(void)
-{
-	register unsigned long sp asm("sp");
-	return (void *)sp;
-}
-
 bool get_far(unsigned int esr, unsigned long *far)
 {
 	unsigned int ec = esr >> ESR_EL1_EC_SHIFT;