hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/mach-prima2/platsmp.c
....@@ -1,9 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * plat smp support for CSR Marco dual-core SMP SoCs
34 *
45 * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company.
5
- *
6
- * Licensed under GPLv2 or later.
76 */
87
98 #include <linux/init.h>
....@@ -24,13 +23,16 @@
2423
2524 static DEFINE_SPINLOCK(boot_lock);
2625
26
+/* XXX prima2_pen_release is cargo culted code - DO NOT COPY XXX */
27
+volatile int prima2_pen_release = -1;
28
+
2729 static void sirfsoc_secondary_init(unsigned int cpu)
2830 {
2931 /*
3032 * let the primary processor know we're out of the
3133 * pen, then head off into the C entry point
3234 */
33
- pen_release = -1;
35
+ prima2_pen_release = -1;
3436 smp_wmb();
3537
3638 /*
....@@ -80,13 +82,13 @@
8082 /*
8183 * The secondary processor is waiting to be released from
8284 * the holding pen - release it, then wait for it to flag
83
- * that it has been released by resetting pen_release.
85
+ * that it has been released by resetting prima2_pen_release.
8486 *
85
- * Note that "pen_release" is the hardware CPU ID, whereas
87
+ * Note that "prima2_pen_release" is the hardware CPU ID, whereas
8688 * "cpu" is Linux's internal ID.
8789 */
88
- pen_release = cpu_logical_map(cpu);
89
- sync_cache_w(&pen_release);
90
+ prima2_pen_release = cpu_logical_map(cpu);
91
+ sync_cache_w(&prima2_pen_release);
9092
9193 /*
9294 * Send the secondary CPU SEV, thereby causing the boot monitor to read
....@@ -97,7 +99,7 @@
9799 timeout = jiffies + (1 * HZ);
98100 while (time_before(jiffies, timeout)) {
99101 smp_rmb();
100
- if (pen_release == -1)
102
+ if (prima2_pen_release == -1)
101103 break;
102104
103105 udelay(10);
....@@ -109,7 +111,7 @@
109111 */
110112 spin_unlock(&boot_lock);
111113
112
- return pen_release != -1 ? -ENOSYS : 0;
114
+ return prima2_pen_release != -1 ? -ENOSYS : 0;
113115 }
114116
115117 const struct smp_operations sirfsoc_smp_ops __initconst = {