Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/linux Remove needless splvm/splx calls.
details: https://anonhg.NetBSD.org/src/rev/230ecd30c447
branches: trunk
changeset: 794925:230ecd30c447
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Mar 28 23:19:41 2014 +0000
description:
Remove needless splvm/splx calls.
>From rmind@, who explained that the pmap(9) man page is wrong.
diffstat:
sys/external/bsd/drm2/linux/linux_kmap.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diffs (48 lines):
diff -r e684031dc32b -r 230ecd30c447 sys/external/bsd/drm2/linux/linux_kmap.c
--- a/sys/external/bsd/drm2/linux/linux_kmap.c Fri Mar 28 21:57:22 2014 +0000
+++ b/sys/external/bsd/drm2/linux/linux_kmap.c Fri Mar 28 23:19:41 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_kmap.c,v 1.2 2014/03/18 18:20:43 riastradh Exp $ */
+/* $NetBSD: linux_kmap.c,v 1.3 2014/03/28 23:19:41 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_kmap.c,v 1.2 2014/03/18 18:20:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_kmap.c,v 1.3 2014/03/28 23:19:41 riastradh Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@@ -194,16 +194,12 @@
KASSERT(collision == lke);
mutex_spin_exit(&linux_kmap_lock);
- const int s = splvm();
-
KASSERT(!pmap_extract(pmap_kernel(), vaddr, NULL));
const int prot = (VM_PROT_READ | VM_PROT_WRITE);
const int flags = 0;
pmap_kenter_pa(vaddr, paddr, prot, flags);
pmap_update(pmap_kernel());
- splx(s);
-
return (void *)vaddr;
}
@@ -222,12 +218,8 @@
const vaddr_t vaddr = lke->lke_vaddr;
kmem_free(lke, sizeof(*lke));
- const int s = splvm();
-
KASSERT(pmap_extract(pmap_kernel(), vaddr, NULL));
pmap_kremove(vaddr, PAGE_SIZE);
pmap_update(pmap_kernel());
-
- splx(s);
}
Home |
Main Index |
Thread Index |
Old Index