diff --git a/arch/arm/include/arch.h b/arch/arm/include/arch.h index 4ddbb53f01..42607cb5c3 100644 --- a/arch/arm/include/arch.h +++ b/arch/arm/include/arch.h @@ -109,12 +109,12 @@ do { \ ****************************************************************************/ /**************************************************************************** - * Name: arm_getsp + * Name: up_getsp ****************************************************************************/ /* I don't know if the builtin to get SP is enabled */ -static inline uint32_t arm_getsp(void) +static inline uint32_t up_getsp(void) { uint32_t sp; __asm__ diff --git a/arch/arm/include/tls.h b/arch/arm/include/tls.h index fec56ad8c4..f6dc4de29d 100644 --- a/arch/arm/include/tls.h +++ b/arch/arm/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)arm_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/arm/src/arm/arm_assert.c b/arch/arm/src/arm/arm_assert.c index bc1345dc23..9cfc91790b 100644 --- a/arch/arm/src/arm/arm_assert.c +++ b/arch/arm/src/arm/arm_assert.c @@ -75,7 +75,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -157,7 +157,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = arm_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 @@ -331,7 +331,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(arm_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/arm/src/armv6-m/arm_assert.c b/arch/arm/src/armv6-m/arm_assert.c index 8db89a6df3..83dddb0c0b 100644 --- a/arch/arm/src/armv6-m/arm_assert.c +++ b/arch/arm/src/armv6-m/arm_assert.c @@ -74,7 +74,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -195,7 +195,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = arm_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 @@ -384,7 +384,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(arm_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index 273e6919a0..4105f2951a 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -77,7 +77,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -195,7 +195,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = arm_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 7 @@ -430,7 +430,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(arm_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/arm/src/armv7-m/arm_assert.c b/arch/arm/src/armv7-m/arm_assert.c index f2b7659328..e689a42006 100644 --- a/arch/arm/src/armv7-m/arm_assert.c +++ b/arch/arm/src/armv7-m/arm_assert.c @@ -77,7 +77,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -203,7 +203,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = arm_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 7 @@ -422,7 +422,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(arm_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/arm/src/armv7-r/arm_assert.c b/arch/arm/src/armv7-r/arm_assert.c index 17ed679c55..e5580cd188 100644 --- a/arch/arm/src/armv7-r/arm_assert.c +++ b/arch/arm/src/armv7-r/arm_assert.c @@ -74,7 +74,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -192,7 +192,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = arm_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 7 @@ -396,7 +396,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(arm_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/arm/src/armv8-m/arm_assert.c b/arch/arm/src/armv8-m/arm_assert.c index ebdf5214ba..094f97c4f8 100644 --- a/arch/arm/src/armv8-m/arm_assert.c +++ b/arch/arm/src/armv8-m/arm_assert.c @@ -77,7 +77,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -203,7 +203,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = arm_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 7 @@ -422,7 +422,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(arm_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/avr/include/avr/arch.h b/arch/avr/include/avr/arch.h index 5556add40d..c7128471b0 100644 --- a/arch/avr/include/avr/arch.h +++ b/arch/avr/include/avr/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: avr_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint16_t avr_getsp(void) +static inline uint16_t up_getsp(void) { uint8_t spl; uint8_t sph; diff --git a/arch/avr/include/avr32/arch.h b/arch/avr/include/avr32/arch.h index 3137bd70e3..b2bf008a1b 100644 --- a/arch/avr/include/avr32/arch.h +++ b/arch/avr/include/avr32/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: avr_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t avr_getsp(void) +static inline uint32_t up_getsp(void) { uint32_t retval; __asm__ __volatile__ diff --git a/arch/avr/include/tls.h b/arch/avr/include/tls.h index b308f77925..3b1c0a0740 100644 --- a/arch/avr/include/tls.h +++ b/arch/avr/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)avr_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/avr/src/avr/up_dumpstate.c b/arch/avr/src/avr/up_dumpstate.c index dcf0030cda..c246c554da 100644 --- a/arch/avr/src/avr/up_dumpstate.c +++ b/arch/avr/src/avr/up_dumpstate.c @@ -49,7 +49,7 @@ static void up_stackdump(uint16_t sp, uint16_t stack_top) { - uint16_t stack ; + uint16_t stack; for (stack = sp & ~3; stack < stack_top; stack += 12) { @@ -125,7 +125,7 @@ static inline void up_registerdump(void) void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint16_t sp = avr_getsp(); + uint16_t sp = up_getsp(); uint16_t ustackbase; uint16_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 0 diff --git a/arch/avr/src/avr32/up_dumpstate.c b/arch/avr/src/avr32/up_dumpstate.c index 04b800a13a..c47b343e01 100644 --- a/arch/avr/src/avr32/up_dumpstate.c +++ b/arch/avr/src/avr32/up_dumpstate.c @@ -49,7 +49,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -95,7 +95,7 @@ static inline void up_registerdump(void) void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = avr_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/avr/src/common/up_assert.c b/arch/avr/src/common/up_assert.c index a4129657a8..15341cd973 100644 --- a/arch/avr/src/common/up_assert.c +++ b/arch/avr/src/common/up_assert.c @@ -154,7 +154,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(avr_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif #ifdef CONFIG_ARCH_USBDUMP diff --git a/arch/hc/include/arch.h b/arch/hc/include/arch.h index 0cd1482215..c7b718ef77 100644 --- a/arch/hc/include/arch.h +++ b/arch/hc/include/arch.h @@ -40,10 +40,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: hc_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint16_t hc_getsp(void) +static inline uint16_t up_getsp(void) { uint16_t ret; __asm__ diff --git a/arch/hc/include/tls.h b/arch/hc/include/tls.h index f258c6cda7..f9ea66c0b6 100644 --- a/arch/hc/include/tls.h +++ b/arch/hc/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)hc_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/hc/src/m9s12/m9s12_assert.c b/arch/hc/src/m9s12/m9s12_assert.c index c14faa8a2e..6818cb727f 100644 --- a/arch/hc/src/m9s12/m9s12_assert.c +++ b/arch/hc/src/m9s12/m9s12_assert.c @@ -170,7 +170,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint16_t sp = hc_getsp(); + uint16_t sp = up_getsp(); uint16_t ustackbase; uint16_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 @@ -329,7 +329,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(hc_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/mips/include/arch.h b/arch/mips/include/arch.h index 49893923af..266d622504 100644 --- a/arch/mips/include/arch.h +++ b/arch/mips/include/arch.h @@ -40,10 +40,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: mips_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t mips_getsp(void) +static inline uint32_t up_getsp(void) { register uint32_t sp; __asm__ diff --git a/arch/mips/include/tls.h b/arch/mips/include/tls.h index 2510cfa352..986e12a530 100644 --- a/arch/mips/include/tls.h +++ b/arch/mips/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)mips_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/mips/src/mips32/mips_assert.c b/arch/mips/src/mips32/mips_assert.c index 05168488ff..88caf78939 100644 --- a/arch/mips/src/mips32/mips_assert.c +++ b/arch/mips/src/mips32/mips_assert.c @@ -160,7 +160,7 @@ void up_assert(const char *filename, int lineno) #endif #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(mips_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/mips/src/mips32/mips_dumpstate.c b/arch/mips/src/mips32/mips_dumpstate.c index b850e859ce..7abbde6a2f 100644 --- a/arch/mips/src/mips32/mips_dumpstate.c +++ b/arch/mips/src/mips32/mips_dumpstate.c @@ -50,7 +50,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -125,7 +125,7 @@ static inline void up_registerdump(void) void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = mips_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/misoc/include/arch.h b/arch/misoc/include/arch.h index f054c46948..792f933719 100644 --- a/arch/misoc/include/arch.h +++ b/arch/misoc/include/arch.h @@ -36,10 +36,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: misoc_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t misoc_getsp(void) +static inline uint32_t up_getsp(void) { register uint32_t sp; diff --git a/arch/misoc/include/tls.h b/arch/misoc/include/tls.h index f751e66f6c..8b138a6d70 100644 --- a/arch/misoc/include/tls.h +++ b/arch/misoc/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)misoc_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/misoc/src/lm32/lm32_assert.c b/arch/misoc/src/lm32/lm32_assert.c index 5b9739141f..e8d47efb93 100644 --- a/arch/misoc/src/lm32/lm32_assert.c +++ b/arch/misoc/src/lm32/lm32_assert.c @@ -164,7 +164,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(misoc_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/misoc/src/lm32/lm32_dumpstate.c b/arch/misoc/src/lm32/lm32_dumpstate.c index d6d50828bd..06b3ab8ea5 100644 --- a/arch/misoc/src/lm32/lm32_dumpstate.c +++ b/arch/misoc/src/lm32/lm32_dumpstate.c @@ -48,7 +48,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -111,7 +111,7 @@ static inline void up_registerdump(void) void lm32_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = misoc_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/misoc/src/minerva/minerva_assert.c b/arch/misoc/src/minerva/minerva_assert.c index 619ecb03a5..e4e4d085d0 100644 --- a/arch/misoc/src/minerva/minerva_assert.c +++ b/arch/misoc/src/minerva/minerva_assert.c @@ -163,7 +163,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(misoc_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/misoc/src/minerva/minerva_dumpstate.c b/arch/misoc/src/minerva/minerva_dumpstate.c index b70f7e9584..46f133cfa2 100644 --- a/arch/misoc/src/minerva/minerva_dumpstate.c +++ b/arch/misoc/src/minerva/minerva_dumpstate.c @@ -113,7 +113,7 @@ static inline void up_registerdump(void) void minerva_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = misoc_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/or1k/include/arch.h b/arch/or1k/include/arch.h index 00670ad00f..c98c4bf58f 100644 --- a/arch/or1k/include/arch.h +++ b/arch/or1k/include/arch.h @@ -71,10 +71,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: or1k_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t or1k_getsp(void) +static inline uint32_t up_getsp(void) { uint32_t sp; diff --git a/arch/or1k/include/tls.h b/arch/or1k/include/tls.h index 92d8bbd439..bb9785bc1f 100644 --- a/arch/or1k/include/tls.h +++ b/arch/or1k/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)or1k_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/or1k/src/common/up_assert.c b/arch/or1k/src/common/up_assert.c index fe9ff7aa29..ffabdad7bb 100644 --- a/arch/or1k/src/common/up_assert.c +++ b/arch/or1k/src/common/up_assert.c @@ -73,7 +73,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -195,7 +195,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = or1k_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 @@ -384,7 +384,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(or1k_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/renesas/include/m16c/arch.h b/arch/renesas/include/m16c/arch.h index f76e9c46de..33b2409cdc 100644 --- a/arch/renesas/include/m16c/arch.h +++ b/arch/renesas/include/m16c/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: renesas_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint16_t renesas_getsp(void) +static inline uint16_t up_getsp(void) { uint16_t sp; diff --git a/arch/renesas/include/rx65n/arch.h b/arch/renesas/include/rx65n/arch.h index e08e961002..9ba285b7e1 100644 --- a/arch/renesas/include/rx65n/arch.h +++ b/arch/renesas/include/rx65n/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: renesas_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint16_t renesas_getsp(void) +static inline uint16_t up_getsp(void) { uint16_t sp; diff --git a/arch/renesas/include/sh1/arch.h b/arch/renesas/include/sh1/arch.h index e20826c58e..c38ce88d51 100644 --- a/arch/renesas/include/sh1/arch.h +++ b/arch/renesas/include/sh1/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: renesas_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t renesas_getsp(void) +static inline uint32_t up_getsp(void) { uint32_t sp; diff --git a/arch/renesas/include/tls.h b/arch/renesas/include/tls.h index 97fd18ec3d..ecd74baba3 100644 --- a/arch/renesas/include/tls.h +++ b/arch/renesas/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)renesas_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/renesas/src/common/up_assert.c b/arch/renesas/src/common/up_assert.c index 5f6320e55f..f1e62a49fe 100644 --- a/arch/renesas/src/common/up_assert.c +++ b/arch/renesas/src/common/up_assert.c @@ -159,7 +159,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(renesas_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/renesas/src/m16c/m16c_dumpstate.c b/arch/renesas/src/m16c/m16c_dumpstate.c index a5c8ff5248..9ef1a5f751 100644 --- a/arch/renesas/src/m16c/m16c_dumpstate.c +++ b/arch/renesas/src/m16c/m16c_dumpstate.c @@ -122,7 +122,7 @@ static inline void m16c_registerdump(void) void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint16_t sp = renesas_getsp(); + uint16_t sp = up_getsp(); uint16_t ustackbase; uint16_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/renesas/src/rx65n/rx65n_dumpstate.c b/arch/renesas/src/rx65n/rx65n_dumpstate.c index ebf99059c5..5f8a0c36a9 100644 --- a/arch/renesas/src/rx65n/rx65n_dumpstate.c +++ b/arch/renesas/src/rx65n/rx65n_dumpstate.c @@ -129,7 +129,7 @@ static inline void rx65n_registerdump(void) void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = renesas_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/renesas/src/sh1/sh1_dumpstate.c b/arch/renesas/src/sh1/sh1_dumpstate.c index 215100f347..1989fd59e8 100644 --- a/arch/renesas/src/sh1/sh1_dumpstate.c +++ b/arch/renesas/src/sh1/sh1_dumpstate.c @@ -52,7 +52,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; static void sh1_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -109,7 +109,7 @@ static inline void sh1_registerdump(void) void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = renesas_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 diff --git a/arch/risc-v/include/rv32im/arch.h b/arch/risc-v/include/rv32im/arch.h index 6466ea9b94..a44303919c 100644 --- a/arch/risc-v/include/rv32im/arch.h +++ b/arch/risc-v/include/rv32im/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: riscv_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t riscv_getsp(void) +static inline uint32_t up_getsp(void) { register uint32_t sp; __asm__ diff --git a/arch/risc-v/include/rv64gc/arch.h b/arch/risc-v/include/rv64gc/arch.h index 08d990a604..5d0224373f 100644 --- a/arch/risc-v/include/rv64gc/arch.h +++ b/arch/risc-v/include/rv64gc/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: riscv_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint64_t riscv_getsp(void) +static inline uint64_t up_getsp(void) { register uint64_t sp; __asm__ diff --git a/arch/risc-v/include/tls.h b/arch/risc-v/include/tls.h index db821cb9cc..98bda2f7ec 100644 --- a/arch/risc-v/include/tls.h +++ b/arch/risc-v/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)riscv_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/risc-v/src/rv32im/riscv_assert.c b/arch/risc-v/src/rv32im/riscv_assert.c index 35118b8616..664aa9e13e 100644 --- a/arch/risc-v/src/rv32im/riscv_assert.c +++ b/arch/risc-v/src/rv32im/riscv_assert.c @@ -70,7 +70,7 @@ #ifdef CONFIG_ARCH_STACKDUMP static void riscv_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -177,7 +177,7 @@ static inline void riscv_registerdump(void) static void riscv_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = riscv_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 15 @@ -364,7 +364,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(riscv_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif riscv_assert(); diff --git a/arch/risc-v/src/rv64gc/riscv_assert.c b/arch/risc-v/src/rv64gc/riscv_assert.c index 79c20a7733..f5bdda2f1e 100644 --- a/arch/risc-v/src/rv64gc/riscv_assert.c +++ b/arch/risc-v/src/rv64gc/riscv_assert.c @@ -191,7 +191,7 @@ static inline void up_registerdump(void) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint64_t sp = riscv_getsp(); + uint64_t sp = up_getsp(); uintptr_t ustackbase; uintptr_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 15 @@ -397,7 +397,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(riscv_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/sim/include/arch.h b/arch/sim/include/arch.h index 69aeae2af1..c6314f3a16 100644 --- a/arch/sim/include/arch.h +++ b/arch/sim/include/arch.h @@ -30,10 +30,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: sim_getsp + * Name: up_getsp ****************************************************************************/ -static inline uintptr_t sim_getsp(void) +static inline uintptr_t up_getsp(void) { return (uintptr_t)__builtin_frame_address(0); } diff --git a/arch/sim/include/tls.h b/arch/sim/include/tls.h index 2682579065..7e9f2c4ffb 100644 --- a/arch/sim/include/tls.h +++ b/arch/sim/include/tls.h @@ -65,7 +65,7 @@ #ifdef CONFIG_TLS_ALIGNED static inline FAR struct tls_info_s *up_tls_info(void) { - return TLS_INFO(sim_getsp()); + return TLS_INFO(up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/sim/src/sim/up_assert.c b/arch/sim/src/sim/up_assert.c index a017aad505..6317cc30f5 100644 --- a/arch/sim/src/sim/up_assert.c +++ b/arch/sim/src/sim/up_assert.c @@ -90,7 +90,7 @@ void up_assert(const char *filename, int line) /* Allow for any board/configuration specific crash information */ #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(sim_getsp(), this_task(), filename, line); + board_crashdump(up_getsp(), this_task(), filename, line); #endif /* Flush any buffered SYSLOG data */ diff --git a/arch/sim/src/sim/up_initialstate.c b/arch/sim/src/sim/up_initialstate.c index ca623609d2..e1d7559ca3 100644 --- a/arch/sim/src/sim/up_initialstate.c +++ b/arch/sim/src/sim/up_initialstate.c @@ -53,7 +53,7 @@ void up_initial_state(struct tcb_s *tcb) { if (tcb->pid == 0) { - tcb->stack_alloc_ptr = (void *)(sim_getsp() - + tcb->stack_alloc_ptr = (void *)(up_getsp() - CONFIG_IDLETHREAD_STACKSIZE); tcb->stack_base_ptr = tcb->stack_alloc_ptr; tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE; diff --git a/arch/x86/include/i486/arch.h b/arch/x86/include/i486/arch.h index 6ffe2be453..0e84f314bd 100644 --- a/arch/x86/include/i486/arch.h +++ b/arch/x86/include/i486/arch.h @@ -357,7 +357,7 @@ begin_packed_struct struct idt_ptr_s /* Return stack pointer */ -static inline uint32_t x86_getsp() +static inline uint32_t up_getsp() { uint32_t regval; diff --git a/arch/x86/include/tls.h b/arch/x86/include/tls.h index c9a1ea1024..0298349cd1 100644 --- a/arch/x86/include/tls.h +++ b/arch/x86/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)x86_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/x86/src/common/up_assert.c b/arch/x86/src/common/up_assert.c index b7abe093a5..072e43f545 100644 --- a/arch/x86/src/common/up_assert.c +++ b/arch/x86/src/common/up_assert.c @@ -75,7 +75,7 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS]; #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -121,7 +121,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = x86_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 @@ -290,7 +290,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(x86_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/x86_64/include/intel64/arch.h b/arch/x86_64/include/intel64/arch.h index dbf7143984..e8f2438a75 100644 --- a/arch/x86_64/include/intel64/arch.h +++ b/arch/x86_64/include/intel64/arch.h @@ -454,7 +454,7 @@ static inline void write_gsbase(unsigned long val) /* Return stack pointer */ -static inline uint64_t x64_getsp() +static inline uint64_t up_getsp() { uint64_t regval; diff --git a/arch/x86_64/include/tls.h b/arch/x86_64/include/tls.h index 8bbfc66e93..8e6f0c1771 100644 --- a/arch/x86_64/include/tls.h +++ b/arch/x86_64/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)x64_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/x86_64/src/common/up_assert.c b/arch/x86_64/src/common/up_assert.c index 615968f3e7..c1650aa3d4 100644 --- a/arch/x86_64/src/common/up_assert.c +++ b/arch/x86_64/src/common/up_assert.c @@ -67,7 +67,7 @@ #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(uint64_t sp, uint64_t stack_top) { - uint64_t stack ; + uint64_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -113,7 +113,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) static void up_dumpstate(void) { struct tcb_s *rtcb = this_task(); - uint64_t sp = x64_getsp(); + uint64_t sp = up_getsp(); uint64_t ustackbase; uint64_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 @@ -272,7 +272,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(x64_getsp(), this_task(), filename, lineno); + board_crashdump(up_getsp(), this_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/xtensa/include/arch.h b/arch/xtensa/include/arch.h index 435de1f4c4..a96fc1aff3 100644 --- a/arch/xtensa/include/arch.h +++ b/arch/xtensa/include/arch.h @@ -44,10 +44,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: xtensa_getsp + * Name: up_getsp ****************************************************************************/ -static inline uint32_t xtensa_getsp(void) +static inline uint32_t up_getsp(void) { register uint32_t sp; diff --git a/arch/xtensa/include/tls.h b/arch/xtensa/include/tls.h index a7968fb8c6..94d4198848 100644 --- a/arch/xtensa/include/tls.h +++ b/arch/xtensa/include/tls.h @@ -66,7 +66,7 @@ static inline FAR struct tls_info_s *up_tls_info(void) { DEBUGASSERT(!up_interrupt_context()); - return TLS_INFO((uintptr_t)xtensa_getsp()); + return TLS_INFO((uintptr_t)up_getsp()); } #else # define up_tls_info() tls_get_info() diff --git a/arch/xtensa/src/common/xtensa_assert.c b/arch/xtensa/src/common/xtensa_assert.c index 7399445b54..7c38eedee5 100644 --- a/arch/xtensa/src/common/xtensa_assert.c +++ b/arch/xtensa/src/common/xtensa_assert.c @@ -101,7 +101,7 @@ static void xtensa_assert(void) #ifdef CONFIG_BOARD_CRASHDUMP /* Perform board-specific crash dump */ - board_crashdump(xtensa_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif /* Flush any buffered SYSLOG data (from the above) */ diff --git a/arch/xtensa/src/common/xtensa_dumpstate.c b/arch/xtensa/src/common/xtensa_dumpstate.c index dc07da5e0e..f94fc336c2 100644 --- a/arch/xtensa/src/common/xtensa_dumpstate.c +++ b/arch/xtensa/src/common/xtensa_dumpstate.c @@ -94,7 +94,7 @@ static inline void up_showtasks(void) static void xtensa_stackdump(uint32_t sp, uint32_t stack_top) { - uint32_t stack ; + uint32_t stack; for (stack = sp & ~0x1f; stack < stack_top; stack += 32) { @@ -265,7 +265,7 @@ static inline void xtensa_btdump(void) void xtensa_dumpstate(void) { struct tcb_s *rtcb = running_task(); - uint32_t sp = xtensa_getsp(); + uint32_t sp = up_getsp(); uint32_t ustackbase; uint32_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 15 diff --git a/arch/z16/src/common/z16_assert.c b/arch/z16/src/common/z16_assert.c index 3ee6efc89d..0b4658be26 100644 --- a/arch/z16/src/common/z16_assert.c +++ b/arch/z16/src/common/z16_assert.c @@ -161,7 +161,7 @@ void up_assert(const char *filename, int lineno) syslog_flush(); #ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(z16_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/z16/src/common/z16_internal.h b/arch/z16/src/common/z16_internal.h index 103e034037..4f840e46f3 100644 --- a/arch/z16/src/common/z16_internal.h +++ b/arch/z16/src/common/z16_internal.h @@ -154,7 +154,7 @@ void z16_netinitialize(void); /* Return the current value of the stack pointer (used in stack dump logic) */ -chipreg_t z16_getsp(void); +chipreg_t up_getsp(void); /* Dump stack and registers */ diff --git a/arch/z16/src/common/z16_stackdump.c b/arch/z16/src/common/z16_stackdump.c index 705aa67ce6..ad35189173 100644 --- a/arch/z16/src/common/z16_stackdump.c +++ b/arch/z16/src/common/z16_stackdump.c @@ -37,7 +37,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: z16_getsp + * Name: up_getsp ****************************************************************************/ /* To be provided */ @@ -49,7 +49,7 @@ static void z16_stackdump(void) { struct tcb_s *rtcb = this_task(); - chipreg_t sp = z16_getsp(); + chipreg_t sp = up_getsp(); chipreg_t stack_base = (chipreg_t)rtcb->stack_base_ptr; chipreg_t stack_size = (chipreg_t)rtcb->adj_stack_size; chipreg_t stack; diff --git a/arch/z80/src/common/z80_assert.c b/arch/z80/src/common/z80_assert.c index c55ef1f53f..072aea8880 100644 --- a/arch/z80/src/common/z80_assert.c +++ b/arch/z80/src/common/z80_assert.c @@ -162,7 +162,7 @@ void up_assert(const char *filename, int lineno) #ifdef CONFIG_BOARD_CRASHDUMP /* Execute board-specific crash dump logic */ - board_crashdump(z80_getsp(), running_task(), filename, lineno); + board_crashdump(up_getsp(), running_task(), filename, lineno); #endif _up_assert(); diff --git a/arch/z80/src/common/z80_internal.h b/arch/z80/src/common/z80_internal.h index 9f4110aaa4..4fa5aa8e48 100644 --- a/arch/z80/src/common/z80_internal.h +++ b/arch/z80/src/common/z80_internal.h @@ -128,7 +128,7 @@ int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, /* Return the current value of the stack pointer (used in stack dump logic) */ -uintptr_t z80_getsp(void); +uintptr_t up_getsp(void); /* Dump stack and registers */ diff --git a/arch/z80/src/common/z80_stackdump.c b/arch/z80/src/common/z80_stackdump.c index 093696e3a2..871cd68331 100644 --- a/arch/z80/src/common/z80_stackdump.c +++ b/arch/z80/src/common/z80_stackdump.c @@ -44,7 +44,7 @@ void up_stackdump(void) { FAR struct tcb_s *rtcb = this_task(); - uintptr_t sp = z80_getsp(); + uintptr_t sp = up_getsp(); uintptr_t stack_base = (uintptr_t)rtcb->stack_base_ptr; uintptr_t stack_size = (uintptr_t)rtcb->adj_stack_size; uintptr_t stack; diff --git a/arch/z80/src/ez80/ez80_getsp.asm b/arch/z80/src/ez80/ez80_getsp.asm index 356271f848..690828f4cf 100644 --- a/arch/z80/src/ez80/ez80_getsp.asm +++ b/arch/z80/src/ez80/ez80_getsp.asm @@ -22,7 +22,7 @@ ; Global Symbols Exported ;************************************************************************** - xdef _z80_getsp + xdef _up_getsp ;************************************************************************** ; Code @@ -32,14 +32,14 @@ .assume ADL=1 ;************************************************************************** -;* Name: _z80_getsp +;* Name: _up_getsp ;* ;* Description: ;* Return the current value of the stack pointer ;* ;************************************************************************** -_z80_getsp: +_up_getsp: ld hl, 0 ; Initialize HL to zero add hl, sp ; Add the stack pointer to HL ret ; Return stack pointer in HL diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 04b052cdb8..bee83c5061 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1687,6 +1687,23 @@ int up_timer_cancel(FAR struct timespec *ts); int up_timer_start(FAR const struct timespec *ts); #endif +/**************************************************************************** + * Name: up_getsp + * + * Input Parameters: + * None + * + * Returned Value: + * Current stack pointer. + * + ****************************************************************************/ + +/* uintptr_t up_getsp(void); + * + * The actual declaration or definition is provided in arch/arch.h. + * The actual implementation may be a MACRO or an inline function. + */ + /**************************************************************************** * TLS support ****************************************************************************/