| 431 | }; |
| 432 | |
| 433 | static rt_bool_t gicv2_handler(void *data) |
| 434 | { |
| 435 | rt_bool_t res = RT_FALSE; |
| 436 | int hwirq; |
| 437 | struct gicv2 *gic = data; |
| 438 | |
| 439 | hwirq = HWREG32(gic->cpu_base + GIC_CPU_INTACK) & 0x3ffUL; |
| 440 | |
| 441 | if (!(hwirq >= 1020 && hwirq <= 1023)) |
| 442 | { |
| 443 | struct rt_pic_irq *pirq; |
| 444 | |
| 445 | if (hwirq < GIC_SGI_NR) |
| 446 | { |
| 447 | rt_hw_rmb(); |
| 448 | |
| 449 | pirq = rt_pic_find_ipi(&gic->parent, hwirq); |
| 450 | } |
| 451 | else |
| 452 | { |
| 453 | pirq = rt_pic_find_irq(&gic->parent, hwirq - GIC_SGI_NR); |
| 454 | } |
| 455 | |
| 456 | gicv2_irq_ack(pirq); |
| 457 | |
| 458 | rt_pic_handle_isr(pirq); |
| 459 | |
| 460 | gicv2_irq_eoi(pirq); |
| 461 | |
| 462 | res = RT_TRUE; |
| 463 | } |
| 464 | |
| 465 | return res; |
| 466 | } |
| 467 | |
| 468 | static rt_err_t gicv2_enable_rmw_access(void *data) |
| 469 | { |
nothing calls this directly
no test coverage detected