Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/gic_v3.c
Show First 20 Lines • Show All 499 Lines • ▼ Show 20 Lines | gic_v3_write_ivar(device_t dev, device_t child, int which, uintptr_t value) | ||||
case GIC_IVAR_BUS: | case GIC_IVAR_BUS: | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
int | int | ||||
arm_gic_v3_intr(void *arg) | arm_gic_v3_intr(INTR_IRQ_FILTER_ARGS(arg, tf)) | ||||
{ | { | ||||
struct gic_v3_softc *sc = arg; | struct gic_v3_softc *sc = arg; | ||||
struct gic_v3_irqsrc *gi; | struct gic_v3_irqsrc *gi; | ||||
struct intr_pic *pic; | struct intr_pic *pic; | ||||
uint64_t active_irq; | uint64_t active_irq; | ||||
struct trapframe *tf; | INTR_IRQ_FILTER_TRAPFRAME(tf) | ||||
pic = sc->gic_pic; | pic = sc->gic_pic; | ||||
while (1) { | while (1) { | ||||
if (CPU_MATCH_ERRATA_CAVIUM_THUNDERX_1_1) { | if (CPU_MATCH_ERRATA_CAVIUM_THUNDERX_1_1) { | ||||
/* | /* | ||||
* Hardware: Cavium ThunderX | * Hardware: Cavium ThunderX | ||||
* Chip revision: Pass 1.0 (early version) | * Chip revision: Pass 1.0 (early version) | ||||
Show All 13 Lines | while (1) { | ||||
if (active_irq >= GIC_FIRST_LPI) { | if (active_irq >= GIC_FIRST_LPI) { | ||||
intr_child_irq_handler(pic, active_irq); | intr_child_irq_handler(pic, active_irq); | ||||
continue; | continue; | ||||
} | } | ||||
if (__predict_false(active_irq >= sc->gic_nirqs)) | if (__predict_false(active_irq >= sc->gic_nirqs)) | ||||
return (FILTER_HANDLED); | return (FILTER_HANDLED); | ||||
tf = curthread->td_intr_frame; | |||||
gi = &sc->gic_irqs[active_irq]; | gi = &sc->gic_irqs[active_irq]; | ||||
if (active_irq <= GIC_LAST_SGI) { | if (active_irq <= GIC_LAST_SGI) { | ||||
/* Call EOI for all IPI before dispatch. */ | /* Call EOI for all IPI before dispatch. */ | ||||
gic_icc_write(EOIR1, (uint64_t)active_irq); | gic_icc_write(EOIR1, (uint64_t)active_irq); | ||||
#ifdef SMP | #ifdef SMP | ||||
intr_ipi_dispatch(sgi_to_ipi[gi->gi_irq], tf); | intr_ipi_dispatch(sgi_to_ipi[gi->gi_irq], tf); | ||||
#else | #else | ||||
device_printf(sc->dev, "SGI %ju on UP system detected\n", | device_printf(sc->dev, "SGI %ju on UP system detected\n", | ||||
▲ Show 20 Lines • Show All 1,017 Lines • Show Last 20 Lines |