OSDN Git Service

mips: smp-bmips: fix CPU mappings
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 24 Feb 2021 07:33:36 +0000 (08:33 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sat, 6 Mar 2021 07:43:39 +0000 (08:43 +0100)
commit4f62d0a22fcabaa4477c6b8d7bf2860d819959cc
tree674b2a570922fba0042cc9534e42797008550730
parentee5e12e78b7930f797765cd809d7325c1b4b9dcb
mips: smp-bmips: fix CPU mappings

When booting bmips with SMP enabled on a BCM6358 running on CPU #1 instead of
CPU #0, the current CPU mapping code produces the following:
- smp_processor_id(): 0
- cpu_logical_map(0): 1
- cpu_number_map(0): 1

This is because SMP isn't supported on BCM6358 since it has a shared TLB, so
it is disabled and max_cpus is decreased from 2 to 1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/smp-bmips.c