This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5ff7f927f52432bfa47eadf045cf5df23b94b9b1
Author: zhangyu117 <[email protected]>
AuthorDate: Mon Apr 27 14:34:03 2026 +0800

    arch/tricore: remove up_irq_to_ndx implementation
    
    Reason for revert: the mapping from IRQ to NDX should only be a logical
    relationship; Tricore directly treated Prio as NDX, which led to the
    existence of this interface.
    
    Signed-off-by: zhangyu117 <[email protected]>
---
 arch/tricore/src/common/tricore_irq.c | 35 -----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/arch/tricore/src/common/tricore_irq.c 
b/arch/tricore/src/common/tricore_irq.c
index ddb2483479b..a29d67760cf 100644
--- a/arch/tricore/src/common/tricore_irq.c
+++ b/arch/tricore/src/common/tricore_irq.c
@@ -72,7 +72,6 @@ static inline void tricore_color_intstack(void)
 
 static int g_srpn_to_irq[TRICORE_IRQ_MAX_PRIORITY + 1];
 static spinlock_t g_irqlock = SP_UNLOCKED;
-static int g_irqmap_count = 1;
 
 /****************************************************************************
  * Private Functions
@@ -382,37 +381,3 @@ int up_prioritize_irq(int irq, int priority)
   return OK;
 }
 #endif
-
-/****************************************************************************
- * Name: up_irq_to_ndx
- *
- * Description:
- *   Irq to ndx
- *
- ****************************************************************************/
-
-int up_irq_to_ndx(int irq)
-{
-  volatile uint32_t *src = TRICORE_IRQ2SRC(irq);
-  irqstate_t flags;
-  int ndx;
-
-  ndx = *src & TRICORE_SRC_SRPN_MASK;
-  if (ndx != 0)
-    {
-      return ndx;
-    }
-
-  flags = spin_lock_irqsave(&g_irqlock);
-  ndx = *src & TRICORE_SRC_SRPN_MASK;
-  if (ndx == 0)
-    {
-      ndx = g_irqmap_count++;
-      g_irqrevmap[ndx] = irq;
-      *src = (*src & ~TRICORE_SRC_SRPN_MASK) | ndx;
-    }
-
-  spin_unlock_irqrestore(&g_irqlock, flags);
-
-  return ndx;
-}

Reply via email to