Correct the usage of the 4th arg to mainbus_bs_map. It's a flags arg, so
test for the CACHEABLE bit, rather than assuming a non-zero means cacheable
This commit is contained in:
parent
7ef29ca465
commit
8261a721cc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mainbus_io.c,v 1.14 2003/12/06 22:05:33 bjh21 Exp $ */
|
||||
/* $NetBSD: mainbus_io.c,v 1.15 2004/01/01 18:07:27 chris Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mainbus_io.c,v 1.14 2003/12/06 22:05:33 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mainbus_io.c,v 1.15 2004/01/01 18:07:27 chris Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -134,11 +134,11 @@ struct bus_space mainbus_bs_tag = {
|
|||
/* bus space functions */
|
||||
|
||||
int
|
||||
mainbus_bs_map(t, bpa, size, cacheable, bshp)
|
||||
mainbus_bs_map(t, bpa, size, flags, bshp)
|
||||
void *t;
|
||||
bus_addr_t bpa;
|
||||
bus_size_t size;
|
||||
int cacheable;
|
||||
int flags;
|
||||
bus_space_handle_t *bshp;
|
||||
{
|
||||
u_long startpa, endpa, pa;
|
||||
|
@ -164,8 +164,8 @@ mainbus_bs_map(t, bpa, size, cacheable, bshp)
|
|||
|
||||
for(pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
|
||||
pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE);
|
||||
pte = vtopte(va);
|
||||
if (cacheable == 0) {
|
||||
if ((flags & BUS_SPACE_MAP_CACHEABLE) == 0) {
|
||||
pte = vtopte(va);
|
||||
*pte &= ~L2_S_CACHE_MASK;
|
||||
PTE_SYNC(pte);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue