lkml.org 
[lkml]   [2000]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Fix SH3 CPU speed detection.
Date

The timing loop used for CPU speed detection on SH takes 5 cycles instead
of 4 on SH3 if it's not word-aligned. SH4 may want recalibrating, given the
'I don't know why, but it appears to take 6 cycles' comment.

Index: arch/sh/kernel/time.c
===================================================================
RCS file: /inst/cvs/linux/arch/sh/kernel/Attic/time.c,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 time.c
--- arch/sh/kernel/time.c 2000/10/04 12:29:25 1.1.2.13
+++ arch/sh/kernel/time.c 2000/10/19 07:42:31
@@ -337,6 +337,7 @@
do {} while (ctrl_inb(R64CNT) != 0);
ctrl_outb(RCR1_CIE, RCR1); /* Enable carry interrupt */
asm volatile(
+ ".align 2\n\t"
"1:\t"
"tst %1,%1\n\t"
"bt/s 1b\n\t"

--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2011 Jasper Spaans