Lines Matching +full:irq +full:- +full:start
1 /*-
76 (((x) + MALLOCSMART_SLICE_SIZE - 1) / MALLOCSMART_SLICE_SIZE)
152 XX_MallocSmartMapCheck(unsigned int start, unsigned int slices) in XX_MallocSmartMapCheck() argument
157 for (i = start; i < start + slices; i++) in XX_MallocSmartMapCheck()
164 XX_MallocSmartMapSet(unsigned int start, unsigned int slices) in XX_MallocSmartMapSet() argument
170 for (i = start; i < start + slices; i++) in XX_MallocSmartMapSet()
171 XX_MallocSmartMap[i] = ((i == start) ? slices : -1); in XX_MallocSmartMapSet()
175 XX_MallocSmartMapClear(unsigned int start, unsigned int slices) in XX_MallocSmartMapClear() argument
181 for (i = start; i < start + slices; i++) in XX_MallocSmartMapClear()
243 unsigned int start, slices; in XX_FreeSmart() local
246 start = MALLOCSMART_SIZE_TO_SLICE((vm_offset_t)(p) - in XX_FreeSmart()
252 KASSERT(XX_MallocSmartMap[start] > 0, in XX_FreeSmart()
253 ("XX_FreeSmart: Double or mid-block free!\n")); in XX_FreeSmart()
256 slices = XX_MallocSmartMap[start]; in XX_FreeSmart()
257 XX_MallocSmartMapClear(start, slices); in XX_FreeSmart()
285 XX_IsPortalIntr(uintptr_t irq) in XX_IsPortalIntr() argument
291 if (irq == XX_PInfo.portal_intr[type][cpu]) in XX_IsPortalIntr()
304 if (info->handler == NULL) { in XX_Dispatch()
305 printf("%s(): IRQ handler is NULL!\n", __func__); in XX_Dispatch()
309 info->handler(info->arg); in XX_Dispatch()
313 XX_PreallocAndBindIntr(device_t dev, uintptr_t irq, unsigned int cpu) in XX_PreallocAndBindIntr() argument
319 r = (struct resource *)irq; in XX_PreallocAndBindIntr()
322 error = XX_SetIntr(irq, XX_Dispatch, &XX_IntrInfo[inum]); in XX_PreallocAndBindIntr()
337 XX_DeallocIntr(uintptr_t irq) in XX_DeallocIntr() argument
342 r = (struct resource *)irq; in XX_DeallocIntr()
349 return (XX_FreeIntr(irq)); in XX_DeallocIntr()
353 XX_SetIntr(uintptr_t irq, t_Isr *f_Isr, t_Handle handle) in XX_SetIntr() argument
360 r = (struct resource *)irq; in XX_SetIntr()
362 irq = rman_get_start(r); in XX_SetIntr()
365 if (XX_IntrInfo[irq].flags & XX_INTR_FLAG_PREALLOCATED) { in XX_SetIntr()
366 if (XX_IntrInfo[irq].handler != NULL) in XX_SetIntr()
369 XX_IntrInfo[irq].handler = f_Isr; in XX_SetIntr()
370 XX_IntrInfo[irq].arg = handle; in XX_SetIntr()
378 if (XX_IsPortalIntr(irq)) in XX_SetIntr()
382 &XX_IntrInfo[irq].cookie); in XX_SetIntr()
388 XX_FreeIntr(uintptr_t irq) in XX_FreeIntr() argument
393 r = (struct resource *)irq; in XX_FreeIntr()
395 irq = rman_get_start(r); in XX_FreeIntr()
398 if (XX_IntrInfo[irq].flags & XX_INTR_FLAG_PREALLOCATED) { in XX_FreeIntr()
399 if (XX_IntrInfo[irq].handler == NULL) in XX_FreeIntr()
402 XX_IntrInfo[irq].handler = NULL; in XX_FreeIntr()
403 XX_IntrInfo[irq].arg = NULL; in XX_FreeIntr()
408 return (bus_teardown_intr(dev, r, XX_IntrInfo[irq].cookie)); in XX_FreeIntr()
412 XX_EnableIntr(uintptr_t irq) in XX_EnableIntr() argument
416 r = (struct resource *)irq; in XX_EnableIntr()
417 irq = rman_get_start(r); in XX_EnableIntr()
419 powerpc_intr_unmask(irq); in XX_EnableIntr()
425 XX_DisableIntr(uintptr_t irq) in XX_DisableIntr() argument
429 r = (struct resource *)irq; in XX_DisableIntr()
430 irq = rman_get_start(r); in XX_DisableIntr()
432 powerpc_intr_mask(irq); in XX_DisableIntr()
626 return (-1); in XX_VirtToPhys()
631 return (((vm_offset_t)addr - ccsrbar_va) + ccsrbar_pa); in XX_VirtToPhys()
638 (vm_offset_t)addr - XX_PInfo.portal_ce_va[BM_PORTAL]); in XX_VirtToPhys()
644 (vm_offset_t)addr - XX_PInfo.portal_ci_va[BM_PORTAL]); in XX_VirtToPhys()
651 (vm_offset_t)addr - XX_PInfo.portal_ce_va[QM_PORTAL]); in XX_VirtToPhys()
657 (vm_offset_t)addr - XX_PInfo.portal_ci_va[QM_PORTAL]); in XX_VirtToPhys()
683 return ((void *)((vm_offset_t)(addr - ccsrbar_pa) + in XX_PhysToVirt()
693 (vm_offset_t)(addr - XX_PInfo.portal_ci_pa[BM_PORTAL][cpu]))); in XX_PhysToVirt()
699 (vm_offset_t)(addr - XX_PInfo.portal_ci_pa[BM_PORTAL][cpu]))); in XX_PhysToVirt()
706 (vm_offset_t)(addr - XX_PInfo.portal_ce_pa[QM_PORTAL][cpu]))); in XX_PhysToVirt()
712 (vm_offset_t)(addr - XX_PInfo.portal_ci_pa[QM_PORTAL][cpu]))); in XX_PhysToVirt()
715 pv = TAILQ_FIRST(&page->md.pv_list); in XX_PhysToVirt()
718 return ((void *)(pv->pv_va + ((vm_offset_t)addr & PAGE_MASK))); in XX_PhysToVirt()
739 len = strlen("bman-portals"); in XX_PortalSetInfo()
743 if (strncmp(dev_name, "bman-portals", len) && strncmp(dev_name, in XX_PortalSetInfo()
744 "qman-portals", len)) in XX_PortalSetInfo()
747 if (strncmp(dev_name, "bman-portals", len) == 0) in XX_PortalSetInfo()
754 for (i = 0; sc->sc_dp[i].dp_ce_pa != 0; i++) { in XX_PortalSetInfo()
755 XX_PInfo.portal_ce_pa[type][i] = sc->sc_dp[i].dp_ce_pa; in XX_PortalSetInfo()
756 XX_PInfo.portal_ci_pa[type][i] = sc->sc_dp[i].dp_ci_pa; in XX_PortalSetInfo()
757 XX_PInfo.portal_ce_size[type][i] = sc->sc_dp[i].dp_ce_size; in XX_PortalSetInfo()
758 XX_PInfo.portal_ci_size[type][i] = sc->sc_dp[i].dp_ci_size; in XX_PortalSetInfo()
759 XX_PInfo.portal_intr[type][i] = sc->sc_dp[i].dp_intr_num; in XX_PortalSetInfo()
762 XX_PInfo.portal_ce_va[type] = rman_get_bushandle(sc->sc_rres[0]); in XX_PortalSetInfo()
763 XX_PInfo.portal_ci_va[type] = rman_get_bushandle(sc->sc_rres[1]); in XX_PortalSetInfo()