| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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/>. |
|---|
| 15 | 4 | */ |
|---|
| 16 | 5 | #ifndef __ASM_CPU_OPS_H |
|---|
| 17 | 6 | #define __ASM_CPU_OPS_H |
|---|
| .. | .. |
|---|
| 32 | 21 | * mechanism for doing so, tests whether it is possible to boot |
|---|
| 33 | 22 | * the given CPU. |
|---|
| 34 | 23 | * @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 |
|---|
| 36 | 25 | * synchronisation. Called from the cpu being booted. |
|---|
| 26 | + * @cpu_can_disable: Determines whether a CPU can be disabled based on |
|---|
| 27 | + * mechanism-specific information. |
|---|
| 37 | 28 | * @cpu_disable: Prepares a cpu to die. May fail for some mechanism-specific |
|---|
| 38 | 29 | * reason, which will cause the hot unplug to be aborted. Called |
|---|
| 39 | 30 | * from the cpu to be killed. |
|---|
| .. | .. |
|---|
| 53 | 44 | int (*cpu_boot)(unsigned int); |
|---|
| 54 | 45 | void (*cpu_postboot)(void); |
|---|
| 55 | 46 | #ifdef CONFIG_HOTPLUG_CPU |
|---|
| 47 | + bool (*cpu_can_disable)(unsigned int cpu); |
|---|
| 56 | 48 | int (*cpu_disable)(unsigned int cpu); |
|---|
| 57 | 49 | void (*cpu_die)(unsigned int cpu); |
|---|
| 58 | 50 | int (*cpu_kill)(unsigned int cpu); |
|---|
| .. | .. |
|---|
| 63 | 55 | #endif |
|---|
| 64 | 56 | }; |
|---|
| 65 | 57 | |
|---|
| 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); |
|---|
| 68 | 60 | |
|---|
| 69 | | -static inline void __init cpu_read_bootcpu_ops(void) |
|---|
| 61 | +static inline void __init init_bootcpu_ops(void) |
|---|
| 70 | 62 | { |
|---|
| 71 | | - cpu_read_ops(0); |
|---|
| 63 | + init_cpu_ops(0); |
|---|
| 72 | 64 | } |
|---|
| 73 | 65 | |
|---|
| 74 | 66 | #endif /* ifndef __ASM_CPU_OPS_H */ |
|---|