| 173 | } |
| 174 | |
| 175 | void |
| 176 | intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, |
| 177 | void *h_arg, intr_ipi_send_t *send, void *s_arg) |
| 178 | { |
| 179 | struct intr_ipi *ii; |
| 180 | |
| 181 | ii = intr_ipi_lookup(ipi); |
| 182 | |
| 183 | KASSERT(hand != NULL, ("%s: ipi %u no handler", __func__, ipi)); |
| 184 | KASSERT(send != NULL, ("%s: ipi %u no sender", __func__, ipi)); |
| 185 | KASSERT(ii->ii_count == NULL, ("%s: ipi %u reused", __func__, ipi)); |
| 186 | |
| 187 | ii->ii_handler = hand; |
| 188 | ii->ii_handler_arg = h_arg; |
| 189 | ii->ii_send = send; |
| 190 | ii->ii_send_arg = s_arg; |
| 191 | strlcpy(ii->ii_name, name, INTR_IPI_NAMELEN); |
| 192 | ii->ii_count = intr_ipi_setup_counters(name); |
| 193 | } |
| 194 | |
| 195 | /* |
| 196 | * Send IPI thru interrupt controller. |
no test coverage detected