]> Git Repo - linux.git/commit
cpuidle-haltpoll: vcpu hotplug support
authorJoao Martins <[email protected]>
Mon, 2 Sep 2019 10:40:31 +0000 (11:40 +0100)
committerRafael J. Wysocki <[email protected]>
Tue, 3 Sep 2019 07:36:36 +0000 (09:36 +0200)
commit97d3eb9da84cae0548359b0aecb8619faad003b7
tree69c7f83cbc5a28db819ff39b31ddb4917ef600fb
parentb7e7fffd3e8c81aa0654ed4c9f7a142b4c4dab1a
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.

Fixes: fa86ee90eb11 ("add cpuidle-haltpoll driver")
Signed-off-by: Joao Martins <[email protected]>
Signed-off-by: Boris Ostrovsky <[email protected]>
Reviewed-by: Marcelo Tosatti <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
arch/x86/include/asm/cpuidle_haltpoll.h
arch/x86/kernel/kvm.c
drivers/cpuidle/cpuidle-haltpoll.c
include/linux/cpuidle_haltpoll.h
This page took 0.065583 seconds and 4 git commands to generate.