Skip to content

Commit

Permalink
arm/irq.h: fix ARCH_ARM7TDMI missing up_getusrsp after move to irq.h
Browse files Browse the repository at this point in the history
Causing c5471evm/httpd ci break.

Signed-off-by: buxiasen <[email protected]>
  • Loading branch information
jasonbu authored and xiaoxiang781216 committed Jan 7, 2025
1 parent 55da7d8 commit 7e0e4de
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arch/arm/include/arm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,25 @@ static inline_function void up_set_interrupt_context(bool flag)
#endif
}

static inline_function uint32_t up_getsp(void)
{
register uint32_t sp;

__asm__ __volatile__
(
"mov %0, sp\n"
: "=r" (sp)
);

return sp;
}

static inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}

/****************************************************************************
* Public Function Prototypes
****************************************************************************/
Expand Down

0 comments on commit 7e0e4de

Please sign in to comment.