mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 13:55:23 +07: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>
9 lines
189 B
C
9 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
|