Commit a3a255e744dfa672e741dc24306491139d0de2d8
Committed by
Linus Torvalds
1 parent
129f69465b
Exists in
master
and in
7 other branches
[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>
Showing 7 changed files with 11 additions and 9 deletions Side-by-side Diff
arch/i386/kernel/cpu/proc.c
arch/i386/kernel/smpboot.c
... | ... | @@ -205,7 +205,7 @@ |
205 | 205 | unsigned long long t0; |
206 | 206 | unsigned long long sum, avg; |
207 | 207 | long long delta; |
208 | - unsigned long one_usec; | |
208 | + unsigned int one_usec; | |
209 | 209 | int buggy = 0; |
210 | 210 | |
211 | 211 | printk(KERN_INFO "checking TSC synchronization across %u CPUs: ", num_booting_cpus()); |
arch/i386/kernel/time.c
arch/i386/kernel/timers/common.c
... | ... | @@ -163,7 +163,8 @@ |
163 | 163 | :"=a" (cpu_khz), "=d" (edx) |
164 | 164 | :"r" (tsc_quotient), |
165 | 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 | } |
arch/i386/kernel/timers/timer_hpet.c
... | ... | @@ -158,7 +158,7 @@ |
158 | 158 | { unsigned long eax=0, edx=1000; |
159 | 159 | ASM_DIV64_REG(cpu_khz, edx, tsc_quotient, |
160 | 160 | eax, edx); |
161 | - printk("Detected %lu.%03lu MHz processor.\n", | |
161 | + printk("Detected %u.%03u MHz processor.\n", | |
162 | 162 | cpu_khz / 1000, cpu_khz % 1000); |
163 | 163 | } |
164 | 164 | set_cyc2ns_scale(cpu_khz/1000); |
arch/i386/kernel/timers/timer_tsc.c
... | ... | @@ -256,7 +256,7 @@ |
256 | 256 | |
257 | 257 | #ifndef CONFIG_SMP |
258 | 258 | static unsigned long fast_gettimeoffset_ref = 0; |
259 | -static unsigned long cpu_khz_ref = 0; | |
259 | +static unsigned int cpu_khz_ref = 0; | |
260 | 260 | #endif |
261 | 261 | |
262 | 262 | static int |
... | ... | @@ -323,7 +323,7 @@ |
323 | 323 | int recalibrate_cpu_khz(void) |
324 | 324 | { |
325 | 325 | #ifndef CONFIG_SMP |
326 | - unsigned long cpu_khz_old = cpu_khz; | |
326 | + unsigned int cpu_khz_old = cpu_khz; | |
327 | 327 | |
328 | 328 | if (cpu_has_tsc) { |
329 | 329 | init_cpu_khz(); |
... | ... | @@ -534,7 +534,8 @@ |
534 | 534 | :"=a" (cpu_khz), "=d" (edx) |
535 | 535 | :"r" (tsc_quotient), |
536 | 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 | 540 | set_cyc2ns_scale(cpu_khz/1000); |
540 | 541 | return 0; |