aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorToshi Kani <toshi.kani@hp.com>2013-05-29 18:30:05 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-05-29 18:30:05 -0400
commit1001b4d4a8ee6b2e7a6078a02ccdf68f91b192bd (patch)
tree5bd6dbc24954e10c9b655f66e6df108774d5474f /drivers/base
parent4960e05e22604ee270a023f968e0e4f9bd0c6fef (diff)
CPU: Fix sysfs cpu/online of offlined CPUs
As reported by Dave Hansen, sysfs cpu/online shows 1 for offlined CPUs at boot. Fix this problem by initializing dev.offline with cpu_online() when registering a CPU. References: https://lkml.org/lkml/2013/5/29/403 Reported-and-tested-by: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 7431ba6fc2d4..1d110dc6f0c1 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -265,6 +265,7 @@ int __cpuinit register_cpu(struct cpu *cpu, int num)
265 cpu->dev.bus = &cpu_subsys; 265 cpu->dev.bus = &cpu_subsys;
266 cpu->dev.release = cpu_device_release; 266 cpu->dev.release = cpu_device_release;
267 cpu->dev.offline_disabled = !cpu->hotpluggable; 267 cpu->dev.offline_disabled = !cpu->hotpluggable;
268 cpu->dev.offline = !cpu_online(num);
268#ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE 269#ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE
269 cpu->dev.bus->uevent = arch_cpu_uevent; 270 cpu->dev.bus->uevent = arch_cpu_uevent;
270#endif 271#endif