Date: Wed, 1 May 2019 15:03:12 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346994 - head/sys/riscv/riscv Message-ID: <201905011503.x41F3Cjv060456@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Wed May 1 15:03:12 2019 New Revision: 346994 URL: https://svnweb.freebsd.org/changeset/base/346994 Log: Deactivate IRQ resource by calling to intr_deactivate_irq(). This is the part of INTRNG support that was missed. Sponsored by: DARPA, AFRL Modified: head/sys/riscv/riscv/nexus.c Modified: head/sys/riscv/riscv/nexus.c ============================================================================== --- head/sys/riscv/riscv/nexus.c Wed May 1 14:20:31 2019 (r346993) +++ head/sys/riscv/riscv/nexus.c Wed May 1 15:03:12 2019 (r346994) @@ -357,13 +357,17 @@ nexus_deactivate_resource(device_t bus, device_t child bus_size_t psize; bus_space_handle_t vaddr; - psize = (bus_size_t)rman_get_size(r); - vaddr = rman_get_bushandle(r); + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + psize = (bus_size_t)rman_get_size(r); + vaddr = rman_get_bushandle(r); - if (vaddr != 0) { - bus_space_unmap(&memmap_bus, vaddr, psize); - rman_set_virtual(r, NULL); - rman_set_bushandle(r, 0); + if (vaddr != 0) { + bus_space_unmap(&memmap_bus, vaddr, psize); + rman_set_virtual(r, NULL); + rman_set_bushandle(r, 0); + } + } else if (type == SYS_RES_IRQ) { + intr_deactivate_irq(child, r); } return (rman_deactivate_resource(r));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905011503.x41F3Cjv060456>