Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH]: c-r4k.c 1/7 s/switch/formula/
@ 2003-03-28  0:51 Juan Quintela
  2003-03-29  0:49 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Juan Quintela @ 2003-03-28  0:51 UTC (permalink / raw)
  To: Ralf Baechle, mipslist


Hi
	use the same calculation for sc_size as in every other *_size.

Later, Juan.


 build/arch/mips/mm/c-r4k.c |   15 +--------------
 1 files changed, 1 insertion(+), 14 deletions(-)

diff -puN build/arch/mips/mm/c-r4k.c~c-r4k_remove_switch build/arch/mips/mm/c-r4k.c
--- 24/build/arch/mips/mm/c-r4k.c~c-r4k_remove_switch	2003-03-28 00:33:48.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/c-r4k.c	2003-03-28 00:33:48.000000000 +0100
@@ -635,20 +635,7 @@ static int __init probe_scache(unsigned 
 	if ((config >> 17) & 1)
 		return 0;
 
-	switch ((config >> 22) & 3) {
-	case 0:
-		sc_lsize = 16;
-		break;
-	case 1:
-		sc_lsize = 32;
-		break;
-	case 2:
-		sc_lsize = 64;
-		break;
-	case 3:
-		sc_lsize = 128;
-		break;
-	}
+	sc_lsize = 16 << ((config >> 22) & 3);
 
 	begin = (unsigned long) &stext;
 	begin &= ~((4 * 1024 * 1024) - 1);

_


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

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

end of thread, other threads:[~2003-03-29  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-28  0:51 [PATCH]: c-r4k.c 1/7 s/switch/formula/ Juan Quintela
2003-03-29  0:49 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox