MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / gicv3_handler

Function gicv3_handler

components/drivers/pic/pic-gicv3.c:819–863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817};
818
819static rt_bool_t gicv3_handler(void *data)
820{
821 rt_bool_t res = RT_FALSE;
822 int hwirq;
823 struct gicv3 *gic = data;
824
825 read_gicreg(ICC_IAR1_SYS, hwirq);
826
827 if (!(hwirq >= 1020 && hwirq <= 1023))
828 {
829 struct rt_pic_irq *pirq;
830
831 if (hwirq < GIC_SGI_NR)
832 {
833 rt_hw_rmb();
834
835 pirq = rt_pic_find_ipi(&gic->parent, hwirq);
836 }
837 else
838 {
839 int irq_index;
840
841 if (hwirq < 8192)
842 {
843 irq_index = hwirq - GIC_SGI_NR;
844 }
845 else
846 {
847 irq_index = gic->irq_nr - gic->lpi_nr + hwirq - 8192;
848 }
849
850 pirq = rt_pic_find_irq(&gic->parent, irq_index);
851 }
852
853 gicv3_irq_ack(pirq);
854
855 rt_pic_handle_isr(pirq);
856
857 gicv3_irq_eoi(pirq);
858
859 res = RT_TRUE;
860 }
861
862 return res;
863}
864
865static rt_err_t gicv3_enable_quirk_msm8996(void *data)
866{

Callers

nothing calls this directly

Calls 5

rt_pic_find_ipiFunction · 0.85
rt_pic_find_irqFunction · 0.85
gicv3_irq_ackFunction · 0.85
rt_pic_handle_isrFunction · 0.85
gicv3_irq_eoiFunction · 0.85

Tested by

no test coverage detected