hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/arm64/include/asm/cpu_ops.h
....@@ -1,17 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2013 ARM Ltd.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
12
- *
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
154 */
165 #ifndef __ASM_CPU_OPS_H
176 #define __ASM_CPU_OPS_H
....@@ -32,8 +21,10 @@
3221 * mechanism for doing so, tests whether it is possible to boot
3322 * the given CPU.
3423 * @cpu_boot: Boots a cpu into the kernel.
35
- * @cpu_postboot: Optionally, perform any post-boot cleanup or necesary
24
+ * @cpu_postboot: Optionally, perform any post-boot cleanup or necessary
3625 * synchronisation. Called from the cpu being booted.
26
+ * @cpu_can_disable: Determines whether a CPU can be disabled based on
27
+ * mechanism-specific information.
3728 * @cpu_disable: Prepares a cpu to die. May fail for some mechanism-specific
3829 * reason, which will cause the hot unplug to be aborted. Called
3930 * from the cpu to be killed.
....@@ -53,6 +44,7 @@
5344 int (*cpu_boot)(unsigned int);
5445 void (*cpu_postboot)(void);
5546 #ifdef CONFIG_HOTPLUG_CPU
47
+ bool (*cpu_can_disable)(unsigned int cpu);
5648 int (*cpu_disable)(unsigned int cpu);
5749 void (*cpu_die)(unsigned int cpu);
5850 int (*cpu_kill)(unsigned int cpu);
....@@ -63,12 +55,12 @@
6355 #endif
6456 };
6557
66
-extern const struct cpu_operations *cpu_ops[NR_CPUS];
67
-int __init cpu_read_ops(int cpu);
58
+int __init init_cpu_ops(int cpu);
59
+extern const struct cpu_operations *get_cpu_ops(int cpu);
6860
69
-static inline void __init cpu_read_bootcpu_ops(void)
61
+static inline void __init init_bootcpu_ops(void)
7062 {
71
- cpu_read_ops(0);
63
+ init_cpu_ops(0);
7264 }
7365
7466 #endif /* ifndef __ASM_CPU_OPS_H */