smpboot.c (79093f3ec39c90edf4bd1a532d922ee6163441ec) | smpboot.c (62ff262227a45bf917fe198885ab7aa19be5a01f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * SMP initialisation and IPI support 4 * Based on arch/arm64/kernel/smp.c 5 * 6 * Copyright (C) 2012 ARM Ltd. 7 * Copyright (C) 2015 Regents of the University of California 8 * Copyright (C) 2017 SiFive --- 152 unchanged lines hidden (view full) --- 161 pr_warn("Total number of cpus [%d] is greater than nr_cpus option value [%d]\n", 162 cpuid, nr_cpu_ids); 163} 164 165void __init setup_smp(void) 166{ 167 int cpuid; 168 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * SMP initialisation and IPI support 4 * Based on arch/arm64/kernel/smp.c 5 * 6 * Copyright (C) 2012 ARM Ltd. 7 * Copyright (C) 2015 Regents of the University of California 8 * Copyright (C) 2017 SiFive --- 152 unchanged lines hidden (view full) --- 161 pr_warn("Total number of cpus [%d] is greater than nr_cpus option value [%d]\n", 162 cpuid, nr_cpu_ids); 163} 164 165void __init setup_smp(void) 166{ 167 int cpuid; 168 |
169 cpu_set_ops(0); | 169 cpu_set_ops(); |
170 171 if (acpi_disabled) 172 of_parse_and_init_cpus(); 173 else 174 acpi_parse_and_init_cpus(); 175 | 170 171 if (acpi_disabled) 172 of_parse_and_init_cpus(); 173 else 174 acpi_parse_and_init_cpus(); 175 |
176 for (cpuid = 1; cpuid < nr_cpu_ids; cpuid++) { 177 if (cpuid_to_hartid_map(cpuid) != INVALID_HARTID) { 178 cpu_set_ops(cpuid); | 176 for (cpuid = 1; cpuid < nr_cpu_ids; cpuid++) 177 if (cpuid_to_hartid_map(cpuid) != INVALID_HARTID) |
179 set_cpu_possible(cpuid, true); | 178 set_cpu_possible(cpuid, true); |
180 } 181 } | |
182} 183 184static int start_secondary_cpu(int cpu, struct task_struct *tidle) 185{ | 179} 180 181static int start_secondary_cpu(int cpu, struct task_struct *tidle) 182{ |
186 if (cpu_ops[cpu]->cpu_start) 187 return cpu_ops[cpu]->cpu_start(cpu, tidle); | 183 if (cpu_ops->cpu_start) 184 return cpu_ops->cpu_start(cpu, tidle); |
188 189 return -EOPNOTSUPP; 190} 191 192int __cpu_up(unsigned int cpu, struct task_struct *tidle) 193{ 194 int ret = 0; 195 tidle->thread_info.cpu = cpu; --- 61 unchanged lines hidden --- | 185 186 return -EOPNOTSUPP; 187} 188 189int __cpu_up(unsigned int cpu, struct task_struct *tidle) 190{ 191 int ret = 0; 192 tidle->thread_info.cpu = cpu; --- 61 unchanged lines hidden --- |