]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start
authorQuanyang Wang <quanyang.wang@windriver.com>
Tue, 22 Oct 2019 03:23:28 +0000 (11:23 +0800)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 8 Jan 2020 14:21:09 +0000 (15:21 +0100)
commit599e1d52e3fb7905f115f054318e2e8c03e94d16
treeda3dca568d3c978031b997e1baf7500b98056580
parent7855fcc07be326322b44982a21760fd9bd8e2b92
ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start

When kernel booting, it will create a cpuid map between the logical cpus
and physical cpus. In a normal boot, the cpuid map is as below:

    Physical      Logical
        0    ==>     0
        1    ==>     1

But in kdump, there is a condition that the crash happens at the
physical cpu1, and the crash kernel will run at the physical cpu1 too,
so the cpuid map in crash kernel is as below:

    Physical      Logical
        1    ==>     0
        0    ==>     1

The functions zynq_slcr_cpu_stop/start is to stop/start the physical
cpus, the parameter cpu should be the physical cpuid. So use
cpu_logical_map to translate the logical cpuid to physical cpuid.
Or else the logical cpu0(physical cpu1) will stop itself and
the processor will hang.

Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynq/platsmp.c