hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/arm64/kernel/psci.c
....@@ -1,12 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License version 2 as
4
- * published by the Free Software Foundation.
5
- *
6
- * This program is distributed in the hope that it will be useful,
7
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
8
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
- * GNU General Public License for more details.
103 *
114 * Copyright (C) 2013 ARM Limited
125 *
....@@ -24,7 +17,6 @@
2417
2518 #include <uapi/linux/psci.h>
2619
27
-#include <asm/compiler.h>
2820 #include <asm/cpu_ops.h>
2921 #include <asm/errno.h>
3022 #include <asm/smp_plat.h>
....@@ -55,6 +47,11 @@
5547 }
5648
5749 #ifdef CONFIG_HOTPLUG_CPU
50
+static bool cpu_psci_cpu_can_disable(unsigned int cpu)
51
+{
52
+ return !psci_tos_resident_on(cpu);
53
+}
54
+
5855 static int cpu_psci_cpu_disable(unsigned int cpu)
5956 {
6057 /* Fail early if we don't have CPU_OFF support */
....@@ -114,14 +111,11 @@
114111
115112 const struct cpu_operations cpu_psci_ops = {
116113 .name = "psci",
117
-#ifdef CONFIG_CPU_IDLE
118
- .cpu_init_idle = psci_cpu_init_idle,
119
- .cpu_suspend = psci_cpu_suspend_enter,
120
-#endif
121114 .cpu_init = cpu_psci_cpu_init,
122115 .cpu_prepare = cpu_psci_cpu_prepare,
123116 .cpu_boot = cpu_psci_cpu_boot,
124117 #ifdef CONFIG_HOTPLUG_CPU
118
+ .cpu_can_disable = cpu_psci_cpu_can_disable,
125119 .cpu_disable = cpu_psci_cpu_disable,
126120 .cpu_die = cpu_psci_cpu_die,
127121 .cpu_kill = cpu_psci_cpu_kill,