hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/arm/mach-imx/hotplug.c
....@@ -1,42 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2011 Freescale Semiconductor, Inc.
34 * Copyright 2011 Linaro Ltd.
4
- *
5
- * The code contained herein is licensed under the GNU General Public
6
- * License. You may obtain a copy of the GNU General Public License
7
- * Version 2 or later at the following locations:
8
- *
9
- * http://www.opensource.org/licenses/gpl-license.html
10
- * http://www.gnu.org/copyleft/gpl.html
115 */
126
137 #include <linux/errno.h>
148 #include <linux/jiffies.h>
9
+#include <asm/cacheflush.h>
1510 #include <asm/cp15.h>
1611 #include <asm/proc-fns.h>
1712
1813 #include "common.h"
19
-
20
-static inline void cpu_enter_lowpower(void)
21
-{
22
- unsigned int v;
23
-
24
- asm volatile(
25
- "mcr p15, 0, %1, c7, c5, 0\n"
26
- " mcr p15, 0, %1, c7, c10, 4\n"
27
- /*
28
- * Turn off coherency
29
- */
30
- " mrc p15, 0, %0, c1, c0, 1\n"
31
- " bic %0, %0, %3\n"
32
- " mcr p15, 0, %0, c1, c0, 1\n"
33
- " mrc p15, 0, %0, c1, c0, 0\n"
34
- " bic %0, %0, %2\n"
35
- " mcr p15, 0, %0, c1, c0, 0\n"
36
- : "=&r" (v)
37
- : "r" (0), "Ir" (CR_C), "Ir" (0x40)
38
- : "cc");
39
-}
4014
4115 /*
4216 * platform-specific code to shutdown a CPU
....@@ -45,7 +19,7 @@
4519 */
4620 void imx_cpu_die(unsigned int cpu)
4721 {
48
- cpu_enter_lowpower();
22
+ v7_exit_coherency_flush(louis);
4923 /*
5024 * We use the cpu jumping argument register to sync with
5125 * imx_cpu_kill() which is running on cpu0 and waiting for