Module Name: src
Committed By: matt
Date: Sun Aug 9 04:05:03 UTC 2009
Modified Files:
src/sys/arch/mips/mips: cache.c
Log Message:
If Loongson2 way size is <= page size, don't enable mips_virtual_alias
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/mips/mips/cache.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.c
diff -u src/sys/arch/mips/mips/cache.c:1.39 src/sys/arch/mips/mips/cache.c:1.40
--- src/sys/arch/mips/mips/cache.c:1.39 Fri Aug 7 18:39:10 2009
+++ src/sys/arch/mips/mips/cache.c Sun Aug 9 04:05:03 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cache.c,v 1.39 2009/08/07 18:39:10 matt Exp $ */
+/* $NetBSD: cache.c,v 1.40 2009/08/09 04:05:03 matt Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.39 2009/08/07 18:39:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.40 2009/08/09 04:05:03 matt Exp $");
#include "opt_cputype.h"
#include "opt_mips_cache.h"
@@ -661,7 +661,9 @@
mips3_get_cache_config(csizebase);
- mips_cache_virtual_alias = 1;
+ if (mips_picache_size / mips_picache_ways > PAGE_SIZE ||
+ mips_pdcache_size / mips_pdcache_ways > PAGE_SIZE)
+ mips_cache_virtual_alias = 1;
mips_cache_ops.mco_icache_sync_all =
ls2_icache_sync_all;