[PATCH 1/7] cpuidle-haltpoll: Make boot_option_idle_override check X86 specific
Rafael J. Wysocki
rafael at kernel.org
Thu Aug 10 12:22:30 PDT 2023
On Wed, Aug 9, 2023 at 2:52 PM Mihai Carabas <mihai.carabas at oracle.com> wrote:
>
> From: Joao Martins <joao.m.martins at oracle.com>
>
> In the pursuit of letting it build on ARM let's not include what is x86
> specific.
>
> Signed-off-by: Joao Martins <joao.m.martins at oracle.com>
> Signed-off-by: Mihai Carabas <mihai.carabas at oracle.com>
> ---
> drivers/cpuidle/cpuidle-haltpoll.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/drivers/cpuidle/cpuidle-haltpoll.c
> index e66df22f9695..0ca3c8422eb6 100644
> --- a/drivers/cpuidle/cpuidle-haltpoll.c
> +++ b/drivers/cpuidle/cpuidle-haltpoll.c
> @@ -104,9 +104,11 @@ static int __init haltpoll_init(void)
> int ret;
> struct cpuidle_driver *drv = &haltpoll_driver;
>
> +#ifdef CONFIG_X86
> /* Do not load haltpoll if idle= is passed */
> if (boot_option_idle_override != IDLE_NO_OVERRIDE)
> return -ENODEV;
> +#endif
I'm sure that adding this #ifdef to the function body is avoidable.
> if (!kvm_para_available() || !haltpoll_want())
> return -ENODEV;
> --
More information about the linux-arm-kernel
mailing list