Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/linux Call uvm_vm_page_to_phy...
details: https://anonhg.NetBSD.org/src/rev/73555349cbe5
branches: riastradh-drm2
changeset: 788618:73555349cbe5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Jan 21 20:56:50 2014 +0000
description:
Call uvm_vm_page_to_phys before taking a spin lock to ease debugging.
diffstat:
sys/external/bsd/drm2/linux/linux_kmap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 4ff085b0e7d1 -r 73555349cbe5 sys/external/bsd/drm2/linux/linux_kmap.c
--- a/sys/external/bsd/drm2/linux/linux_kmap.c Tue Jan 21 20:56:40 2014 +0000
+++ b/sys/external/bsd/drm2/linux/linux_kmap.c Tue Jan 21 20:56:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_kmap.c,v 1.1.2.3 2013/09/08 16:16:37 riastradh Exp $ */
+/* $NetBSD: linux_kmap.c,v 1.1.2.4 2014/01/21 20:56:50 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.1.2.3 2013/09/08 16:16:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_kmap.c,v 1.1.2.4 2014/01/21 20:56:50 riastradh Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@@ -144,6 +144,7 @@
void *
kmap_atomic(struct page *page)
{
+ const paddr_t paddr = uvm_vm_page_to_phys(&page->p_vmp);
mutex_spin_enter(&linux_kmap_atomic_lock);
@@ -151,7 +152,6 @@
KASSERT(!pmap_extract(pmap_kernel(), linux_kmap_atomic_vaddr, NULL));
const vaddr_t vaddr = linux_kmap_atomic_vaddr;
- const paddr_t paddr = uvm_vm_page_to_phys(&page->p_vmp);
const int prot = (VM_PROT_READ | VM_PROT_WRITE);
const int flags = 0;
pmap_kenter_pa(vaddr, paddr, prot, flags);
Home |
Main Index |
Thread Index |
Old Index