aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/timers
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-06-23 03:08:34 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:11 -0400
commita3a255e744dfa672e741dc24306491139d0de2d8 (patch)
treec19348966183d3ed79f6e9593a40d95c736e0665 /arch/i386/kernel/timers
parent129f69465b411592247c408f93d7106939223be1 (diff)
[PATCH] x86: cpu_khz type fix
x86_64's cpu_khz is unsigned int and there is no reason why x86 needs to use unsigned long. So make cpu_khz unsigned int on x86 as well. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/timers')
-rw-r--r--arch/i386/kernel/timers/common.c3
-rw-r--r--arch/i386/kernel/timers/timer_hpet.c2
-rw-r--r--arch/i386/kernel/timers/timer_tsc.c7
3 files changed, 7 insertions, 5 deletions
diff --git a/arch/i386/kernel/timers/common.c b/arch/i386/kernel/timers/common.c
index b38cc0d0c71a..37353bd31803 100644
--- a/arch/i386/kernel/timers/common.c
+++ b/arch/i386/kernel/timers/common.c
@@ -163,7 +163,8 @@ void init_cpu_khz(void)
163 :"=a" (cpu_khz), "=d" (edx) 163 :"=a" (cpu_khz), "=d" (edx)
164 :"r" (tsc_quotient), 164 :"r" (tsc_quotient),
165 "0" (eax), "1" (edx)); 165 "0" (eax), "1" (edx));
166 printk("Detected %lu.%03lu MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000); 166 printk("Detected %u.%03u MHz processor.\n",
167 cpu_khz / 1000, cpu_khz % 1000);
167 } 168 }
168 } 169 }
169 } 170 }
diff --git a/arch/i386/kernel/timers/timer_hpet.c b/arch/i386/kernel/timers/timer_hpet.c
index 15a7d727bd6f..d766e0963ac1 100644
--- a/arch/i386/kernel/timers/timer_hpet.c
+++ b/arch/i386/kernel/timers/timer_hpet.c
@@ -158,7 +158,7 @@ static int __init init_hpet(char* override)
158 { unsigned long eax=0, edx=1000; 158 { unsigned long eax=0, edx=1000;
159 ASM_DIV64_REG(cpu_khz, edx, tsc_quotient, 159 ASM_DIV64_REG(cpu_khz, edx, tsc_quotient,
160 eax, edx); 160 eax, edx);
161 printk("Detected %lu.%03lu MHz processor.\n", 161 printk("Detected %u.%03u MHz processor.\n",
162 cpu_khz / 1000, cpu_khz % 1000); 162 cpu_khz / 1000, cpu_khz % 1000);
163 } 163 }
164 set_cyc2ns_scale(cpu_khz/1000); 164 set_cyc2ns_scale(cpu_khz/1000);
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c
index 27f08ae9120b..54c36b182021 100644
--- a/arch/i386/kernel/timers/timer_tsc.c
+++ b/arch/i386/kernel/timers/timer_tsc.c
@@ -256,7 +256,7 @@ static unsigned long loops_per_jiffy_ref = 0;
256 256
257#ifndef CONFIG_SMP 257#ifndef CONFIG_SMP
258static unsigned long fast_gettimeoffset_ref = 0; 258static unsigned long fast_gettimeoffset_ref = 0;
259static unsigned long cpu_khz_ref = 0; 259static unsigned int cpu_khz_ref = 0;
260#endif 260#endif
261 261
262static int 262static int
@@ -323,7 +323,7 @@ static inline void cpufreq_delayed_get(void) { return; }
323int recalibrate_cpu_khz(void) 323int recalibrate_cpu_khz(void)
324{ 324{
325#ifndef CONFIG_SMP 325#ifndef CONFIG_SMP
326 unsigned long cpu_khz_old = cpu_khz; 326 unsigned int cpu_khz_old = cpu_khz;
327 327
328 if (cpu_has_tsc) { 328 if (cpu_has_tsc) {
329 init_cpu_khz(); 329 init_cpu_khz();
@@ -534,7 +534,8 @@ static int __init init_tsc(char* override)
534 :"=a" (cpu_khz), "=d" (edx) 534 :"=a" (cpu_khz), "=d" (edx)
535 :"r" (tsc_quotient), 535 :"r" (tsc_quotient),
536 "0" (eax), "1" (edx)); 536 "0" (eax), "1" (edx));
537 printk("Detected %lu.%03lu MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000); 537 printk("Detected %u.%03u MHz processor.\n",
538 cpu_khz / 1000, cpu_khz % 1000);
538 } 539 }
539 set_cyc2ns_scale(cpu_khz/1000); 540 set_cyc2ns_scale(cpu_khz/1000);
540 return 0; 541 return 0;