void arch_suspend_cpu(unsigned int cpu_id)
{
struct per_cpu *target_data = per_cpu(cpu_id);
- bool target_stopped;
+ bool target_suspended;
spin_lock(&target_data->control_lock);
- target_data->stop_cpu = true;
- target_stopped = target_data->cpu_stopped;
+ target_data->suspend_cpu = true;
+ target_suspended = target_data->cpu_suspended;
spin_unlock(&target_data->control_lock);
- if (!target_stopped) {
+ if (!target_suspended) {
apic_send_nmi_ipi(target_data);
- while (!target_data->cpu_stopped)
+ while (!target_data->cpu_suspended)
cpu_relax();
}
}
/* make any state changes visible before releasing the CPU */
memory_barrier();
- per_cpu(cpu_id)->stop_cpu = false;
+ per_cpu(cpu_id)->suspend_cpu = false;
}
void arch_reset_cpu(unsigned int cpu_id)
spin_lock(&cpu_data->control_lock);
do {
- if (cpu_data->init_signaled && !cpu_data->stop_cpu) {
+ if (cpu_data->init_signaled && !cpu_data->suspend_cpu) {
x86_enter_wait_for_sipi(cpu_data);
sipi_vector = -1;
break;
}
- cpu_data->cpu_stopped = true;
+ cpu_data->cpu_suspended = true;
spin_unlock(&cpu_data->control_lock);
- while (cpu_data->stop_cpu)
+ while (cpu_data->suspend_cpu)
cpu_relax();
if (cpu_data->shutdown_cpu) {
spin_lock(&cpu_data->control_lock);
- cpu_data->cpu_stopped = false;
+ cpu_data->cpu_suspended = false;
if (cpu_data->sipi_vector >= 0) {
if (!cpu_data->failed) {
/*
* protects the following per_cpu fields (unless CPU is stopped):
- * - stop_cpu
- * - cpu_stopped (except for spinning on it to become true)
+ * - suspend_cpu
+ * - cpu_suspended (except for spinning on it to become true)
* - wait_for_sipi
* - init_signaled
* - sipi_vector
*/
spinlock_t control_lock;
- volatile bool stop_cpu;
+ volatile bool suspend_cpu;
volatile bool wait_for_sipi;
- volatile bool cpu_stopped;
+ volatile bool cpu_suspended;
bool init_signaled;
int sipi_vector;
bool flush_virt_caches;
{
panic_printk("Stopping CPU %d (Cell: \"%s\")\n", this_cpu_id(),
this_cell()->config->name);
- this_cpu_data()->cpu_stopped = true;
+ this_cpu_data()->cpu_suspended = true;
if (phys_processor_id() == panic_cpu)
panic_in_progress = 0;