mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
97d3eb9da8
When cpus != maxcpus cpuidle-haltpoll will fail to register all vcpus
past the online ones and thus fail to register the idle driver.
This is because cpuidle_add_sysfs() will return with -ENODEV as a
consequence from get_cpu_device() return no device for a non-existing
CPU.
Instead switch to cpuidle_register_driver() and manually register each
of the present cpus through cpuhp_setup_state() callbacks and future
ones that get onlined or offlined. This mimmics similar logic that
intel_idle does.
Fixes: fa86ee90eb
("add cpuidle-haltpoll driver")
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
16 lines
312 B
C
16 lines
312 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _CPUIDLE_HALTPOLL_H
|
|
#define _CPUIDLE_HALTPOLL_H
|
|
|
|
#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
|
|
#include <asm/cpuidle_haltpoll.h>
|
|
#else
|
|
static inline void arch_haltpoll_enable(unsigned int cpu)
|
|
{
|
|
}
|
|
|
|
static inline void arch_haltpoll_disable(unsigned int cpu)
|
|
{
|
|
}
|
|
#endif
|
|
#endif
|