hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/mach-zynq/platsmp.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * This file contains Xilinx specific SMP code, used to start up
34 * the second processor.
....@@ -7,15 +8,6 @@
78 * based on linux/arch/arm/mach-realview/platsmp.c
89 *
910 * Copyright (C) 2002 ARM Ltd.
10
- *
11
- * This software is licensed under the terms of the GNU General Public
12
- * License version 2, as published by the Free Software Foundation, and
13
- * may be copied, distributed, and modified under those terms.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
1911 */
2012
2113 #include <linux/export.h>
....@@ -23,6 +15,7 @@
2315 #include <linux/init.h>
2416 #include <linux/io.h>
2517 #include <asm/cacheflush.h>
18
+#include <asm/smp_plat.h>
2619 #include <asm/smp_scu.h>
2720 #include <linux/irqchip/arm-gic.h>
2821 #include "common.h"
....@@ -38,6 +31,7 @@
3831 {
3932 u32 trampoline_code_size = &zynq_secondary_trampoline_end -
4033 &zynq_secondary_trampoline;
34
+ u32 phy_cpuid = cpu_logical_map(cpu);
4135
4236 /* MS: Expectation that SLCR are directly map and accessible */
4337 /* Not possible to jump to non aligned address */
....@@ -47,7 +41,7 @@
4741 u32 trampoline_size = &zynq_secondary_trampoline_jump -
4842 &zynq_secondary_trampoline;
4943
50
- zynq_slcr_cpu_stop(cpu);
44
+ zynq_slcr_cpu_stop(phy_cpuid);
5145 if (address) {
5246 if (__pa(PAGE_OFFSET)) {
5347 zero = ioremap(0, trampoline_code_size);
....@@ -76,7 +70,7 @@
7670 if (__pa(PAGE_OFFSET))
7771 iounmap(zero);
7872 }
79
- zynq_slcr_cpu_start(cpu);
73
+ zynq_slcr_cpu_start(phy_cpuid);
8074
8175 return 0;
8276 }
....@@ -89,7 +83,7 @@
8983
9084 static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle)
9185 {
92
- return zynq_cpun_start(__pa_symbol(secondary_startup), cpu);
86
+ return zynq_cpun_start(__pa_symbol(secondary_startup_arm), cpu);
9387 }
9488
9589 /*