Title: [6954] branches/2009R1/arch/blackfin: [#5326] cpufreq-set can change cpu freq but bogomips remains
- Revision
- 6954
- Author
- hennerich
- Date
- 2009-07-09 04:57:11 -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: branches/2009R1/arch/blackfin/include/asm/cpu.h (6953 => 6954)
--- branches/2009R1/arch/blackfin/include/asm/cpu.h 2009-07-09 08:24:53 UTC (rev 6953)
+++ branches/2009R1/arch/blackfin/include/asm/cpu.h 2009-07-09 09:57:11 UTC (rev 6954)
@@ -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: branches/2009R1/arch/blackfin/kernel/setup.c (6953 => 6954)
--- branches/2009R1/arch/blackfin/kernel/setup.c 2009-07-09 08:24:53 UTC (rev 6953)
+++ branches/2009R1/arch/blackfin/kernel/setup.c 2009-07-09 09:57:11 UTC (rev 6954)
@@ -139,7 +139,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();
}
@@ -1120,9 +1119,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: branches/2009R1/arch/blackfin/mach-common/smp.c (6953 => 6954)
--- branches/2009R1/arch/blackfin/mach-common/smp.c 2009-07-09 08:24:53 UTC (rev 6953)
+++ branches/2009R1/arch/blackfin/mach-common/smp.c 2009-07-09 09:57:11 UTC (rev 6954)
@@ -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