MCPcopy Create free account
hub / github.com/F-Stack/f-stack / intr_bind_irq

Function intr_bind_irq

freebsd/kern/subr_intr.c:1183–1201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1181
1182#ifdef SMP
1183int
1184intr_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.

Callers 3

nexus_bind_intrFunction · 0.85
nexus_bind_intrFunction · 0.85
nexus_bind_intrFunction · 0.85

Calls 5

rman_get_startFunction · 0.85
rman_get_endFunction · 0.85
intr_map_get_isrcFunction · 0.85
intr_isrc_assign_cpuFunction · 0.85
intr_event_bindFunction · 0.70

Tested by

no test coverage detected