Commit ccd6c35c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'acpi-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix a build issue introduced by a previous fix in the ACPI processor
  driver (Vitaly Kuznetsov)"

* tag 'acpi-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: processor: Fix build when CONFIG_ACPI_PROCESSOR=m
parents 89591522 fa26d0c7
...@@ -132,7 +132,7 @@ void native_play_dead(void); ...@@ -132,7 +132,7 @@ void native_play_dead(void);
void play_dead_common(void); void play_dead_common(void);
void wbinvd_on_cpu(int cpu); void wbinvd_on_cpu(int cpu);
int wbinvd_on_all_cpus(void); int wbinvd_on_all_cpus(void);
bool wakeup_cpu0(void); void cond_wakeup_cpu0(void);
void native_smp_send_reschedule(int cpu); void native_smp_send_reschedule(int cpu);
void native_send_call_func_ipi(const struct cpumask *mask); void native_send_call_func_ipi(const struct cpumask *mask);
......
...@@ -1659,13 +1659,17 @@ void play_dead_common(void) ...@@ -1659,13 +1659,17 @@ void play_dead_common(void)
local_irq_disable(); local_irq_disable();
} }
bool wakeup_cpu0(void) /**
* cond_wakeup_cpu0 - Wake up CPU0 if needed.
*
* If NMI wants to wake up CPU0, start CPU0.
*/
void cond_wakeup_cpu0(void)
{ {
if (smp_processor_id() == 0 && enable_start_cpu0) if (smp_processor_id() == 0 && enable_start_cpu0)
return true; start_cpu0();
return false;
} }
EXPORT_SYMBOL_GPL(cond_wakeup_cpu0);
/* /*
* We need to flush the caches before going to sleep, lest we have * We need to flush the caches before going to sleep, lest we have
...@@ -1734,11 +1738,8 @@ static inline void mwait_play_dead(void) ...@@ -1734,11 +1738,8 @@ static inline void mwait_play_dead(void)
__monitor(mwait_ptr, 0, 0); __monitor(mwait_ptr, 0, 0);
mb(); mb();
__mwait(eax, 0); __mwait(eax, 0);
/*
* If NMI wants to wake up CPU0, start CPU0. cond_wakeup_cpu0();
*/
if (wakeup_cpu0())
start_cpu0();
} }
} }
...@@ -1749,11 +1750,8 @@ void hlt_play_dead(void) ...@@ -1749,11 +1750,8 @@ void hlt_play_dead(void)
while (1) { while (1) {
native_halt(); native_halt();
/*
* If NMI wants to wake up CPU0, start CPU0. cond_wakeup_cpu0();
*/
if (wakeup_cpu0())
start_cpu0();
} }
} }
......
...@@ -544,9 +544,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) ...@@ -544,9 +544,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
return -ENODEV; return -ENODEV;
#if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU) #if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
/* If NMI wants to wake up CPU0, start CPU0. */ cond_wakeup_cpu0();
if (wakeup_cpu0())
start_cpu0();
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment