Lines Matching +full:can +full:- +full:secondary

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2004-2005, IBM Corp.
48 for (i = 0; i < image->nr_segments; i++) in machine_kexec_prepare()
49 if (image->segment[i].mem < __pa(_end)) in machine_kexec_prepare()
50 return -ETXTBSY; in machine_kexec_prepare()
54 basep = of_get_property(node, "linux,tce-base", NULL); in machine_kexec_prepare()
55 sizep = of_get_property(node, "linux,tce-size", NULL); in machine_kexec_prepare()
62 for (i = 0; i < image->nr_segments; i++) { in machine_kexec_prepare()
63 begin = image->segment[i].mem; in machine_kexec_prepare()
64 end = begin + image->segment[i].memsz; in machine_kexec_prepare()
68 return -ETXTBSY; in machine_kexec_prepare()
113 long i, nr_segments = image->nr_segments; in kexec_copy_flush()
117 memcpy(ranges, image->segment, sizeof(ranges)); in kexec_copy_flush()
125 copy_segments(image->head); in kexec_copy_flush()
146 get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF; in kexec_smp_down()
152 * Now every CPU has IRQs off, we can clear out any pending in kexec_smp_down()
166 int my_cpu, i, notified=-1; in kexec_prepare_cpus_wait()
174 * start-cpu, but somehow that CPU doesn't write callin_cpu_map[] in in kexec_prepare_cpus_wait()
176 * stuff, the secondary will start up (paca_ptrs[]->cpu_start was in kexec_prepare_cpus_wait()
178 * If the platform supports smp_ops->take_timebase(), the secondary CPU in kexec_prepare_cpus_wait()
180 * secondary will continue on and try to online itself/idle/etc. If it in kexec_prepare_cpus_wait()
182 * possible-but-not-online-but-should-be CPUs and chaperone them into in kexec_prepare_cpus_wait()
189 while (paca_ptrs[i]->kexec_state < wait_state) { in kexec_prepare_cpus_wait()
194 i, paca_ptrs[i]->hw_cpu_id, wait_state); in kexec_prepare_cpus_wait()
204 * the device tree and assume primary threads are online and query secondary
206 * threads, they will be stuck. However, we also online secondary threads as we
207 * may be using 'cede offline'. In this case RTAS doesn't see the secondary
208 * threads as offline -- and again, these CPUs will be stuck.
210 * So, we online all CPUs that should be running, including secondary threads.
233 get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF; in kexec_prepare_cpus()
257 * move the secondarys to us so that we can copy in kexec_prepare_cpus()
258 * the new kernel 0-0x100 safely in kexec_prepare_cpus()
277 * We need to make sure that this is 16384-byte aligned due to the
324 current_thread_info()->flags = 0; in default_machine_kexec()
325 current_thread_info()->preempt_count = HARDIRQ_OFFSET; in default_machine_kexec()
329 * non-static data. in default_machine_kexec()
337 if (is_secure_guest() && !(image->preserve_context || in default_machine_kexec()
338 image->type == KEXEC_TYPE_CRASH)) { in default_machine_kexec()
350 * unregistered so there is not much we can do about it here. in default_machine_kexec()
355 * using Radix page tables or we are not in an LPAR since we can in default_machine_kexec()
358 * In an LPAR, we keep the MMU on otherwise we can't access beyond in default_machine_kexec()
371 * a toc is easier in C, so pass in what we can. in default_machine_kexec()
373 kexec_sequence(&kexec_stack, image->start, image, in default_machine_kexec()
374 page_address(image->control_code_page), in default_machine_kexec()
385 .name = "linux,htab-base",
391 .name = "linux,htab-size",
402 return -ENODEV; in export_htab_values()
406 return -ENODEV; in export_htab_values()
408 /* remove any stale properties so ours can be found */ in export_htab_values()