All of lore.kernel.org
 help / color / mirror / Atom feed
* cache code fix for c-tx39.c (Re: CVS Update@-mips.org: linux)
       [not found] <20030709124821Z8225210-1272+3285@linux-mips.org>
@ 2003-07-16 10:55 ` Atsushi Nemoto
  2003-07-16 10:58   ` cache code fix for c-tx39.c Atsushi Nemoto
  0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2003-07-16 10:55 UTC (permalink / raw)
  To: linux-mips, ralf

>>>>> On Wed,  9 Jul 2003 13:48:16 +0100, ralf@linux-mips.org said:
> Changes by:	ralf@ftp.linux-mips.org	03/07/09 13:48:16
> 
> Modified files:
> 	arch/mips/mm   : Tag: linux_2_4 c-r4k.c 
> 	arch/mips64/mm : Tag: linux_2_4 c-r4k.c 
> 	include/asm-mips: Tag: linux_2_4 processor.h r4kcache.h 
> 	include/asm-mips64: Tag: linux_2_4 processor.h 
> 
> Log message:
> 	Cache code fixes.

Please fix c-tx39.c also.  This is a patch for 2.4 branch.

diff -ur linux-mips-cvs/arch/mips/mm/c-tx39.c linux.new/arch/mips/mm/c-tx39.c
--- linux-mips-cvs/arch/mips/mm/c-tx39.c	Tue May  6 09:40:58 2003
+++ linux.new/arch/mips/mm/c-tx39.c	Wed Jul 16 19:39:55 2003
@@ -25,9 +25,6 @@
 
 /* For R3000 cores with R4000 style caches */
 static unsigned long icache_size, dcache_size;		/* Size in bytes */
-static unsigned long icache_way_size, dcache_way_size;	/* Size divided by ways */
-#define scache_size 0
-#define scache_way_size 0
 
 #include <asm/r4kcache.h>
 
@@ -473,15 +470,15 @@
 		break;
 	}
 
-	icache_way_size = icache_size / current_cpu_data.icache.ways;
-	dcache_way_size = dcache_size / current_cpu_data.dcache.ways;
+	current_cpu_data.icache.waysize = icache_size / current_cpu_data.icache.ways;
+	current_cpu_data.dcache.waysize = dcache_size / current_cpu_data.dcache.ways;
 
 	current_cpu_data.icache.sets =
-		icache_way_size / current_cpu_data.icache.linesz;
+		current_cpu_data.icache.waysize / current_cpu_data.icache.linesz;
 	current_cpu_data.dcache.sets =
-		dcache_way_size / current_cpu_data.dcache.linesz;
+		current_cpu_data.dcache.waysize / current_cpu_data.dcache.linesz;
 
-	if (dcache_way_size > PAGE_SIZE)
+	if (current_cpu_data.dcache.waysize > PAGE_SIZE)
 		current_cpu_data.dcache.flags |= MIPS_CACHE_ALIASES;
 
 	current_cpu_data.icache.waybit = 0;
---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cache code fix for c-tx39.c
  2003-07-16 10:55 ` cache code fix for c-tx39.c (Re: CVS Update@-mips.org: linux) Atsushi Nemoto
@ 2003-07-16 10:58   ` Atsushi Nemoto
  0 siblings, 0 replies; 2+ messages in thread
From: Atsushi Nemoto @ 2003-07-16 10:58 UTC (permalink / raw)
  To: linux-mips, ralf

>>>>> On Wed, 16 Jul 2003 19:55:14 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> said:
>> Log message: Cache code fixes.

anemo> Please fix c-tx39.c also.  This is a patch for 2.4 branch.

And this is one for trunk (2.6).

diff -ur linux-mips-cvs-2.6/arch/mips/mm/c-tx39.c linux.new-2.6/arch/mips/mm/c-tx39.c
--- linux-mips-cvs-2.6/arch/mips/mm/c-tx39.c	Wed Jul 16 19:49:27 2003
+++ linux.new-2.6/arch/mips/mm/c-tx39.c	Wed Jul 16 19:52:42 2003
@@ -25,9 +25,6 @@
 
 /* For R3000 cores with R4000 style caches */
 static unsigned long icache_size, dcache_size;		/* Size in bytes */
-static unsigned long icache_way_size, dcache_way_size;	/* Size divided by ways */
-#define scache_size 0
-#define scache_way_size 0
 
 #include <asm/r4kcache.h>
 
@@ -474,15 +471,15 @@
 		break;
 	}
 
-	icache_way_size = icache_size / current_cpu_data.icache.ways;
-	dcache_way_size = dcache_size / current_cpu_data.dcache.ways;
+	current_cpu_data.icache.waysize = icache_size / current_cpu_data.icache.ways;
+	current_cpu_data.dcache.waysize = dcache_size / current_cpu_data.dcache.ways;
 
 	current_cpu_data.icache.sets =
-		icache_way_size / current_cpu_data.icache.linesz;
+		current_cpu_data.icache.waysize / current_cpu_data.icache.linesz;
 	current_cpu_data.dcache.sets =
-		dcache_way_size / current_cpu_data.dcache.linesz;
+		current_cpu_data.dcache.waysize / current_cpu_data.dcache.linesz;
 
-	if (dcache_way_size > PAGE_SIZE)
+	if (current_cpu_data.dcache.waysize > PAGE_SIZE)
 		current_cpu_data.dcache.flags |= MIPS_CACHE_ALIASES;
 
 	current_cpu_data.icache.waybit = 0;
---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-16 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030709124821Z8225210-1272+3285@linux-mips.org>
2003-07-16 10:55 ` cache code fix for c-tx39.c (Re: CVS Update@-mips.org: linux) Atsushi Nemoto
2003-07-16 10:58   ` cache code fix for c-tx39.c Atsushi Nemoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.