Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3a255e7 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

[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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 129f6946
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
	}

+1 −1
Original line number Diff line number Diff line
@@ -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());
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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);
			}
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -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);
Loading