History

cpuidle-haltpoll: vcpu hotplug support

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.

Joao Martins committed 7 years ago

Commit 97d3eb91 parent b7e7fff4 files · +73 −21Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/cpuidle_haltpoll.h+2−2
@@ -5,11 +5,11 @@ · 4 unmodified lines
5#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL5#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
6#include <asm/cpuidle_haltpoll.h>6#include <asm/cpuidle_haltpoll.h>
7#else7#else
8static inline void arch_haltpoll_enable(void)8static inline void arch_haltpoll_enable(unsigned int cpu)
9{9{
10}10}
11 11
12static inline void arch_haltpoll_disable(void)12static inline void arch_haltpoll_disable(unsigned int cpu)
13{13{
14}14}
15#endif15#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t