diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c index 4f786044baeb..83118770fbd9 100644 --- a/sys/arch/sparc/sparc/cpu.c +++ b/sys/arch/sparc/sparc/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.203 2007/05/28 21:24:17 mrg Exp $ */ +/* $NetBSD: cpu.c,v 1.204 2007/07/31 05:21:47 macallan Exp $ */ /* * Copyright (c) 1996 @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.203 2007/05/28 21:24:17 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.204 2007/07/31 05:21:47 macallan Exp $"); #include "opt_multiprocessor.h" #include "opt_lockdebug.h" @@ -1723,9 +1723,11 @@ static int mxcc = -1; else sc->flags |= CPUFLG_CACHEPAGETABLES; } else { - sc->cache_flush = viking_cache_flush; +#ifdef MULTIPROCESSOR + if (sparc_ncpus > 1) + sc->cache_flush = srmmu_cache_flush; +#endif } - /* Check all modules have the same MXCC configuration */ if (mxcc != -1 && sc->mxcc != mxcc) panic("MXCC module mismatch"); diff --git a/sys/arch/sparc/sparc/iommu.c b/sys/arch/sparc/sparc/iommu.c index 3b8cdc096054..02432f612aa7 100644 --- a/sys/arch/sparc/sparc/iommu.c +++ b/sys/arch/sparc/sparc/iommu.c @@ -1,4 +1,4 @@ -/* $NetBSD: iommu.c,v 1.86 2007/03/17 13:51:46 msaitoh Exp $ */ +/* $NetBSD: iommu.c,v 1.87 2007/07/31 05:21:47 macallan Exp $ */ /* * Copyright (c) 1996 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.86 2007/03/17 13:51:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.87 2007/07/31 05:21:47 macallan Exp $"); #include "opt_sparc_arch.h" @@ -579,7 +579,8 @@ iommu_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, &dva, &sgsize)) != 0) return (error); - if (sc->sc_cachecoherent == 0) + if ((sc->sc_cachecoherent == 0) || + (curcpu()->cpu_type == CPUTYP_SS1_MBUS_NOMXCC)) cache_flush(buf, buflen); /* XXX - move to bus_dma_sync? */ /*