ldube commented on issue #19201:
URL: https://github.com/apache/nuttx/issues/19201#issuecomment-4789777416

   I doubt it will work without making code changes. The conceptual layout of 
your interrupt decoder should look like this. 
   
   ```C
   uint32_t *arm_decodeirq(uint32_t *regs)
   {
   #ifdef CONFIG_SUPPRESS_INTERRUPTS
     err("ERROR: Unexpected IRQ\n");
     PANIC();
   #else
   
     /* Check which IRQ fires */
   
     uint32_t irqbits = vic_getreg(VIC_IRQSTATUS_OFFSET) & 0xffffffff;
     unsigned int irq;
   
     for (irq = 0; irq < NR_IRQS; irq++)
       {
         if (irqbits & (uint32_t) (1 << irq))
           {
             break;
           }
       }
   
     /* Verify that the resulting IRQ number is valid */
   
     if (irq < NR_IRQS)
       {
         /* Deliver the IRQ */
   
         regs = arm_doirq(irq, regs);
       }
    
   #endif
   
     return regs;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to