diff --git a/sys/x86/include/intr_machdep.h b/sys/x86/include/intr_machdep.h index 03b06c060e646..a910262be22d5 100644 --- a/sys/x86/include/intr_machdep.h +++ b/sys/x86/include/intr_machdep.h @@ -83,7 +83,6 @@ typedef device_t x86pic_t; */ struct intsrc { struct intr_event is_event; - x86pic_t is_pic; u_long *is_count; u_long *is_straycount; u_int is_index; diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index c3079066c13f7..08a6acf6908a3 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -257,12 +257,12 @@ intr_register_source(u_int vector, struct intsrc *isrc) { int error; - KASSERT(intr_pic_registered(isrc->is_pic), ("unregistered PIC")); + KASSERT(intr_pic_registered(isrc->is_event.ie_pic), ("unregistered PIC")); KASSERT(vector < num_io_irqs, ("IRQ %d too large (%u irqs)", vector, num_io_irqs)); if (interrupt_sources[vector] != NULL) return (EEXIST); - error = intr_event_init(&isrc->is_event, isrc->is_pic, vector, 0, + error = intr_event_init(&isrc->is_event, isrc->is_event.ie_pic, vector, 0, "irq%d:", vector); if (error) return (error); @@ -303,8 +303,8 @@ intr_add_handler(struct intsrc *isrc, const char *name, driver_filter_t filter, isrc->is_handlers++; if (isrc->is_handlers == 1) { isrc->is_domain = domain; - PIC_ENABLE_INTR(isrc->is_pic, isrc); - PIC_ENABLE_SOURCE(isrc->is_pic, isrc); + PIC_ENABLE_INTR(isrc->is_event.ie_pic, isrc); + PIC_ENABLE_SOURCE(isrc->is_event.ie_pic, isrc); } sx_xunlock(&intrsrc_lock); } @@ -323,8 +323,8 @@ intr_remove_handler(void *cookie) sx_xlock(&intrsrc_lock); isrc->is_handlers--; if (isrc->is_handlers == 0) { - PIC_DISABLE_SOURCE(isrc->is_pic, isrc, PIC_NO_EOI); - PIC_DISABLE_INTR(isrc->is_pic, isrc); + PIC_DISABLE_SOURCE(isrc->is_event.ie_pic, isrc, PIC_NO_EOI); + PIC_DISABLE_INTR(isrc->is_event.ie_pic, isrc); } intrcnt_updatename(isrc); sx_xunlock(&intrsrc_lock); @@ -337,7 +337,7 @@ intr_config_intr(struct intsrc *isrc, enum intr_trigger trig, enum intr_polarity pol) { - return (PIC_CONFIG_INTR(isrc->is_pic, isrc, trig, pol)); + return (PIC_CONFIG_INTR(isrc->is_event.ie_pic, isrc, trig, pol)); } static void @@ -377,7 +377,7 @@ intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame) * stray count, and log the condition. */ if (intr_event_handle(ie, frame) != 0) { - PIC_DISABLE_SOURCE(isrc->is_pic, isrc, PIC_EOI); + PIC_DISABLE_SOURCE(isrc->is_event.ie_pic, isrc, PIC_EOI); (*isrc->is_straycount)++; if (*isrc->is_straycount < INTR_STRAY_LOG_MAX) log(LOG_ERR, "stray irq%d\n", vector); @@ -428,7 +428,7 @@ intr_assign_cpu(device_t pic, interrupt_t *isrc, u_int cpu) /* Nothing to do if there is only a single CPU. */ if (mp_ncpus > 1 && cpu != NOCPU) { sx_xlock(&intrsrc_lock); - error = PIC_ASSIGN_CPU(isrc->is_pic, isrc, cpu_apic_ids[cpu]); + error = PIC_ASSIGN_CPU(isrc->is_event.ie_pic, isrc, cpu_apic_ids[cpu]); if (error == 0) isrc->is_cpu = cpu; sx_xunlock(&intrsrc_lock); @@ -565,7 +565,7 @@ intr_reprogram(void) is = interrupt_sources[v]; if (is == NULL) continue; - PIC_REPROGRAM_PIN(is->is_pic, is); + PIC_REPROGRAM_PIN(is->is_event.ie_pic, is); } sx_xunlock(&intrsrc_lock); } @@ -782,7 +782,7 @@ intr_balance(void *dummy __unused, int pending __unused) cpu = current_cpu[isrc->is_domain]; intr_next_cpu(isrc->is_domain); if (isrc->is_cpu != cpu && - PIC_ASSIGN_CPU(isrc->is_pic, isrc, cpu_apic_ids[cpu]) == 0) + PIC_ASSIGN_CPU(isrc->is_event.ie_pic, isrc, cpu_apic_ids[cpu]) == 0) isrc->is_cpu = cpu; } sx_xunlock(&intrsrc_lock);