| 1181 | |
| 1182 | #ifdef SMP |
| 1183 | int |
| 1184 | intr_bind_irq(device_t dev, struct resource *res, int cpu) |
| 1185 | { |
| 1186 | struct intr_irqsrc *isrc; |
| 1187 | u_int res_id; |
| 1188 | |
| 1189 | KASSERT(rman_get_start(res) == rman_get_end(res), |
| 1190 | ("%s: more interrupts in resource", __func__)); |
| 1191 | |
| 1192 | res_id = (u_int)rman_get_start(res); |
| 1193 | isrc = intr_map_get_isrc(res_id); |
| 1194 | if (isrc == NULL || isrc->isrc_handlers == 0) |
| 1195 | return (EINVAL); |
| 1196 | #ifdef INTR_SOLO |
| 1197 | if (isrc->isrc_filter != NULL) |
| 1198 | return (intr_isrc_assign_cpu(isrc, cpu)); |
| 1199 | #endif |
| 1200 | return (intr_event_bind(isrc->isrc_event, cpu)); |
| 1201 | } |
| 1202 | |
| 1203 | /* |
| 1204 | * Return the CPU that the next interrupt source should use. |
no test coverage detected