Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom Handle BUS_SPACE_MAP_PREFETCHABLE like...
details: https://anonhg.NetBSD.org/src/rev/d3b30d59ba40
branches: trunk
changeset: 783813:d3b30d59ba40
user: matt <matt%NetBSD.org@localhost>
date: Wed Jan 09 17:45:13 2013 +0000
description:
Handle BUS_SPACE_MAP_PREFETCHABLE like BUS_SPACE_MAP_CACHEABLE.
diffstat:
sys/arch/arm/broadcom/bcmgen_space.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 3cf06e52445e -r d3b30d59ba40 sys/arch/arm/broadcom/bcmgen_space.c
--- a/sys/arch/arm/broadcom/bcmgen_space.c Wed Jan 09 16:28:41 2013 +0000
+++ b/sys/arch/arm/broadcom/bcmgen_space.c Wed Jan 09 17:45:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmgen_space.c,v 1.1 2012/09/01 00:04:44 matt Exp $ */
+/* $NetBSD: bcmgen_space.c,v 1.2 2013/01/09 17:45:13 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcmgen_space.c,v 1.1 2012/09/01 00:04:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcmgen_space.c,v 1.2 2013/01/09 17:45:13 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -181,13 +181,16 @@
/* XXX use extent manager to check duplicate mapping */
va = uvm_km_alloc(kernel_map, endpa - startpa, 0,
- UVM_KMF_VAONLY | UVM_KMF_NOWAIT);
+ UVM_KMF_VAONLY | UVM_KMF_NOWAIT | UVM_KMF_COLORMATCH);
if (!va)
return ENOMEM;
*bshp = (bus_space_handle_t)(va + (bpa - startpa));
- const int pmapflags = (flag & BUS_SPACE_MAP_CACHEABLE) ? 0 : PMAP_NOCACHE;
+ const int pmapflags =
+ (flag & (BUS_SPACE_MAP_CACHEABLE|BUS_SPACE_MAP_PREFETCHABLE))
+ ? 0
+ : PMAP_NOCACHE;
for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, pmapflags);
}
Home |
Main Index |
Thread Index |
Old Index