From fe1d71458cb86b423c0137f44ba7b4414a7c2dbe Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sat, 1 Nov 2003 14:48:16 +0000 Subject: [PATCH] - Flush cache only if mips_sdcache_line_size == 0 in pmap_copy_page() when options MIPS3_L2CACHE_ABSENT is defined. - Fix comments following #endif for MIPS3_L2CACHE_ABSENT. --- sys/arch/mips/mips/pmap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arch/mips/mips/pmap.c b/sys/arch/mips/mips/pmap.c index 1f414ef5e8bd..bc4a29055e1c 100644 --- a/sys/arch/mips/mips/pmap.c +++ b/sys/arch/mips/mips/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.152 2003/10/29 23:39:45 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.153 2003/11/01 14:48:16 tsutsui Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.152 2003/10/29 23:39:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.153 2003/11/01 14:48:16 tsutsui Exp $"); /* * Manages physical address maps. @@ -1595,7 +1595,7 @@ pmap_zero_page(phys) */ if (MIPS_HAS_R4K_MMU && mips_sdcache_line_size == 0) mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(phys), NBPG); -#endif /* MIPS3_PLUS && !MIPS3_L2CACHE_ABSENT */ +#endif /* MIPS3_PLUS && MIPS3_L2CACHE_ABSENT */ } /* @@ -1635,7 +1635,7 @@ pmap_copy_page(src, dst) mips_flushcache_allpvh(src); /* mips_flushcache_allpvh(dst); */ } -#endif /* MIPS3_PLUS && !MIPS3_L2CACHE_ABSENT */ +#endif /* MIPS3_PLUS && MIPS3_L2CACHE_ABSENT */ mips_pagecopy((caddr_t)MIPS_PHYS_TO_KSEG0(dst), (caddr_t)MIPS_PHYS_TO_KSEG0(src)); @@ -1652,11 +1652,11 @@ pmap_copy_page(src, dst) * * XXXJRT -- This is totally disgusting. */ - if (MIPS_HAS_R4K_MMU) { + if (MIPS_HAS_R4K_MMU && mips_sdcache_line_size == 0) { mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(src), NBPG); mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(dst), NBPG); } -#endif /* MIPS3_PLUS && !MIPS3_L2CACHE_ABSENT */ +#endif /* MIPS3_PLUS && MIPS3_L2CACHE_ABSENT */ } /*