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

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
diff -u -r1.1.2.13 time.c
--- arch/sh/kernel/time.c 2000/10/04 12:29:25
+++ 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"
"tst %1,%1\n\t"
"bt/s 1b\n\t"


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:41    [W:3.324 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site