Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 allow BUS_SPACE_MAP_PREFETCHABLE wi...



details:   https://anonhg.NetBSD.org/src/rev/63b212df486b
branches:  trunk
changeset: 348727:63b212df486b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Nov 04 18:09:14 2016 +0000

description:
allow BUS_SPACE_MAP_PREFETCHABLE with bus_space_map() as well

diffstat:

 sys/arch/sparc64/sparc64/machdep.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 1517119f3c45 -r 63b212df486b sys/arch/sparc64/sparc64/machdep.c
--- a/sys/arch/sparc64/sparc64/machdep.c        Fri Nov 04 18:06:08 2016 +0000
+++ b/sys/arch/sparc64/sparc64/machdep.c        Fri Nov 04 18:09:14 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.286 2016/11/04 05:41:01 macallan Exp $ */
+/*     $NetBSD: machdep.c,v 1.287 2016/11/04 18:09:14 macallan Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.286 2016/11/04 05:41:01 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.287 2016/11/04 18:09:14 macallan Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -2293,6 +2293,9 @@
        if (!(flags & BUS_SPACE_MAP_CACHEABLE))
                pm_flags |= PMAP_NC;
 
+       if ((flags & BUS_SPACE_MAP_PREFETCHABLE))
+               pm_flags |= PMAP_WC;
+
        if ((err = extent_alloc(io_space, size, PAGE_SIZE,
                0, EX_NOWAIT|EX_BOUNDZERO, (u_long *)&v)))
                        panic("sparc_bus_map: cannot allocate io_space: %d", err);



Home | Main Index | Thread Index | Old Index