Lines Matching refs:hdlp

760 apic_intr_ops(dev_info_t *dip, ddi_intr_handle_impl_t *hdlp,  in apic_intr_ops()  argument
772 "intr_op: %x\n", (void *)dip, (void *)hdlp, intr_op)); in apic_intr_ops()
775 ispec->intrspec_pri = hdlp->ih_pri; in apic_intr_ops()
776 ispec->intrspec_vec = hdlp->ih_inum; in apic_intr_ops()
777 ispec->intrspec_func = hdlp->ih_cb_func; in apic_intr_ops()
803 *result = hdlp->ih_type; in apic_intr_ops()
805 *result = hdlp->ih_type & ~DDI_INTR_TYPE_MSIX; in apic_intr_ops()
807 *result = hdlp->ih_type & ~(DDI_INTR_TYPE_MSI | in apic_intr_ops()
811 if (hdlp->ih_type == DDI_INTR_TYPE_MSI) in apic_intr_ops()
812 *result = apic_alloc_msi_vectors(dip, hdlp->ih_inum, in apic_intr_ops()
813 hdlp->ih_scratch1, hdlp->ih_pri, in apic_intr_ops()
814 (int)(uintptr_t)hdlp->ih_scratch2); in apic_intr_ops()
816 *result = apic_alloc_msix_vectors(dip, hdlp->ih_inum, in apic_intr_ops()
817 hdlp->ih_scratch1, hdlp->ih_pri, in apic_intr_ops()
818 (int)(uintptr_t)hdlp->ih_scratch2); in apic_intr_ops()
821 apic_free_vectors(dip, hdlp->ih_inum, hdlp->ih_scratch1, in apic_intr_ops()
822 hdlp->ih_pri, hdlp->ih_type); in apic_intr_ops()
825 *result = apic_navail_vector(dip, hdlp->ih_pri); in apic_intr_ops()
828 ispec = ((ihdl_plat_t *)hdlp->ih_private)->ip_ispecp; in apic_intr_ops()
829 *result = apic_introp_xlate(dip, ispec, hdlp->ih_type); in apic_intr_ops()
834 if ((irqp = apic_find_irq(dip, ispec, hdlp->ih_type)) == NULL) in apic_intr_ops()
836 *result = apic_get_pending(irqp, hdlp->ih_type); in apic_intr_ops()
839 if (hdlp->ih_type != DDI_INTR_TYPE_FIXED) in apic_intr_ops()
841 irqp = apic_find_irq(dip, ispec, hdlp->ih_type); in apic_intr_ops()
847 if (hdlp->ih_type != DDI_INTR_TYPE_FIXED) in apic_intr_ops()
849 if ((irqp = apic_find_irq(dip, ispec, hdlp->ih_type)) == NULL) in apic_intr_ops()
855 if (hdlp->ih_type == DDI_INTR_TYPE_FIXED) in apic_intr_ops()
860 if (hdlp->ih_type != DDI_INTR_TYPE_FIXED) in apic_intr_ops()
862 ispec = ((ihdl_plat_t *)hdlp->ih_private)->ip_ispecp; in apic_intr_ops()
863 if ((irqp = apic_find_irq(dip, ispec, hdlp->ih_type)) == NULL) in apic_intr_ops()
868 old_priority = hdlp->ih_pri; /* save old value */ in apic_intr_ops()
871 if (hdlp->ih_type == DDI_INTR_TYPE_FIXED) { in apic_intr_ops()
876 if (hdlp->ih_type == DDI_INTR_TYPE_MSI) { in apic_intr_ops()
878 if (i_ddi_intr_get_current_nintrs(hdlp->ih_dip) > 1) in apic_intr_ops()
881 count_vec = apic_alloc_msi_vectors(dip, hdlp->ih_inum, in apic_intr_ops()
885 count_vec = apic_alloc_msix_vectors(dip, hdlp->ih_inum, in apic_intr_ops()
895 apic_free_vectors(dip, hdlp->ih_inum, count_vec, in apic_intr_ops()
896 old_priority, hdlp->ih_type); in apic_intr_ops()
905 new_cpu = (int)(intptr_t)hdlp->ih_private; in apic_intr_ops()
912 if (hdlp->ih_vector > APIC_MAX_VECTOR) { in apic_intr_ops()
915 hdlp->ih_vector)); in apic_intr_ops()
919 if ((hdlp->ih_flags & PSMGI_INTRBY_FLAGS) == PSMGI_INTRBY_VEC) in apic_intr_ops()
920 hdlp->ih_vector = apic_vector_to_irq[hdlp->ih_vector]; in apic_intr_ops()
922 if (apic_set_cpu(hdlp->ih_vector, new_cpu, result) != in apic_intr_ops()
926 if (apic_grp_set_cpu(hdlp->ih_vector, new_cpu, in apic_intr_ops()
938 hdlp->ih_vector, hdlp->ih_private) != PSM_SUCCESS) in apic_intr_ops()
942 ((apic_get_type_t *)(hdlp->ih_private))->avgi_type = in apic_intr_ops()
944 ((apic_get_type_t *)(hdlp->ih_private))->avgi_num_intr = in apic_intr_ops()
946 ((apic_get_type_t *)(hdlp->ih_private))->avgi_num_cpu = in apic_intr_ops()
948 hdlp->ih_ver = apic_get_apic_version(); in apic_intr_ops()