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
55 #ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
66 #include <asm/cpuidle_haltpoll.h>
77 #else
8−static inline void arch_haltpoll_enable(void)
8+static inline void arch_haltpoll_enable(unsigned int cpu)
99 {
1010 }
1111
12−static inline void arch_haltpoll_disable(void)
12+static inline void arch_haltpoll_disable(unsigned int cpu)
1313 {
1414 }
1515 #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