Lines Matching refs:hdlp

745  * hdlp    - pointer to the internal interrupt handle structure for the
755 apic_intr_ops(dev_info_t *dip, ddi_intr_handle_impl_t *hdlp,
766 DDI_INTR_IMPLDBG((CE_CONT, "apic_intr_ops: dip: %p hdlp: %p "
767 "intr_op: %x\n", (void *)dip, (void *)hdlp, intr_op));
770 ispec->intrspec_pri = hdlp->ih_pri;
771 ispec->intrspec_vec = hdlp->ih_inum;
772 ispec->intrspec_func = hdlp->ih_cb_func;
778 * masked off the MSI/X bits in hdlp->ih_type if not
782 * hdlp->ih_type passed in from the nexus has all the
798 *result = hdlp->ih_type;
800 *result = hdlp->ih_type & ~DDI_INTR_TYPE_MSIX;
802 *result = hdlp->ih_type & ~(DDI_INTR_TYPE_MSI |
806 if (hdlp->ih_type == DDI_INTR_TYPE_MSI)
807 *result = apic_alloc_msi_vectors(dip, hdlp->ih_inum,
808 hdlp->ih_scratch1, hdlp->ih_pri,
809 (int)(uintptr_t)hdlp->ih_scratch2);
811 *result = apic_alloc_msix_vectors(dip, hdlp->ih_inum,
812 hdlp->ih_scratch1, hdlp->ih_pri,
813 (int)(uintptr_t)hdlp->ih_scratch2);
816 apic_free_vectors(dip, hdlp->ih_inum, hdlp->ih_scratch1,
817 hdlp->ih_pri, hdlp->ih_type);
820 *result = apic_navail_vector(dip, hdlp->ih_pri);
823 ispec = ((ihdl_plat_t *)hdlp->ih_private)->ip_ispecp;
824 *result = apic_introp_xlate(dip, ispec, hdlp->ih_type);
829 if ((irqp = apic_find_irq(dip, ispec, hdlp->ih_type)) == NULL)
831 *result = apic_get_pending(irqp, hdlp->ih_type);
834 if (hdlp->ih_type != DDI_INTR_TYPE_FIXED)
836 irqp = apic_find_irq(dip, ispec, hdlp->ih_type);
842 if (hdlp->ih_type != DDI_INTR_TYPE_FIXED)
844 if ((irqp = apic_find_irq(dip, ispec, hdlp->ih_type)) == NULL)
850 if (hdlp->ih_type == DDI_INTR_TYPE_FIXED)
855 if (hdlp->ih_type != DDI_INTR_TYPE_FIXED)
857 ispec = ((ihdl_plat_t *)hdlp->ih_private)->ip_ispecp;
858 if ((irqp = apic_find_irq(dip, ispec, hdlp->ih_type)) == NULL)
863 old_priority = hdlp->ih_pri; /* save old value */
866 if (hdlp->ih_type == DDI_INTR_TYPE_FIXED) {
871 if (hdlp->ih_type == DDI_INTR_TYPE_MSI) {
873 if (i_ddi_intr_get_current_nintrs(hdlp->ih_dip) > 1)
876 count_vec = apic_alloc_msi_vectors(dip, hdlp->ih_inum,
880 count_vec = apic_alloc_msix_vectors(dip, hdlp->ih_inum,
890 apic_free_vectors(dip, hdlp->ih_inum, count_vec,
891 old_priority, hdlp->ih_type);
900 new_cpu = (int)(intptr_t)hdlp->ih_private;
907 if (hdlp->ih_vector > APIC_MAX_VECTOR) {
910 hdlp->ih_vector));
914 if ((hdlp->ih_flags & PSMGI_INTRBY_FLAGS) == PSMGI_INTRBY_VEC)
915 hdlp->ih_vector = apic_vector_to_irq[hdlp->ih_vector];
917 if (apic_set_cpu(hdlp->ih_vector, new_cpu, result) !=
921 if (apic_grp_set_cpu(hdlp->ih_vector, new_cpu,
933 hdlp->ih_vector, hdlp->ih_private) != PSM_SUCCESS)
937 ((apic_get_type_t *)(hdlp->ih_private))->avgi_type =
939 ((apic_get_type_t *)(hdlp->ih_private))->avgi_num_intr =
941 ((apic_get_type_t *)(hdlp->ih_private))->avgi_num_cpu =
943 hdlp->ih_ver = apic_get_apic_version();