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

Function nexus_deactivate_resource

freebsd/mips/mips/nexus.c:455–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455static int
456nexus_deactivate_resource(device_t bus, device_t child, int type, int rid,
457 struct resource *r)
458{
459 bus_space_handle_t vaddr;
460 bus_size_t psize;
461
462 vaddr = rman_get_bushandle(r);
463
464 if (type == SYS_RES_MEMORY && vaddr != 0) {
465 psize = (bus_size_t)rman_get_size(r);
466 bus_space_unmap(rman_get_bustag(r), vaddr, psize);
467 rman_set_virtual(r, NULL);
468 rman_set_bushandle(r, 0);
469 } else if (type == SYS_RES_IRQ) {
470#ifdef INTRNG
471 mips_pic_deactivate_intr(child, r);
472#endif
473 }
474
475 return (rman_deactivate_resource(r));
476}
477
478static int
479nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,

Callers

nothing calls this directly

Calls 8

rman_get_bushandleFunction · 0.85
rman_get_sizeFunction · 0.85
bus_space_unmapFunction · 0.85
rman_get_bustagFunction · 0.85
rman_set_virtualFunction · 0.85
rman_set_bushandleFunction · 0.85
mips_pic_deactivate_intrFunction · 0.85
rman_deactivate_resourceFunction · 0.85

Tested by

no test coverage detected