Lines Matching refs:qinv

80 typedef struct qinv {  struct
179 qinv_t *qinv; in qinv_submit_inv_dsc() local
186 qinv = (qinv_t *)immu->immu_qinv; in qinv_submit_inv_dsc()
187 qinv_table = &(qinv->qinv_table); in qinv_submit_inv_dsc()
377 qinv_t *qinv; in qinv_setup() local
416 qinv = kmem_zalloc(sizeof (qinv_t), KM_SLEEP); in qinv_setup()
420 &(qinv->qinv_table.qinv_mem_dma_hdl)) != DDI_SUCCESS) { in qinv_setup()
428 &(qinv->qinv_sync.qinv_mem_dma_hdl)) != DDI_SUCCESS) { in qinv_setup()
434 qinv->qinv_table.qinv_mem_size = (1 << (qinv_iqa_qs + 8)); in qinv_setup()
435 size = qinv->qinv_table.qinv_mem_size * QINV_ENTRY_SIZE; in qinv_setup()
438 if (ddi_dma_mem_alloc(qinv->qinv_table.qinv_mem_dma_hdl, in qinv_setup()
444 &(qinv->qinv_table.qinv_mem_vaddr), in qinv_setup()
446 &(qinv->qinv_table.qinv_mem_acc_hdl)) != DDI_SUCCESS) { in qinv_setup()
452 ASSERT(!((uintptr_t)qinv->qinv_table.qinv_mem_vaddr & MMU_PAGEOFFSET)); in qinv_setup()
453 bzero(qinv->qinv_table.qinv_mem_vaddr, size); in qinv_setup()
456 qinv->qinv_table.qinv_mem_paddr = pfn_to_pa( in qinv_setup()
457 hat_getpfnum(kas.a_hat, qinv->qinv_table.qinv_mem_vaddr)); in qinv_setup()
459 qinv->qinv_table.qinv_mem_head = qinv->qinv_table.qinv_mem_tail = 0; in qinv_setup()
461 qinv->qinv_sync.qinv_mem_size = qinv->qinv_table.qinv_mem_size; in qinv_setup()
462 size = qinv->qinv_sync.qinv_mem_size * QINV_SYNC_DATA_SIZE; in qinv_setup()
465 if (ddi_dma_mem_alloc(qinv->qinv_sync.qinv_mem_dma_hdl, in qinv_setup()
471 &(qinv->qinv_sync.qinv_mem_vaddr), in qinv_setup()
473 &(qinv->qinv_sync.qinv_mem_acc_hdl)) != DDI_SUCCESS) { in qinv_setup()
479 ASSERT(!((uintptr_t)qinv->qinv_sync.qinv_mem_vaddr & MMU_PAGEOFFSET)); in qinv_setup()
480 bzero(qinv->qinv_sync.qinv_mem_vaddr, size); in qinv_setup()
481 qinv->qinv_sync.qinv_mem_paddr = pfn_to_pa( in qinv_setup()
482 hat_getpfnum(kas.a_hat, qinv->qinv_sync.qinv_mem_vaddr)); in qinv_setup()
484 qinv->qinv_sync.qinv_mem_head = qinv->qinv_sync.qinv_mem_tail = 0; in qinv_setup()
486 mutex_init(&(qinv->qinv_table.qinv_mem_lock), NULL, MUTEX_DRIVER, NULL); in qinv_setup()
487 mutex_init(&(qinv->qinv_sync.qinv_mem_lock), NULL, MUTEX_DRIVER, NULL); in qinv_setup()
489 immu->immu_qinv = qinv; in qinv_setup()
496 ddi_dma_mem_free(&(qinv->qinv_table.qinv_mem_acc_hdl)); in qinv_setup()
499 ddi_dma_free_handle(&(qinv->qinv_sync.qinv_mem_dma_hdl)); in qinv_setup()
502 ddi_dma_free_handle(&(qinv->qinv_table.qinv_mem_dma_hdl)); in qinv_setup()
505 kmem_free(qinv, sizeof (qinv_t)); in qinv_setup()
550 qinv_t *qinv; in immu_qinv_startup() local
557 qinv = (qinv_t *)immu->immu_qinv; in immu_qinv_startup()
558 qinv_reg_value = qinv->qinv_table.qinv_mem_paddr | qinv_iqa_qs; in immu_qinv_startup()
715 qinv_t *qinv; in immu_qinv_report_fault() local
720 qinv = (qinv_t *)(immu->immu_qinv); in immu_qinv_report_fault()
725 dsc = (qinv_dsc_t *)(qinv->qinv_table.qinv_mem_vaddr in immu_qinv_report_fault()