MIPS: BMIPS: couple of fixes
Subsystems (2)
cover MIPS: BMIPS: couple of fixes
Hi Thomas,
These two patches are fixes for the BMIPS5000/5200 CPU cores which were missing an inclusive physical cache setting from the cpuinfo structure and we would not be calling CPU specific initialization for secondarey cores on the second hardware thread.
Thanks!
Florian Fainelli (2):
MIPS: mm: BMIPS5000 has inclusive physical caches
MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores
arch/mips/kernel/smp-bmips.c | 2 ++ arch/mips/mm/c-r4k.c | 4 ++++ 2 files changed, 6 insertions(+)
Signature · 1 line
2.17.1
PATCH 1/2 MIPS: mm: BMIPS5000 has inclusive physical caches
When the BMIPS generic cpu-feature-overrides.h file was introduced, cpu_has_inclusive_caches/MIPS_CPU_INCLUSIVE_CACHES was not set for BMIPS5000 CPUs. Correct this when we have initialized the MIPS secondary cache successfully.
--- arch/mips/mm/c-r4k.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/mips/mm/c-r4k.c +4 -0
@@ -1712,7 +1712,11 @@ static void setup_scache(void)printk ("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n" , scache_size >>10 , way_string[c->scache.ways], c->scache.linesz); + +if (current_cpu_type () ==CPU_BMIPS5000 ) + c->options |= MIPS_CPU_INCLUSIVE_CACHES; } +#else if (!(c->scache.flags &MIPS_CACHE_NOT_PRESENT ))panic ("Dunno how to handle MIPS32 / MIPS64 second level cache" );
Signature · 1 line
2.17.1
PATCH 2/2 MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores
In reply to Florian FainelliThe initialization done by bmips_cpu_setup() typically affects both threads of a given core, on 7435 which supports 2 cores and 2 threads, logical CPU number 2 and 3 would not run this initialization.
--- arch/mips/kernel/smp-bmips.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/kernel/smp-bmips.c +2 -0
@@ -239,6 +239,8 @@ static int bmips_boot_secondary(int cpu, struct task_struct *idle)*/ static void bmips_init_secondary (void ) { +bmips_cpu_setup (); +switch (current_cpu_type ()) {case CPU_BMIPS4350 :case CPU_BMIPS4380 :
Signature · 1 line
2.17.1
Thomas Bogendoerfer
maintainerQuoted 9 lines · Florian Fainelli
Hi Thomas,
These two patches are fixes for the BMIPS5000/5200 CPU cores which were missing an inclusive physical cache setting from the cpuinfo structure and we would not be calling CPU specific initialization for secondarey cores on the second hardware thread.
Thanks!
Quoted 7 lines
Florian Fainelli (2):
MIPS: mm: BMIPS5000 has inclusive physical caches
MIPS: BMIPS: Also callbmips_cpu_setup()for secondary coresarch/mips/kernel/smp-bmips.c | 2 ++ arch/mips/mm/c-r4k.c | 4 ++++ 2 files changed, 6 insertions(+)
series applied to mips-fixes.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]