Leave `has_iocache' unset if cache not enabled.

This commit is contained in:
pk 1997-03-10 23:13:59 +00:00
parent 78b14cccb3
commit 4f30101165
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: iommu.c,v 1.8 1996/12/10 23:17:44 pk Exp $ */ /* $NetBSD: iommu.c,v 1.9 1997/03/10 23:13:59 pk Exp $ */
/* /*
* Copyright (c) 1996 * Copyright (c) 1996
@ -45,6 +45,7 @@
#include <machine/ctlreg.h> #include <machine/ctlreg.h>
#include <sparc/sparc/asm.h> #include <sparc/sparc/asm.h>
#include <sparc/sparc/vaddrs.h> #include <sparc/sparc/vaddrs.h>
#include <sparc/sparc/cpuvar.h>
#include <sparc/sparc/iommureg.h> #include <sparc/sparc/iommureg.h>
struct iommu_softc { struct iommu_softc {
@ -155,6 +156,8 @@ iommu_attach(parent, self, aux)
#endif #endif
sc->sc_hasiocache = node_has_property(node, "cache-coherence?"); sc->sc_hasiocache = node_has_property(node, "cache-coherence?");
if (CACHEINFO.c_enabled == 0) /* XXX - is this correct? */
sc->sc_hasiocache = 0;
has_iocache = sc->sc_hasiocache; /* Set global flag */ has_iocache = sc->sc_hasiocache; /* Set global flag */
sc->sc_pagesize = getpropint(node, "page-size", NBPG), sc->sc_pagesize = getpropint(node, "page-size", NBPG),