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

Commit c70c754f authored by Michael Hennerich's avatar Michael Hennerich Committed by Mike Frysinger
Browse files

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: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent c03c2a87
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,6 @@ struct blackfin_cpudata {
	struct task_struct *idle;
	struct task_struct *idle;
	unsigned int imemctl;
	unsigned int imemctl;
	unsigned int dmemctl;
	unsigned int dmemctl;
	unsigned long loops_per_jiffy;
	unsigned long dcache_invld_count;
	unsigned long dcache_invld_count;
	unsigned long icache_invld_count;
	unsigned long icache_invld_count;
};
};
+3 −4
Original line number Original line Diff line number Diff line
@@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu)
	struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);
	struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);


	cpudata->idle = current;
	cpudata->idle = current;
	cpudata->loops_per_jiffy = loops_per_jiffy;
	cpudata->imemctl = bfin_read_IMEM_CONTROL();
	cpudata->imemctl = bfin_read_IMEM_CONTROL();
	cpudata->dmemctl = bfin_read_DMEM_CONTROL();
	cpudata->dmemctl = bfin_read_DMEM_CONTROL();
}
}
@@ -1159,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
		sclk/1000000, sclk%1000000);
		sclk/1000000, sclk%1000000);
	seq_printf(m, "bogomips\t: %lu.%02lu\n"
	seq_printf(m, "bogomips\t: %lu.%02lu\n"
		"Calibration\t: %lu loops\n",
		"Calibration\t: %lu loops\n",
		(cpudata->loops_per_jiffy * HZ) / 500000,
		(loops_per_jiffy * HZ) / 500000,
		((cpudata->loops_per_jiffy * HZ) / 5000) % 100,
		((loops_per_jiffy * HZ) / 5000) % 100,
		(cpudata->loops_per_jiffy * HZ));
		(loops_per_jiffy * HZ));


	/* Check Cache configutation */
	/* Check Cache configutation */
	switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) {
	switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -450,7 +450,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
	unsigned int cpu;
	unsigned int cpu;


	for_each_online_cpu(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 "
	printk(KERN_INFO "SMP: Total of %d processors activated "
	       "(%lu.%02lu BogoMIPS).\n",
	       "(%lu.%02lu BogoMIPS).\n",