Title: [6955] trunk/arch/blackfin: [#5326] cpufreq-set can change cpu freq but bogomips remains
Revision
6955
Author
hennerich
Date
2009-07-09 04:58:52 -0500 (Thu, 09 Jul 2009)

Log Message

[#5326] cpufreq-set can change cpu freq but bogomips remains
During CPU frequency transitions the kernel adjusts loops_per_jiffy.
But in show_cpuinfo we print out cpudata->loops_per_jiffy, which is only
initialized once, during boot.

On Blackfin a per_cpu basis loops_per_jiffy is pointless, since both
cores always run on the same CCLK domain. In addition the current
implementation has flaws since the main consumer for
loops_per_jiffy (asm/delay.h) uses the global kernel loops_per_jiffy and
not
the per_cpu one.

This patch removes per_cpu loops_per_jiffy.

Modified Paths

Diff

Modified: trunk/arch/blackfin/include/asm/cpu.h (6954 => 6955)


--- trunk/arch/blackfin/include/asm/cpu.h	2009-07-09 09:57:11 UTC (rev 6954)
+++ trunk/arch/blackfin/include/asm/cpu.h	2009-07-09 09:58:52 UTC (rev 6955)
@@ -32,7 +32,6 @@
 	struct task_struct *idle;
 	unsigned int imemctl;
 	unsigned int dmemctl;
-	unsigned long loops_per_jiffy;
 	unsigned long dcache_invld_count;
 	unsigned long icache_invld_count;
 };

Modified: trunk/arch/blackfin/kernel/setup.c (6954 => 6955)


--- trunk/arch/blackfin/kernel/setup.c	2009-07-09 09:57:11 UTC (rev 6954)
+++ trunk/arch/blackfin/kernel/setup.c	2009-07-09 09:58:52 UTC (rev 6955)
@@ -168,7 +168,6 @@
 	struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);
 
 	cpudata->idle = current;
-	cpudata->loops_per_jiffy = loops_per_jiffy;
 	cpudata->imemctl = bfin_read_IMEM_CONTROL();
 	cpudata->dmemctl = bfin_read_DMEM_CONTROL();
 }
@@ -1164,9 +1163,9 @@
 		sclk/1000000, sclk%1000000);
 	seq_printf(m, "bogomips\t: %lu.%02lu\n"
 		"Calibration\t: %lu loops\n",
-		(cpudata->loops_per_jiffy * HZ) / 500000,
-		((cpudata->loops_per_jiffy * HZ) / 5000) % 100,
-		(cpudata->loops_per_jiffy * HZ));
+		(loops_per_jiffy * HZ) / 500000,
+		((loops_per_jiffy * HZ) / 5000) % 100,
+		(loops_per_jiffy * HZ));
 
 	/* Check Cache configutation */
 	switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) {

Modified: trunk/arch/blackfin/mach-common/smp.c (6954 => 6955)


--- trunk/arch/blackfin/mach-common/smp.c	2009-07-09 09:57:11 UTC (rev 6954)
+++ trunk/arch/blackfin/mach-common/smp.c	2009-07-09 09:58:52 UTC (rev 6955)
@@ -450,7 +450,7 @@
 	unsigned int cpu;
 
 	for_each_online_cpu(cpu)
-		bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
+		bogosum += loops_per_jiffy;
 
 	printk(KERN_INFO "SMP: Total of %d processors activated "
 	       "(%lu.%02lu BogoMIPS).\n",
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to