mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08: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>
17 lines
312 B
C
17 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
|