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

Function XX_SetIntr

freebsd/contrib/ncsw/user/env/xx.c:352–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352t_Error
353XX_SetIntr(uintptr_t irq, t_Isr *f_Isr, t_Handle handle)
354{
355 device_t dev;
356 struct resource *r;
357 unsigned int flags;
358 int err;
359
360 r = (struct resource *)irq;
361 dev = rman_get_device(r);
362 irq = rman_get_start(r);
363
364 /* Handle preallocated interrupts */
365 if (XX_IntrInfo[irq].flags & XX_INTR_FLAG_PREALLOCATED) {
366 if (XX_IntrInfo[irq].handler != NULL)
367 return (E_BUSY);
368
369 XX_IntrInfo[irq].handler = f_Isr;
370 XX_IntrInfo[irq].arg = handle;
371
372 return (E_OK);
373 }
374
375 flags = INTR_TYPE_NET | INTR_MPSAFE;
376
377 /* BMAN/QMAN Portal interrupts must be exlusive */
378 if (XX_IsPortalIntr(irq))
379 flags |= INTR_EXCL;
380
381 err = bus_setup_intr(dev, r, flags, NULL, f_Isr, handle,
382 &XX_IntrInfo[irq].cookie);
383
384 return (err);
385}
386
387t_Error
388XX_FreeIntr(uintptr_t irq)

Callers 8

XX_PreallocAndBindIntrFunction · 0.85
bman_create_portalFunction · 0.85
BM_InitFunction · 0.85
fm_ncsw.cFile · 0.85
TgecInitFunction · 0.85
DtsecInitFunction · 0.85
QM_InitFunction · 0.85
qman_create_portalFunction · 0.85

Calls 4

rman_get_deviceFunction · 0.85
rman_get_startFunction · 0.85
XX_IsPortalIntrFunction · 0.85
bus_setup_intrFunction · 0.85

Tested by

no test coverage detected