* fiq_release: * * Release the FIQ vector. */
| 130 | * Release the FIQ vector. |
| 131 | */ |
| 132 | void |
| 133 | fiq_release(struct fiqhandler *fh) |
| 134 | { |
| 135 | u_int oldirqstate; |
| 136 | struct fiqhandler *ofh; |
| 137 | |
| 138 | oldirqstate = disable_interrupts(PSR_F); |
| 139 | |
| 140 | /* |
| 141 | * If we are the currently active FIQ handler, then we |
| 142 | * need to save our registers and pop the next one back |
| 143 | * into the vector. |
| 144 | */ |
| 145 | if (fh == TAILQ_FIRST(&fiqhandler_stack)) { |
| 146 | if (fh->fh_regs != NULL) |
| 147 | fiq_getregs(fh->fh_regs); |
| 148 | TAILQ_REMOVE(&fiqhandler_stack, fh, fh_list); |
| 149 | if ((ofh = TAILQ_FIRST(&fiqhandler_stack)) != NULL) { |
| 150 | if (ofh->fh_regs != NULL) |
| 151 | fiq_setregs(ofh->fh_regs); |
| 152 | fiq_installhandler(ofh->fh_func, ofh->fh_size); |
| 153 | } |
| 154 | } else |
| 155 | TAILQ_REMOVE(&fiqhandler_stack, fh, fh_list); |
| 156 | |
| 157 | if (TAILQ_FIRST(&fiqhandler_stack) == NULL) { |
| 158 | /* Copy the NULL handler back down into the vector. */ |
| 159 | fiq_installhandler(fiq_nullhandler_code, fiq_nullhandler_size); |
| 160 | |
| 161 | /* Make sure FIQs are disabled when we return. */ |
| 162 | oldirqstate |= PSR_F; |
| 163 | } |
| 164 | |
| 165 | restore_interrupts(oldirqstate); |
| 166 | } |
nothing calls this directly
no test coverage detected