Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/atari Fix I/O access failures for regions all...



details:   https://anonhg.NetBSD.org/src/rev/7c309f222a02
branches:  trunk
changeset: 358868:7c309f222a02
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jan 20 17:37:15 2018 +0000

description:
Fix I/O access failures for regions allocated by bus_space_map(9) on Milan.

Passing to PMAP_WIRED against I/O spaces seems problematic,
probably after yamt-km branch merge, which was committed
between NetBSD 3.0 and NetBSD 4.0.
(i.e. ISA and PCI devices on Milan didn't work after 4.0 release)

XXX:
According to pmap(9) man page, the "flags" arg for pmap_enter(9)
doesn't take VM_PROT_READ and VM_PROT_WRITE, but pmap_enter()
implementation in sys/arch/m68k/m68k/pmap_motolora.c historically
checks them.

diffstat:

 sys/arch/atari/atari/bus.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 356aa7171d73 -r 7c309f222a02 sys/arch/atari/atari/bus.c
--- a/sys/arch/atari/atari/bus.c        Sat Jan 20 16:30:57 2018 +0000
+++ b/sys/arch/atari/atari/bus.c        Sat Jan 20 17:37:15 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.c,v 1.58 2014/10/18 08:33:24 snj Exp $     */
+/*     $NetBSD: bus.c,v 1.59 2018/01/20 17:37:15 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_m68k_arch.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.58 2014/10/18 08:33:24 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.59 2018/01/20 17:37:15 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -251,7 +251,7 @@
                u_int   *ptep, npte;
 
                pmap_enter(pmap_kernel(), (vaddr_t)va, pa,
-                   VM_PROT_READ|VM_PROT_WRITE, PMAP_WIRED);
+                   VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE);
 
                ptep = kvtopte(va);
                npte = *ptep & ~PG_CMASK;
@@ -667,7 +667,7 @@
                                panic("_bus_dmamem_map: size botch");
                        pmap_enter(pmap_kernel(), va, addr - offset,
                            VM_PROT_READ | VM_PROT_WRITE,
-                           VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED);
+                           VM_PROT_READ | VM_PROT_WRITE);
                }
        }
        pmap_update(pmap_kernel());



Home | Main Index | Thread Index | Old Index