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

1 // SPDX-License-Identifier: GPL-2.0-only
32 * The primary CPU waits a while for all secondary CPUs to enter. This is to
33 * avoid sending an IPI if the secondary CPUs are entering
36 * The secondary timeout has to be longer than the primary. Both timeouts are
48 * In case of system reset, secondary CPUs enter crash_kexec_secondary with out
69 static int crash_shutdown_cpu = -1;
118 volatile unsigned int ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */ in crash_kexec_prepare_cpus()
125 ncpus = num_present_cpus() - 1; in crash_kexec_prepare_cpus()
129 * So, wait a while for the secondary CPUs to enter for that case. in crash_kexec_prepare_cpus()
145 while ((atomic_read(&cpus_in_crash) < ncpus) && (--msecs > 0)) in crash_kexec_prepare_cpus()
156 ncpus - atomic_read(&cpus_in_crash)); in crash_kexec_prepare_cpus()
159 * If we have a panic timeout set then we can't wait indefinitely in crash_kexec_prepare_cpus()
168 * The primary CPU returns here via setjmp, and the secondary in crash_kexec_prepare_cpus()
191 crash_shutdown_cpu = -1; in crash_kexec_prepare_cpus()
199 * This function will be called by secondary cpus.
210 if (--msecs < 0) { in crash_kexec_secondary()
227 * move the secondaries to us so that we can copy in crash_kexec_prepare_cpus()
228 * the new kernel 0-0x100 safely in crash_kexec_prepare_cpus()
256 while (paca_ptrs[i]->kexec_state < KEXEC_STATE_REAL_MODE) { in crash_kexec_wait_realmode()
260 msecs--; in crash_kexec_wait_realmode()
298 * can't reset your device in the second kernel.
338 for (; i < (CRASH_HANDLER_MAX - 1); i++) in crash_shutdown_unregister()
392 crash_shutdown_cpu = -1; in default_machine_crash_shutdown()
420 * update_crash_elfcorehdr() - Recreate the elfcorehdr and replace it with old
433 ksegment = &image->segment[image->elfcorehdr_index]; in update_crash_elfcorehdr()
434 mem = (void *) ksegment->mem; in update_crash_elfcorehdr()
435 memsz = ksegment->memsz; in update_crash_elfcorehdr()
447 if (image->hp_action == KEXEC_CRASH_HP_REMOVE_MEMORY) { in update_crash_elfcorehdr()
448 base_addr = PFN_PHYS(mn->start_pfn); in update_crash_elfcorehdr()
449 size = mn->nr_pages * PAGE_SIZE; in update_crash_elfcorehdr()
452 pr_err("Failed to remove hot-unplugged memory from crash memory ranges\n"); in update_crash_elfcorehdr()
491 * get_fdt_index - Loop through the kexec segment array and find
496 * if found; otherwise -1.
502 int i, fdt_index = -1; in get_fdt_index()
505 for (i = 0; i < image->nr_segments; i++) { in get_fdt_index()
506 mem = image->segment[i].mem; in get_fdt_index()
519 * update_crash_fdt - updates the cpus node of the crash FDT.
534 fdt = __va((void *)image->segment[fdt_index].mem); in update_crash_fdt()
550 if (image->file_mode) in arch_crash_hotplug_support()
557 * arch_crash_handle_hotplug_event - Handle crash CPU/Memory hotplug events to update the
562 * Update the kdump image based on the type of hotplug event, represented by image->hp_action.
572 switch (image->hp_action) { in arch_crash_handle_hotplug_event()