This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d4463c00ac38c03a28d49ca6736c977ae1f5eb6b Author: zhangyu117 <[email protected]> AuthorDate: Thu Nov 26 11:12:27 2026 +0800 arch/tricore: move CSA address conversion macros to arch.h Move tricore_csa2addr and tricore_addr2csa to the common architecture header so they can be shared without depending on interrupt definitions. Signed-off-by: zhangyu117 <[email protected]> --- arch/tricore/include/arch.h | 7 +++++++ arch/tricore/include/irq.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/tricore/include/arch.h b/arch/tricore/include/arch.h index a1c2f269319..19bb5896dd5 100644 --- a/arch/tricore/include/arch.h +++ b/arch/tricore/include/arch.h @@ -45,6 +45,13 @@ * 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))) + /* MTCR and MFCR - move to / from Core Special Function Register */ #define tricore_mtcr(reg, val) \ diff --git a/arch/tricore/include/irq.h b/arch/tricore/include/irq.h index 0cc69de26bf..888dd84846a 100644 --- a/arch/tricore/include/irq.h +++ b/arch/tricore/include/irq.h @@ -46,13 +46,6 @@ * Pre-processor Prototypes ****************************************************************************/ -/* 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))) - /* Upper CSA */ #define REG_UPCXI 0
