svn commit: r198530 - projects/mips/sys/mips/mips

Oleksandr Tymoshenko gonzo at FreeBSD.org
Tue Oct 27 23:45:48 UTC 2009


Author: gonzo
Date: Tue Oct 27 23:45:48 2009
New Revision: 198530
URL: http://svn.freebsd.org/changeset/base/198530

Log:
  - Replace stubs with actual cache info
  - minor style(9) fix

Modified:
  projects/mips/sys/mips/mips/cache.c

Modified: projects/mips/sys/mips/mips/cache.c
==============================================================================
--- projects/mips/sys/mips/mips/cache.c	Tue Oct 27 21:09:52 2009	(r198529)
+++ projects/mips/sys/mips/mips/cache.c	Tue Oct 27 23:45:48 2009	(r198530)
@@ -81,6 +81,7 @@ struct mips_cache_ops mips_cache_ops;
 void
 mips_config_cache(struct mips_cpuinfo * cpuinfo)
 {
+
 	switch (cpuinfo->l1.ic_linesize) {
 	case 16:
 		mips_cache_ops.mco_icache_sync_all = mipsNN_icache_sync_all_16;
@@ -223,7 +224,9 @@ mips_config_cache(struct mips_cpuinfo * 
 #endif
 
 	/* Check that all cache ops are set up. */
-	if (mips_picache_size || 1) {   /* XXX- must have primary Icache */
+	/* must have primary Icache */
+	if (cpuinfo->l1.ic_size) {   
+		
 		if (!mips_cache_ops.mco_icache_sync_all)
 			panic("no icache_sync_all cache op");
 		if (!mips_cache_ops.mco_icache_sync_range)
@@ -231,7 +234,8 @@ mips_config_cache(struct mips_cpuinfo * 
 		if (!mips_cache_ops.mco_icache_sync_range_index)
 			panic("no icache_sync_range_index cache op");
 	}
-	if (mips_pdcache_size || 1) {   /* XXX- must have primary Icache */
+	/* must have primary Dcache */
+	if (cpuinfo->l1.dc_size) {
 		if (!mips_cache_ops.mco_pdcache_wbinv_all)
 			panic("no pdcache_wbinv_all");
 		if (!mips_cache_ops.mco_pdcache_wbinv_range)


More information about the svn-src-projects mailing list