void native_machine_shutdown(void) { /* Stop the cpus and apics */ #ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif #ifdef CONFIG_SMP /* * Stop all of the others. Also disable the local irq to * not receive the per-cpu timer interrupt which may trigger * scheduler's load balance. */ local_irq_disable(); stop_other_cpus(); #endif lapic_shutdown(); #ifdef CONFIG_HPET_TIMER hpet_disable(); #endif #ifdef CONFIG_X86_64 x86_platform.iommu_shutdown(); #endif }
/* * Halt the machine and return to the monitor */ void halt(char *s) { stop_other_cpus(); /* send stop signal to other CPUs */ if (s) prom_printf("(%s) \n", s); prom_exit_to_mon(); /*NOTREACHED*/ }
static void xen_reboot(int reason) { struct sched_shutdown r = { .reason = reason }; #ifdef CONFIG_SMP stop_other_cpus(); #endif if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r)) BUG(); }
void native_machine_shutdown(void) { /* Stop the cpus and apics */ #ifdef CONFIG_SMP /* The boot cpu is always logical cpu 0 */ int reboot_cpu_id = 0; #endif #ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif #ifdef CONFIG_SMP #ifdef CONFIG_X86_32 /* See if there has been given a command line override */ if ((reboot_cpu != -1) && (reboot_cpu < nr_cpu_ids) && cpu_online(reboot_cpu)) reboot_cpu_id = reboot_cpu; #endif /* Make certain the cpu I'm about to reboot on is online */ if (!cpu_online(reboot_cpu_id)) reboot_cpu_id = smp_processor_id(); /* Make certain I only run on the appropriate processor */ set_cpus_allowed_ptr(current, cpumask_of(reboot_cpu_id)); /* * O.K Now that I'm on the appropriate processor, stop all of the * others. Also disable the local irq to not receive the per-cpu * timer interrupt which may trigger scheduler's load balance. */ local_irq_disable(); stop_other_cpus(); #endif lapic_shutdown(); #ifdef CONFIG_HPET_TIMER hpet_disable(); #endif #ifdef CONFIG_X86_64 x86_platform.iommu_shutdown(); #endif }
void native_machine_shutdown(void) { /* Stop the cpus and apics */ #ifdef CONFIG_SMP /* The boot cpu is always logical cpu 0 */ int reboot_cpu_id = 0; #ifdef CONFIG_X86_32 /* See if there has been given a command line override */ if ((reboot_cpu != -1) && (reboot_cpu < nr_cpu_ids) && cpu_online(reboot_cpu)) reboot_cpu_id = reboot_cpu; #endif /* Make certain the cpu I'm about to reboot on is online */ if (!cpu_online(reboot_cpu_id)) reboot_cpu_id = smp_processor_id(); /* Make certain I only run on the appropriate processor */ set_cpus_allowed_ptr(current, cpumask_of(reboot_cpu_id)); /* O.K Now that I'm on the appropriate processor, * stop all of the others. */ stop_other_cpus(); #endif lapic_shutdown(); #ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif #ifdef CONFIG_HPET_TIMER hpet_disable(); #endif #ifdef CONFIG_X86_64 x86_platform.iommu_shutdown(); #endif }
void native_machine_shutdown(void) { /* Stop the cpus and apics */ #ifdef CONFIG_X86_IO_APIC /* * Disabling IO APIC before local APIC is a workaround for * erratum AVR31 in "Intel Atom Processor C2000 Product Family * Specification Update". In this situation, interrupts that target * a Logical Processor whose Local APIC is either in the process of * being hardware disabled or software disabled are neither delivered * nor discarded. When this erratum occurs, the processor may hang. * * Even without the erratum, it still makes sense to quiet IO APIC * before disabling Local APIC. */ disable_IO_APIC(); #endif #ifdef CONFIG_SMP /* * Stop all of the others. Also disable the local irq to * not receive the per-cpu timer interrupt which may trigger * scheduler's load balance. */ local_irq_disable(); stop_other_cpus(); #endif lapic_shutdown(); #ifdef CONFIG_HPET_TIMER hpet_disable(); #endif #ifdef CONFIG_X86_64 x86_platform.iommu_shutdown(); #endif }
void i_cpr_stop_other_cpus(void) { stop_other_cpus(); }