Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips When mapping a dmamem page, make sure to ...



details:   https://anonhg.NetBSD.org/src/rev/3e09dfa00582
branches:  trunk
changeset: 816767:3e09dfa00582
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jul 22 19:50:44 2016 +0000

description:
When mapping a dmamem page, make sure to trunc_pae the starting address

diffstat:

 sys/arch/mips/mips/bus_dma.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2c300552468a -r 3e09dfa00582 sys/arch/mips/mips/bus_dma.c
--- a/sys/arch/mips/mips/bus_dma.c      Fri Jul 22 14:08:33 2016 +0000
+++ b/sys/arch/mips/mips/bus_dma.c      Fri Jul 22 19:50:44 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.35 2016/07/16 21:33:46 matt Exp $        */
+/*     $NetBSD: bus_dma.c,v 1.36 2016/07/22 19:50:44 matt Exp $        */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.35 2016/07/16 21:33:46 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.36 2016/07/22 19:50:44 matt Exp $");
 
 #define _MIPS_BUS_DMA_PRIVATE
 
@@ -1115,7 +1115,7 @@
        *kvap = (void *)va;
 
        for (curseg = 0; curseg < nsegs; curseg++) {
-               for (addr = segs[curseg].ds_addr;
+               for (addr = trunc_page(segs[curseg].ds_addr);
                    addr < (segs[curseg].ds_addr + segs[curseg].ds_len);
                    addr += PAGE_SIZE, va += PAGE_SIZE, size -= PAGE_SIZE) {
                        if (size == 0)



Home | Main Index | Thread Index | Old Index