mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Joao Martins](/assets/img/avatar_default.png)
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>
8 lines
189 B
C
8 lines
189 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ARCH_HALTPOLL_H
|
|
#define _ARCH_HALTPOLL_H
|
|
|
|
void arch_haltpoll_enable(unsigned int cpu);
|
|
void arch_haltpoll_disable(unsigned int cpu);
|
|
|
|
#endif
|