| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * CPU kernel entry/exit control |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2013 ARM Ltd. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | #include <linux/acpi.h> |
|---|
| .. | .. |
|---|
| 26 | 15 | #include <asm/smp_plat.h> |
|---|
| 27 | 16 | |
|---|
| 28 | 17 | extern const struct cpu_operations smp_spin_table_ops; |
|---|
| 18 | +#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL |
|---|
| 29 | 19 | extern const struct cpu_operations acpi_parking_protocol_ops; |
|---|
| 20 | +#endif |
|---|
| 30 | 21 | extern const struct cpu_operations cpu_psci_ops; |
|---|
| 31 | 22 | |
|---|
| 32 | | -const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init; |
|---|
| 23 | +static const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init; |
|---|
| 33 | 24 | |
|---|
| 34 | 25 | static const struct cpu_operations *const dt_supported_cpu_ops[] __initconst = { |
|---|
| 35 | 26 | &smp_spin_table_ops, |
|---|
| .. | .. |
|---|
| 105 | 96 | /* |
|---|
| 106 | 97 | * Read a cpu's enable method and record it in cpu_ops. |
|---|
| 107 | 98 | */ |
|---|
| 108 | | -int __init cpu_read_ops(int cpu) |
|---|
| 99 | +int __init init_cpu_ops(int cpu) |
|---|
| 109 | 100 | { |
|---|
| 110 | 101 | const char *enable_method = cpu_read_enable_method(cpu); |
|---|
| 111 | 102 | |
|---|
| .. | .. |
|---|
| 120 | 111 | |
|---|
| 121 | 112 | return 0; |
|---|
| 122 | 113 | } |
|---|
| 114 | + |
|---|
| 115 | +const struct cpu_operations *get_cpu_ops(int cpu) |
|---|
| 116 | +{ |
|---|
| 117 | + return cpu_ops[cpu]; |
|---|
| 118 | +} |
|---|