Skip to content

Commit c70c754

Browse files
mhennerichvapier
authored andcommitted
Blackfin: drop per-cpu loops_per_jiffy tracking
On Blackfin SMP, a per-cpu loops_per_jiffy is pointless since both cores always run at the same CCLK. 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. So punt all of the per-cpu handling and go back to the global shared one. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
1 parent c03c2a8 commit c70c754

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎arch/blackfin/include/asm/cpu.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ struct blackfin_cpudata {
3232
struct task_struct *idle;
3333
unsigned int imemctl;
3434
unsigned int dmemctl;
35-
unsigned long loops_per_jiffy;
3635
unsigned long dcache_invld_count;
3736
unsigned long icache_invld_count;
3837
};

‎arch/blackfin/kernel/setup.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu)
168168
struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);
169169

170170
cpudata->idle = current;
171-
cpudata->loops_per_jiffy = loops_per_jiffy;
172171
cpudata->imemctl = bfin_read_IMEM_CONTROL();
173172
cpudata->dmemctl = bfin_read_DMEM_CONTROL();
174173
}
@@ -1159,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
11591158
sclk/1000000, sclk%1000000);
11601159
seq_printf(m, "bogomips\t: %lu.%02lu\n"
11611160
"Calibration\t: %lu loops\n",
1162-
(cpudata->loops_per_jiffy * HZ) / 500000,
1163-
((cpudata->loops_per_jiffy * HZ) / 5000) % 100,
1164-
(cpudata->loops_per_jiffy * HZ));
1161+
(loops_per_jiffy * HZ) / 500000,
1162+
((loops_per_jiffy * HZ) / 5000) % 100,
1163+
(loops_per_jiffy * HZ));
11651164

11661165
/* Check Cache configutation */
11671166
switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) {

‎arch/blackfin/mach-common/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
450450
unsigned int cpu;
451451

452452
for_each_online_cpu(cpu)
453-
bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
453+
bogosum += loops_per_jiffy;
454454

455455
printk(KERN_INFO "SMP: Total of %d processors activated "
456456
"(%lu.%02lu BogoMIPS).\n",

0 commit comments

Comments
 (0)