Commit b13b47ed authored by Andrew Jones's avatar Andrew Jones Committed by Marcelo Tosatti
Browse files

arm/arm64: get rid of get_sp()



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's avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent a4049322
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment