@@ -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)
{
@@ -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)
@@ -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)
@@ -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;
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(-)