Skip to content

Commit 1358942

Browse files
jasonbuxiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent 7a0ea10 commit 1358942

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

arch/tricore/include/arch.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@
4242
* Pre-processor Definitions
4343
****************************************************************************/
4444

45+
/* Address <--> Context Save Areas */
46+
47+
#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \
48+
| (((csa) & 0x0000FFFF) << 6)))
49+
#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \
50+
| (((uintptr_t)(addr) & 0x003FFFC0) >> 6)))
51+
4552
/****************************************************************************
4653
* Public Types
4754
****************************************************************************/

arch/tricore/src/common/tricore_internal.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,6 @@ extern void tricore_switchcontext(uintptr_t **saveregs,
144144
uintptr_t *restoreregs);
145145
#endif
146146

147-
/* Address <--> Context Save Areas */
148-
149-
#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \
150-
| (((csa) & 0x0000FFFF) << 6)))
151-
#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \
152-
| (((uintptr_t)(addr) & 0x003FFFC0) >> 6)))
153-
154147
/****************************************************************************
155148
* Public Types
156149
****************************************************************************/

0 commit comments

Comments
 (0)