/*! * ======== InterruptBenelli_intUnregister ======== */ Void InterruptBenelli_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { UInt mbxIdx; Int index; InterruptBenelli_FxnTable *table; Hwi_Handle hwiHandle; mbxIdx = MBX_BASEADDR_IDX(MBX_TABLE_IDX(remoteProcId, MultiProc_self())); index = PROCID(remoteProcId); /* Disable the mailbox interrupt source */ InterruptBenelli_intDisable(remoteProcId, intInfo); /* Disable the interrupt itself */ InterruptBenelli_module->numPlugged[mbxIdx]--; if (InterruptBenelli_module->numPlugged[mbxIdx] == 0) { hwiHandle = Hwi_getHandle(intInfo->localIntId); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptBenelli_module->fxnTable[index]); table->func = NULL; table->arg = 0; }
/*! * ======== InterruptDsp_intUnregister ======== */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptDsp_FxnTable *table; if (remoteProcId == InterruptDsp_hostProcId) { index = 0; } else if (remoteProcId == InterruptDsp_core0ProcId) { index = 1; } else { /* DSP cannot talk to CORE1 */ Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); } /* Disable the mailbox interrupt source */ InterruptDsp_intDisable(remoteProcId, intInfo); InterruptDsp_module->numPlugged--; if (InterruptDsp_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } table = &(InterruptDsp_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptDsp_intUnregister ======== */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptDsp_FxnTable *table; if (remoteProcId == InterruptDsp_hostProcId) { index = 0; } else if (remoteProcId == InterruptDsp_videoProcId) { index = 1; } else if (remoteProcId == InterruptDsp_vpssProcId) { index = 2; } else { Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); return; /* keep Coverity happy */ } /* Disable the mailbox interrupt source */ InterruptDsp_intDisable(remoteProcId, intInfo); InterruptDsp_module->numPlugged--; if (InterruptDsp_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } table = &(InterruptDsp_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptDsp_intUnregister ======== */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; UInt eventId; InterruptDsp_FxnTable *table; Assert_isTrue(((remoteProcId < MultiProc_getNumProcsInCluster()) && (remoteProcId == MultiProc_self())), ti_sdo_ipc_Ipc_A_internal); index = PROCID(remoteProcId); /* Disable the mailbox interrupt source */ InterruptDsp_intDisable(remoteProcId, intInfo); /* Make sure the interrupt only gets plugged once */ eventId = InterruptDsp_dspInterruptTable[index]; InterruptDsp_module->numPlugged--; EventCombiner_disableEvent(eventId); if (InterruptDsp_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } table = &(InterruptDsp_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptArp32_intUnregister ======== */ Void InterruptArp32_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { UInt16 index; UInt mbxIdx; Hwi_Handle hwiHandle; InterruptArp32_FxnTable *table; index = PROCID(remoteProcId); if ((remoteProcId == DSP0_ID) || (remoteProcId == BENELLI_CORE0_ID)) { mbxIdx = 0; } else if ((remoteProcId == DSP1_ID) || (remoteProcId == BENELLI_CORE1_ID)) { mbxIdx = 1; } else if (remoteProcId < InterruptArp32_NUM_EVES) { mbxIdx = 2; } /* Disable the mailbox interrupt source */ InterruptArp32_intDisable(remoteProcId, intInfo); InterruptArp32_module->numPlugged[mbxIdx]--; if (InterruptArp32_module->numPlugged[mbxIdx] == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(InterruptArp32_eveInterruptTable[index]); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptArp32_module->fxnTable[index]); table->func = NULL; table->arg = 0; }
/* * ======== InterruptHost_intUnregister ======== */ Void InterruptHost_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptHost_FxnTable *table; if (remoteProcId == InterruptHost_dspProcId) { index = 0; } else if (remoteProcId == InterruptHost_videoProcId) { index = 1; } else if (remoteProcId == InterruptHost_vpssProcId) { index = 2; } else if (remoteProcId == InterruptHost_eveProcId) { index = 3; } else { Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); return; /* should never get here, but keep Coverity happy */ } /* Disable the mailbox interrupt source */ InterruptHost_intDisable(remoteProcId, intInfo); if (remoteProcId == InterruptHost_eveProcId) { /* Delete the Hwi for eve internal mailbox */ hwiHandle = Hwi_getHandle(EVE_MAILBOX_HOSTINT); Hwi_delete(&hwiHandle); } else { /* decrement numPlugged */ InterruptHost_module->numPlugged--; if (InterruptHost_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(MAILBOX_HOSTINT); Hwi_delete(&hwiHandle); } } table = &(InterruptHost_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptArm_intUnregister ======== * Register ISR for remote processor interrupt */ Void InterruptArm_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; /* Delete the Hwi and disable the corresponding interrupt */ hwiHandle = Hwi_getHandle(intInfo->localIntId); Hwi_delete(&hwiHandle); }
/*! * ======== InterruptDsp_intUnregister ======== * Register ISR for remote processor interrupt */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; /* Delete the Hwi (and disable the corresponding interrupt) */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); }
/*! * ======== InterruptHost_intUnregister ======== */ Void InterruptHost_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; /* Delete the Hwi (and disable the corresponding interrupt) */ hwiHandle = Hwi_getHandle(HOSTINT); Hwi_delete(&hwiHandle); }
/* * ======== Hwi_setPriority ======== * Set an interrupt's relative priority. * * @param(intNum) ID of interrupt * @param(priority) priority */ Void Hwi_setPriority(UInt intNum, UInt priority) { #ifdef __big_endian__ Hwi_vim.CHANMAP[intNum] = priority; #else Hwi_vim.CHANMAP[(intNum ^ 0x3)] = priority; #endif Hwi_getHandle(intNum)->priority = priority; }
/*! * ======== InterruptDucati_intUnregister ======== */ Void InterruptDucati_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Int index; InterruptDucati_FxnTable *table; Hwi_Handle hwiHandle; if (remoteProcId == InterruptDucati_dspProcId) { index = 0; } else if (remoteProcId == InterruptDucati_hostProcId) { index = 1; } else { /* Going to the other M3 */ index = 2; } /* Disable the mailbox interrupt source */ InterruptDucati_intDisable(remoteProcId, intInfo); /* Disable the interrupt itself */ if (remoteProcId == InterruptDucati_videoProcId || remoteProcId == InterruptDucati_vpssProcId) { hwiHandle = Hwi_getHandle(M3INT); Hwi_delete(&hwiHandle); } else { InterruptDucati_module->numPlugged--; if (InterruptDucati_module->numPlugged == 0) { hwiHandle = Hwi_getHandle(intInfo->localIntId); Hwi_delete(&hwiHandle); } } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptDucati_module->fxnTable[index]); table->func = NULL; table->arg = 0; }
/*! * ======== InterruptArp32_intUnregister ======== */ Void InterruptArp32_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; InterruptArp32_FxnTable *table; /* Disable the mailbox interrupt source */ InterruptArp32_intDisable(remoteProcId, intInfo); InterruptArp32_module->numPlugged--; if (InterruptArp32_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptArp32_module->fxnTable); table->func = NULL; table->arg = 0; }
/* * ======== HWI_dispatchPlug ======== * Plug the HWI dispatcher table. */ Void HWI_dispatchPlug(Int vecid, Fxn fxn, HWI_Attrs *attrs) { Hwi_Params hwiParams; Hwi_Handle hwi; Error_Block eb; if (attrs == NULL) { attrs = &HWI_ATTRS; } Hwi_Params_init(&hwiParams); Error_init(&eb); if (attrs->ierMask == 1) { hwiParams.maskSetting = Hwi_MaskingOption_SELF; } else { hwiParams.maskSetting = Hwi_MaskingOption_BITMASK; } hwiParams.disableMask = hwiParams.restoreMask = attrs->ierMask; hwiParams.arg = attrs->arg; hwiParams.enableInt = FALSE; /* * Tell the BIOS6 dispatcher not to ACK interrupts because the BIOS5 * dispatcher doesn't ACK interrupts */ hwiParams.enableAck = FALSE; hwi = Hwi_getHandle(vecid); if (hwi == NULL) { Hwi_create(vecid, (Hwi_FuncPtr)fxn, &hwiParams, &eb); } else { Hwi_reconfig(hwi, (Hwi_FuncPtr)fxn, &hwiParams); } }
Void Interrupt_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Interrupt_FxnTable *table; UInt pos; Assert_isTrue(intInfo != NULL, NULL); Interrupt_module->numPlugged--; if (Interrupt_module->numPlugged == 0) { /* No need to disable interrupt: Hwi_delete takes care of this */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } /* Unset the function table */ pos = MAP_RPROCID_TO_SRCC(remoteProcId, intInfo->localIntId); table = &(Interrupt_module->fxnTable[pos]); table->func = NULL; table->arg = 0; }
/* * ======== InterruptEve_intUnregister ======== */ Void InterruptEve_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptEve_FxnTable *table; if (remoteProcId == InterruptEve_hostProcId) { index = 0; } else if ((remoteProcId == InterruptEve_videoProcId) || (remoteProcId == InterruptEve_vpssProcId)) { index = 1; } else if (remoteProcId == InterruptEve_dspProcId) { index = 2; } else { Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); } /* Disable the mailbox interrupt source */ InterruptEve_intDisable(remoteProcId, intInfo); InterruptEve_module->numPlugged--; if (InterruptEve_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptEve_module->fxnTable[index]); table->func = NULL; table->arg = 0; }