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/dist/drm/i915/gt i915: Use pmap_pv_pro...
details: https://anonhg.NetBSD.org/src/rev/2615930a8e42
branches: trunk
changeset: 1028908:2615930a8e42
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:27:17 2021 +0000
description:
i915: Use pmap_pv_protect on the paddrs for unmap_mapping_range.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 7f5b51776dac -r 2615930a8e42 sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c Sun Dec 19 12:27:09 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c Sun Dec 19 12:27:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_reset.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $ */
+/* $NetBSD: intel_reset.c,v 1.5 2021/12/19 12:27:17 riastradh Exp $ */
/*
* SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_reset.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_reset.c,v 1.5 2021/12/19 12:27:17 riastradh Exp $");
#include <linux/sched/mm.h>
#include <linux/stop_machine.h>
@@ -711,9 +711,13 @@
vma_offset = vma->ggtt_view.partial.offset << PAGE_SHIFT;
#ifdef __NetBSD__
+ __USE(vma_offset);
__USE(node);
- __USE(vma_offset);
- panic("NYI");
+ paddr_t pa = gt->i915->ggtt.gmadr.start + vma->node.start;
+ vsize_t npgs = vma->size >> PAGE_SHIFT;
+ while (npgs --> 0)
+ pmap_pv_protect(pa + (npgs << PAGE_SHIFT),
+ VM_PROT_NONE);
#else
unmap_mapping_range(gt->i915->drm.anon_inode->i_mapping,
drm_vma_node_offset_addr(node) + vma_offset,
Home |
Main Index |
Thread Index |
Old Index