summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2001-02-26 01:08:20 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2001-02-26 01:08:20 +0000
commite3eb7ee2ae9c639081e5c3209930582d7a1717c0 (patch)
treec600e6c30870799556d14cc6cc22f760ecc093f7
parent7ba1171cc6ddcdf138522e5c63b15ff3dbe9edf6 (diff)
Update to using loops_per_jiffy instead of loops_per_sec.
-rw-r--r--arch/mips/kernel/setup.c2
-rw-r--r--arch/mips64/kernel/proc.c4
-rw-r--r--arch/mips64/kernel/setup.c2
-rw-r--r--include/asm-mips/delay.h10
-rw-r--r--include/asm-mips64/delay.h10
-rw-r--r--include/asm-mips64/smp.h2
6 files changed, 13 insertions, 17 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 1e9287b5f..34b1691eb 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -62,8 +62,6 @@ void (*cpu_wait)(void) = NULL;
*/
char cyclecounter_available;
-unsigned long loops_per_sec;
-
/*
* There are several bus types available for MIPS machines. "RISC PC"
* type machines have ISA, EISA, VLB or PCI available, DECstations
diff --git a/arch/mips64/kernel/proc.c b/arch/mips64/kernel/proc.c
index 766540e2c..d25a4ab04 100644
--- a/arch/mips64/kernel/proc.c
+++ b/arch/mips64/kernel/proc.c
@@ -48,8 +48,8 @@ int get_cpuinfo(char *buffer, char **start, off_t offset, int count)
mach_group_to_name[mips_machgroup][mips_machtype]);
*/
len += sprintf(buffer + len, "BogoMIPS\t\t: %lu.%02lu\n",
- (loops_per_sec + 2500) / 500000,
- ((loops_per_sec + 2500) / 5000) % 100);
+ (loops_per_jiffy + 2500) / (500000/HZ),
+ ((loops_per_jiffy + 2500) / (5000/HZ)) % 100);
/* len += sprintf(buffer + len, "Number of cpus\t\t: %d\n", smp_num_cpus);*/
#if defined (__MIPSEB__)
len += sprintf(buffer + len, "byteorder\t\t: big endian\n");
diff --git a/arch/mips64/kernel/setup.c b/arch/mips64/kernel/setup.c
index f30f6ba83..077a63034 100644
--- a/arch/mips64/kernel/setup.c
+++ b/arch/mips64/kernel/setup.c
@@ -56,8 +56,6 @@ char wait_available;
*/
char cyclecounter_available;
-unsigned long loops_per_sec;
-
/*
* Set if box has EISA slots.
*/
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h
index 840e868a1..50024e348 100644
--- a/include/asm-mips/delay.h
+++ b/include/asm-mips/delay.h
@@ -11,7 +11,7 @@
#include <linux/config.h>
-extern unsigned long loops_per_sec;
+extern unsigned long loops_per_jiffy;
extern __inline__ void
__delay(unsigned long loops)
@@ -35,21 +35,21 @@ __delay(unsigned long loops)
* first constant multiplications gets optimized away if the delay is
* a constant)
*/
-extern __inline__ void __udelay(unsigned long usecs, unsigned long lps)
+extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)
{
unsigned long lo;
- usecs *= 0x000010c6; /* 2**32 / 1000000 */
+ usecs *= 0x00068db8; /* 2**32 / (1000000 / HZ) */
__asm__("multu\t%2,%3"
:"=h" (usecs), "=l" (lo)
- :"r" (usecs),"r" (lps));
+ :"r" (usecs),"r" (lpj));
__delay(usecs);
}
#ifdef CONFIG_SMP
#define __udelay_val cpu_data[smp_processor_id()].udelay_val
#else
-#define __udelay_val loops_per_sec
+#define __udelay_val loops_per_jiffy
#endif
#define udelay(usecs) __udelay((usecs),__udelay_val)
diff --git a/include/asm-mips64/delay.h b/include/asm-mips64/delay.h
index 3d474e233..5c9c6973c 100644
--- a/include/asm-mips64/delay.h
+++ b/include/asm-mips64/delay.h
@@ -12,7 +12,7 @@
#include <linux/config.h>
-extern unsigned long loops_per_sec;
+extern unsigned long loops_per_jiffy;
extern __inline__ void
__delay(unsigned long loops)
@@ -36,21 +36,21 @@ __delay(unsigned long loops)
* first constant multiplications gets optimized away if the delay is
* a constant)
*/
-extern __inline__ void __udelay(unsigned long usecs, unsigned long lps)
+extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)
{
unsigned long lo;
- usecs *= 0x000010c6f7a0b5edUL; /* 2**64 / 1000000 */
+ usecs *= 0x00068db8bac710cbUL; /* 2**64 / (1000000 / HZ) */
__asm__("dmultu\t%2,%3"
:"=h" (usecs), "=l" (lo)
- :"r" (usecs),"r" (lps));
+ :"r" (usecs),"r" (lpj));
__delay(usecs);
}
#ifdef CONFIG_SMP
#define __udelay_val cpu_data[smp_processor_id()].udelay_val
#else
-#define __udelay_val loops_per_sec
+#define __udelay_val loops_per_jiffy
#endif
#define udelay(usecs) __udelay((usecs),__udelay_val)
diff --git a/include/asm-mips64/smp.h b/include/asm-mips64/smp.h
index b8a8f8d75..310b2afcf 100644
--- a/include/asm-mips64/smp.h
+++ b/include/asm-mips64/smp.h
@@ -10,7 +10,7 @@
#if 0
struct cpuinfo_mips { /* XXX */
- unsigned long loops_per_sec;
+ unsigned long loops_per_jiffy;
unsigned long last_asn;
unsigned long *pgd_cache;
unsigned long *pte_cache;