arch/tricore: move tricore_csa2addr from internal.h to arch.h

Make up_getusrsp possible move to irq as depends on tricore_csa2addr

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2025-01-03 15:09:57 +08:00 committed by Xiang Xiao
parent 7a0ea108f6
commit 1358942132
2 changed files with 7 additions and 7 deletions

View file

@ -42,6 +42,13 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Address <--> Context Save Areas */
#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \
| (((csa) & 0x0000FFFF) << 6)))
#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \
| (((uintptr_t)(addr) & 0x003FFFC0) >> 6)))
/**************************************************************************** /****************************************************************************
* Public Types * Public Types
****************************************************************************/ ****************************************************************************/

View file

@ -144,13 +144,6 @@ extern void tricore_switchcontext(uintptr_t **saveregs,
uintptr_t *restoreregs); uintptr_t *restoreregs);
#endif #endif
/* Address <--> Context Save Areas */
#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \
| (((csa) & 0x0000FFFF) << 6)))
#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \
| (((uintptr_t)(addr) & 0x003FFFC0) >> 6)))
/**************************************************************************** /****************************************************************************
* Public Types * Public Types
****************************************************************************/ ****************************************************************************/