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

Function nexus_setup_intr

freebsd/mips/mips/nexus.c:478–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478static int
479nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
480 driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
481{
482#ifdef INTRNG
483 return (intr_setup_irq(child, res, filt, intr, arg, flags, cookiep));
484#else
485 int irq;
486 register_t s;
487
488 s = intr_disable();
489 irq = rman_get_start(res);
490 if (irq >= NUM_MIPS_IRQS) {
491 intr_restore(s);
492 return (0);
493 }
494
495 cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg,
496 irq, flags, cookiep);
497 intr_restore(s);
498
499 return (0);
500#endif
501}
502
503static int
504nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)

Callers

nothing calls this directly

Calls 6

intr_setup_irqFunction · 0.85
rman_get_startFunction · 0.85
device_get_nameunitFunction · 0.85
cpu_establish_hardintrFunction · 0.70
intr_disableFunction · 0.50
intr_restoreFunction · 0.50

Tested by

no test coverage detected