diff mbox series

ACPI: processor: Fix build when !CONFIG_HOTPLUG_CPU

Message ID 20210330102630.264398-1-vkuznets@redhat.com
State New
Headers show
Series ACPI: processor: Fix build when !CONFIG_HOTPLUG_CPU | expand

Commit Message

Vitaly Kuznetsov March 30, 2021, 10:26 a.m. UTC
Kernel test robot reports build breakage with commit 5f5e49e999ac
("ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()") when
!CONFIG_HOTPLUG_CPU/!CONFIG_SMP. wakeup_cpu0() is defined under
CONFIG_SMP and start_cpu0() under CONFIG_HOTPLUG_CPU which, in its turn,
depend on CONFIG_SMP. Add #ifdef CONFIG_HOTPLUG_CPU to the block, this
should be sufficient.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 5f5e49e999ac ("ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 drivers/acpi/processor_idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki March 30, 2021, 7:50 p.m. UTC | #1
On Tue, Mar 30, 2021 at 12:27 PM Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>
> Kernel test robot reports build breakage with commit 5f5e49e999ac
> ("ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()") when
> !CONFIG_HOTPLUG_CPU/!CONFIG_SMP. wakeup_cpu0() is defined under
> CONFIG_SMP and start_cpu0() under CONFIG_HOTPLUG_CPU which, in its turn,
> depend on CONFIG_SMP. Add #ifdef CONFIG_HOTPLUG_CPU to the block, this
> should be sufficient.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 5f5e49e999ac ("ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()")

Folded into the above patch, thanks!

> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  drivers/acpi/processor_idle.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index f0c73f658880..0925b1477230 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -539,7 +539,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
>                 } else
>                         return -ENODEV;
>
> -#ifdef CONFIG_X86
> +#if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
>                 /* If NMI wants to wake up CPU0, start CPU0. */
>                 if (wakeup_cpu0())
>                         start_cpu0();
> --
> 2.30.2
>
diff mbox series

Patch

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f0c73f658880..0925b1477230 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -539,7 +539,7 @@  static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
 		} else
 			return -ENODEV;
 
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
 		/* If NMI wants to wake up CPU0, start CPU0. */
 		if (wakeup_cpu0())
 			start_cpu0();