diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-07-09 05:58:52 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-07-16 01:52:44 -0400 |
commit | c70c754ff916cedd969a73549799d2167ffefcd6 (patch) | |
tree | d37d8d710e0094f0eae084b564458fa1d1bee798 /arch/blackfin | |
parent | c03c2a87347b849ec927d7d2ea79a6955e19f492 (diff) |
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>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/include/asm/cpu.h | 1 | ||||
-rw-r--r-- | arch/blackfin/kernel/setup.c | 7 | ||||
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/arch/blackfin/include/asm/cpu.h b/arch/blackfin/include/asm/cpu.h index 565b8136855e..fadfa82f93b2 100644 --- a/arch/blackfin/include/asm/cpu.h +++ b/arch/blackfin/include/asm/cpu.h | |||
@@ -32,7 +32,6 @@ struct blackfin_cpudata { | |||
32 | struct task_struct *idle; | 32 | struct task_struct *idle; |
33 | unsigned int imemctl; | 33 | unsigned int imemctl; |
34 | unsigned int dmemctl; | 34 | unsigned int dmemctl; |
35 | unsigned long loops_per_jiffy; | ||
36 | unsigned long dcache_invld_count; | 35 | unsigned long dcache_invld_count; |
37 | unsigned long icache_invld_count; | 36 | unsigned long icache_invld_count; |
38 | }; | 37 | }; |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 98c2f79afda3..6225edae488e 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu) | |||
168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); | 168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); |
169 | 169 | ||
170 | cpudata->idle = current; | 170 | cpudata->idle = current; |
171 | cpudata->loops_per_jiffy = loops_per_jiffy; | ||
172 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); | 171 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); |
173 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); | 172 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); |
174 | } | 173 | } |
@@ -1159,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1159 | sclk/1000000, sclk%1000000); | 1158 | sclk/1000000, sclk%1000000); |
1160 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1159 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |
1161 | "Calibration\t: %lu loops\n", | 1160 | "Calibration\t: %lu loops\n", |
1162 | (cpudata->loops_per_jiffy * HZ) / 500000, | 1161 | (loops_per_jiffy * HZ) / 500000, |
1163 | ((cpudata->loops_per_jiffy * HZ) / 5000) % 100, | 1162 | ((loops_per_jiffy * HZ) / 5000) % 100, |
1164 | (cpudata->loops_per_jiffy * HZ)); | 1163 | (loops_per_jiffy * HZ)); |
1165 | 1164 | ||
1166 | /* Check Cache configutation */ | 1165 | /* Check Cache configutation */ |
1167 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { | 1166 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 61840059dfac..e6e3429d92b0 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -450,7 +450,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
450 | unsigned int cpu; | 450 | unsigned int cpu; |
451 | 451 | ||
452 | for_each_online_cpu(cpu) | 452 | for_each_online_cpu(cpu) |
453 | bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy; | 453 | bogosum += loops_per_jiffy; |
454 | 454 | ||
455 | printk(KERN_INFO "SMP: Total of %d processors activated " | 455 | printk(KERN_INFO "SMP: Total of %d processors activated " |
456 | "(%lu.%02lu BogoMIPS).\n", | 456 | "(%lu.%02lu BogoMIPS).\n", |