| 817 | }; |
| 818 | |
| 819 | static 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 | |
| 865 | static rt_err_t gicv3_enable_quirk_msm8996(void *data) |
| 866 | { |
nothing calls this directly
no test coverage detected