]> err.no Git - linux-2.6/commitdiff
[PATCH] x86: cpu_khz type fix
authorAndrew Morton <akpm@osdl.org>
Thu, 23 Jun 2005 07:08:34 +0000 (00:08 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:11 +0000 (09:45 -0700)
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>
arch/i386/kernel/cpu/proc.c
arch/i386/kernel/smpboot.c
arch/i386/kernel/time.c
arch/i386/kernel/timers/common.c
arch/i386/kernel/timers/timer_hpet.c
arch/i386/kernel/timers/timer_tsc.c
include/asm-i386/timex.h

index 7323c19f354e82bcc48cec8c943cd97156213f21..8bd77d948a8446b578472d4d1bfac7a757d38936 100644 (file)
@@ -86,7 +86,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                seq_printf(m, "stepping\t: unknown\n");
 
        if ( cpu_has(c, X86_FEATURE_TSC) ) {
-               seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
+               seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
                        cpu_khz / 1000, (cpu_khz % 1000));
        }
 
index aaad95e7f879d2a4f957fa8e3280479afeeb937a..c20d96d5c15c738709cc4667233a0e0945b093a0 100644 (file)
@@ -205,7 +205,7 @@ static void __init synchronize_tsc_bp (void)
        unsigned long long t0;
        unsigned long long sum, avg;
        long long delta;
-       unsigned long one_usec;
+       unsigned int one_usec;
        int buggy = 0;
 
        printk(KERN_INFO "checking TSC synchronization across %u CPUs: ", num_booting_cpus());
index 8bc8363fbb4cd60682ac3ce082d84b10c10491e1..e68d9fdb075962769a100f2eedce167187945463 100644 (file)
@@ -77,7 +77,7 @@ u64 jiffies_64 = INITIAL_JIFFIES;
 
 EXPORT_SYMBOL(jiffies_64);
 
-unsigned long cpu_khz; /* Detected as we calibrate the TSC */
+unsigned int cpu_khz;  /* Detected as we calibrate the TSC */
 EXPORT_SYMBOL(cpu_khz);
 
 extern unsigned long wall_jiffies;
index b38cc0d0c71a44a19a395a90ad613a23e67606b5..37353bd318036f4f6d0dc4d00c5f1a7ea9c973e1 100644 (file)
@@ -163,7 +163,8 @@ void init_cpu_khz(void)
                                :"=a" (cpu_khz), "=d" (edx)
                                :"r" (tsc_quotient),
                                "0" (eax), "1" (edx));
-                               printk("Detected %lu.%03lu MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000);
+                               printk("Detected %u.%03u MHz processor.\n",
+                                       cpu_khz / 1000, cpu_khz % 1000);
                        }
                }
        }
index 15a7d727bd6f505475c9b6bcab38c31d5768ed92..d766e0963ac13599db7707368ba833b331bcafeb 100644 (file)
@@ -158,7 +158,7 @@ static int __init init_hpet(char* override)
                        {       unsigned long eax=0, edx=1000;
                                ASM_DIV64_REG(cpu_khz, edx, tsc_quotient,
                                                eax, edx);
-                               printk("Detected %lu.%03lu MHz processor.\n",
+                               printk("Detected %u.%03u MHz processor.\n",
                                        cpu_khz / 1000, cpu_khz % 1000);
                        }
                        set_cyc2ns_scale(cpu_khz/1000);
index 27f08ae9120bbb9a9e2985de4bd6619acc5156e5..54c36b182021a3cbc0b9359b95581f499c522353 100644 (file)
@@ -256,7 +256,7 @@ static unsigned long loops_per_jiffy_ref = 0;
 
 #ifndef CONFIG_SMP
 static unsigned long fast_gettimeoffset_ref = 0;
-static unsigned long cpu_khz_ref = 0;
+static unsigned int cpu_khz_ref = 0;
 #endif
 
 static int
@@ -323,7 +323,7 @@ static inline void cpufreq_delayed_get(void) { return; }
 int recalibrate_cpu_khz(void)
 {
 #ifndef CONFIG_SMP
-       unsigned long cpu_khz_old = cpu_khz;
+       unsigned int cpu_khz_old = cpu_khz;
 
        if (cpu_has_tsc) {
                init_cpu_khz();
@@ -534,7 +534,8 @@ static int __init init_tsc(char* override)
                                :"=a" (cpu_khz), "=d" (edx)
                                :"r" (tsc_quotient),
                                "0" (eax), "1" (edx));
-                               printk("Detected %lu.%03lu MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000);
+                               printk("Detected %u.%03u MHz processor.\n",
+                                       cpu_khz / 1000, cpu_khz % 1000);
                        }
                        set_cyc2ns_scale(cpu_khz/1000);
                        return 0;
index e370f907bd39031b6c2d3f669ac6f77d26536771..292b5a68f6271b08b410d19197e3434f654e517f 100644 (file)
@@ -47,7 +47,7 @@ static inline cycles_t get_cycles (void)
        return ret;
 }
 
-extern unsigned long cpu_khz;
+extern unsigned int cpu_khz;
 
 extern int read_current_timer(unsigned long *timer_value);
 #define ARCH_HAS_READ_CURRENT_TIMER    1