static void mpc85xx_smp_machine_kexec(struct kimage *image) { int timeout = INT_MAX; int i, num_cpus = num_present_cpus(); mpc85xx_smp_flush_dcache_kexec(image); if (image->type == KEXEC_TYPE_DEFAULT) smp_call_function(mpc85xx_smp_kexec_down, NULL, 0); while ( (atomic_read(&kexec_down_cpus) != (num_cpus - 1)) && ( timeout > 0 ) ) { timeout--; } if ( !timeout ) printk(KERN_ERR "Unable to bring down secondary cpu(s)"); for_each_online_cpu(i) { if ( i == smp_processor_id() ) continue; mpic_reset_core(i); } default_machine_kexec(image); }
static void mpc85xx_smp_machine_kexec(struct kimage *image) { int timeout = 2000; int i; set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); smp_call_function(mpc85xx_smp_kexec_down, NULL, 0); while ( (kexec_down_cpus != (num_online_cpus() - 1)) && ( timeout > 0 ) ) { timeout--; } if ( !timeout ) printk(KERN_ERR "Unable to bring down secondary cpu(s)"); for (i = 0; i < num_present_cpus(); i++) { if ( i == smp_processor_id() ) continue; mpic_reset_core(i); } default_machine_kexec(image); }
static void wii_machine_kexec(struct kimage *image) { local_irq_disable(); #ifdef CONFIG_STARLET_IOS /* * Reload IOS to make sure that I/O resources are freed before * the final kexec phase. */ if (starlet_get_ipc_flavour() == STARLET_IPC_IOS) starlet_es_reload_ios_and_discard(); #endif default_machine_kexec(image); }