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/include/linux drm: Fix io_mapping_map_...



details:   https://anonhg.NetBSD.org/src/rev/3dac12b78856
branches:  trunk
changeset: 1028806:3dac12b78856
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:04:51 2021 +0000

description:
drm: Fix io_mapping_map_wc to map all VAs, not just the first one.

diffstat:

 sys/external/bsd/drm2/include/linux/io-mapping.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d3ed1a213403 -r 3dac12b78856 sys/external/bsd/drm2/include/linux/io-mapping.h
--- a/sys/external/bsd/drm2/include/linux/io-mapping.h  Sun Dec 19 12:04:42 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/io-mapping.h  Sun Dec 19 12:04:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: io-mapping.h,v 1.10 2021/12/19 12:03:30 riastradh Exp $        */
+/*     $NetBSD: io-mapping.h,v 1.11 2021/12/19 12:04:51 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -147,7 +147,7 @@
                    BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_PREFETCHABLE);
                KASSERT(cookie != (paddr_t)-1);
 
-               pmap_kenter_pa(va, pmap_phys_address(cookie),
+               pmap_kenter_pa(va + pg*PAGE_SIZE, pmap_phys_address(cookie),
                    PROT_READ|PROT_WRITE, pmap_mmap_flags(cookie));
        }
        pmap_update(pmap_kernel());
@@ -166,7 +166,7 @@
        KASSERT(!mapping->diom_atomic);
        KASSERT(mapping->diom_va != va);
 
-       pmap_kremove(va, PAGE_SIZE);
+       pmap_kremove(va, mapping->diom_mapsize);
        pmap_update(pmap_kernel());
 
        uvm_km_free(kernel_map, va, mapping->diom_mapsize, UVM_KMF_VAONLY);



Home | Main Index | Thread Index | Old Index