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:
parent
7a0ea108f6
commit
1358942132
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
|
@ -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
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue