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 Assert sleepable in Linux kmap/k...
details: https://anonhg.NetBSD.org/src/rev/c571fd40cd03
branches: trunk
changeset: 802007:c571fd40cd03
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Aug 27 16:09:16 2014 +0000
description:
Assert sleepable in Linux kmap/kunmap.
diffstat:
sys/external/bsd/drm2/linux/linux_kmap.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r f80354c2af69 -r c571fd40cd03 sys/external/bsd/drm2/linux/linux_kmap.c
--- a/sys/external/bsd/drm2/linux/linux_kmap.c Wed Aug 27 16:06:38 2014 +0000
+++ b/sys/external/bsd/drm2/linux/linux_kmap.c Wed Aug 27 16:09:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_kmap.c,v 1.6 2014/08/27 16:06:38 riastradh Exp $ */
+/* $NetBSD: linux_kmap.c,v 1.7 2014/08/27 16:09:16 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.6 2014/08/27 16:06:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_kmap.c,v 1.7 2014/08/27 16:09:16 riastradh Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@@ -178,6 +178,9 @@
kmap(struct page *page)
{
const paddr_t paddr = VM_PAGE_TO_PHYS(&page->p_vmp);
+
+ ASSERT_SLEEPABLE();
+
const vaddr_t vaddr = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
(UVM_KMF_VAONLY | UVM_KMF_WAITVA));
KASSERT(vaddr != 0);
@@ -207,6 +210,8 @@
{
const paddr_t paddr = VM_PAGE_TO_PHYS(&page->p_vmp);
+ ASSERT_SLEEPABLE();
+
mutex_enter(&linux_kmap_lock);
struct linux_kmap_entry *const lke =
rb_tree_find_node(&linux_kmap_entries, &paddr);
Home |
Main Index |
Thread Index |
Old Index