Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 Pass PMAP_WRITE_COMBINE as appropriate in...
details: https://anonhg.NetBSD.org/src/rev/407280b04d88
branches: trunk
changeset: 358919:407280b04d88
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Jan 22 13:29:28 2018 +0000
description:
Pass PMAP_WRITE_COMBINE as appropriate in armv7_generic_bs_map, i.e.
same fix as bcm283x_bs_map just got.
diffstat:
sys/arch/arm/arm32/armv7_generic_space.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 4bb22588a1aa -r 407280b04d88 sys/arch/arm/arm32/armv7_generic_space.c
--- a/sys/arch/arm/arm32/armv7_generic_space.c Mon Jan 22 13:28:00 2018 +0000
+++ b/sys/arch/arm/arm32/armv7_generic_space.c Mon Jan 22 13:29:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: armv7_generic_space.c,v 1.5 2018/01/22 13:28:00 skrll Exp $ */
+/* $NetBSD: armv7_generic_space.c,v 1.6 2018/01/22 13:29:28 skrll Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: armv7_generic_space.c,v 1.5 2018/01/22 13:28:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armv7_generic_space.c,v 1.6 2018/01/22 13:29:28 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -290,6 +290,7 @@
{
u_long startpa, endpa, pa;
const struct pmap_devmap *pd;
+ int pmapflags;
vaddr_t va;
if ((pd = pmap_devmap_find_pa(bpa, size)) != NULL) {
@@ -310,10 +311,13 @@
*bshp = (bus_space_handle_t)(va + (bpa - startpa));
- const int pmapflags =
- (flag & (BUS_SPACE_MAP_CACHEABLE|BUS_SPACE_MAP_PREFETCHABLE))
- ? 0
- : PMAP_NOCACHE;
+ if (flag & BUS_SPACE_MAP_PREFETCHABLE)
+ pmapflags = PMAP_WRITE_COMBINE;
+ else if (flag & BUS_SPACE_MAP_CACHEABLE)
+ pmapflags = 0;
+ else
+ pmapflags = 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