Module Name: src
Committed By: matt
Date: Tue May 11 20:55:22 UTC 2010
Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: cache_mipsNN.c
Log Message:
If icache_sync_index_range is > way size, limit to way size.
To generate a diff of this commit:
cvs rdiff -u -r1.11.78.3 -r1.11.78.4 src/sys/arch/mips/mips/cache_mipsNN.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/cache_mipsNN.c
diff -u src/sys/arch/mips/mips/cache_mipsNN.c:1.11.78.3 src/sys/arch/mips/mips/cache_mipsNN.c:1.11.78.4
--- src/sys/arch/mips/mips/cache_mipsNN.c:1.11.78.3 Wed Jan 20 06:58:36 2010
+++ src/sys/arch/mips/mips/cache_mipsNN.c Tue May 11 20:55:22 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cache_mipsNN.c,v 1.11.78.3 2010/01/20 06:58:36 matt Exp $ */
+/* $NetBSD: cache_mipsNN.c,v 1.11.78.4 2010/05/11 20:55:22 matt Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.11.78.3 2010/01/20 06:58:36 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.11.78.4 2010/05/11 20:55:22 matt Exp $");
#include <sys/param.h>
@@ -266,10 +266,15 @@
* bits that determine the cache index, and make a KSEG0
* address out of them.
*/
- va = MIPS_PHYS_TO_KSEG0(va & mci->mci_picache_way_mask);
+ if (size >= mci->mci_picache_way_size) {
+ va = MIPS_KSEG0_START;
+ eva = va + mci->mci_picache_way_size;
+ } else {
+ va = MIPS_PHYS_TO_KSEG0(va & mci->mci_picache_way_mask);
- eva = round_line32(va + size);
- va = trunc_line32(va);
+ eva = round_line32(va + size);
+ va = trunc_line32(va);
+ }
/*
* GCC generates better code in the loops if we reference local