diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-19 02:18:03 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-19 02:18:03 +0000 |
commit | 4e00bfe9e4fce563a74dcd487149539b6bc02ba9 (patch) | |
tree | a134970c4687287588758bb78c439e9cde819bb9 /sys/dev/pci | |
parent | 16017b33d1fad6b6fd295f39b365b33719b42ae9 (diff) |
Remove unnecessary lockmgr() archaism that was costing too much in terms
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/vga_pci.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 0229bf099ff..0df6667c1da 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.19 2005/11/10 22:57:37 martin Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.20 2005/11/19 02:18:00 pedro Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /*- @@ -546,7 +546,7 @@ agp_free_gatt(struct vga_pci_softc *sc, struct agp_gatt *gatt) int agp_generic_detach(struct vga_pci_softc *sc) { - lockmgr(&sc->sc_lock, LK_DRAIN, NULL, curproc); + lockmgr(&sc->sc_lock, LK_DRAIN, NULL); agp_flush_cache(); return 0; } @@ -664,11 +664,11 @@ agp_generic_bind_memory(struct vga_pci_softc *sc, struct agp_memory *mem, off_t i, k; int contigpages, nseg, error; - lockmgr(&sc->sc_lock, LK_EXCLUSIVE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_EXCLUSIVE, NULL); if (mem->am_is_bound) { printf("AGP: memory already bound\n"); - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return EINVAL; } @@ -677,7 +677,7 @@ agp_generic_bind_memory(struct vga_pci_softc *sc, struct agp_memory *mem, || offset + mem->am_size > AGP_GET_APERTURE(sc)) { printf("AGP: binding memory at bad offset %#lx\n", (unsigned long) offset); - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return EINVAL; } @@ -729,7 +729,7 @@ agp_generic_bind_memory(struct vga_pci_softc *sc, struct agp_memory *mem, } if (contigpages == 0) { - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return ENOMEM; } @@ -767,7 +767,7 @@ agp_generic_bind_memory(struct vga_pci_softc *sc, struct agp_memory *mem, bus_dmamem_free(sc->sc_dmat, mem->am_dmaseg, mem->am_nseg); free(mem->am_dmaseg, M_DEVBUF); - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return error; } } @@ -788,7 +788,7 @@ agp_generic_bind_memory(struct vga_pci_softc *sc, struct agp_memory *mem, mem->am_offset = offset; mem->am_is_bound = 1; - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return 0; } @@ -798,11 +798,11 @@ agp_generic_unbind_memory(struct vga_pci_softc *sc, struct agp_memory *mem) { int i; - lockmgr(&sc->sc_lock, LK_EXCLUSIVE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_EXCLUSIVE, NULL); if (!mem->am_is_bound) { printf("AGP: memory is not bound\n"); - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return EINVAL; } @@ -826,7 +826,7 @@ agp_generic_unbind_memory(struct vga_pci_softc *sc, struct agp_memory *mem) mem->am_offset = 0; mem->am_is_bound = 0; - lockmgr(&sc->sc_lock, LK_RELEASE, NULL, curproc); + lockmgr(&sc->sc_lock, LK_RELEASE, NULL); return 0; } |