diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-05-06 00:49:49 +0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-06-09 17:53:52 +0400 |
commit | b71f54081b56e0fa7d838626c88cdf2d9bba5359 (patch) | |
tree | 399d4d9783f303451044bc5809463300a3adfd64 /drivers/acpi/acpi_processor.c | |
parent | 19f1fde286c4dce11031c226c7aa37609f8bbe3b (diff) | |
download | linux-b71f54081b56e0fa7d838626c88cdf2d9bba5359.tar.xz |
ACPI / processor: do not mark present at boot but not onlined CPU as onlined
commit 0b9d46dd7debf8e6dc8614106f1c1909fa8de64d upstream.
acpi_processor_add() assumes that present at boot CPUs
are always onlined, it is not so if a CPU failed to become
onlined. As result acpi_processor_add() will mark such CPU
device as onlined in sysfs and following attempts to
online/offline it using /sys/device/system/cpu/cpuX/online
attribute will fail.
Do not poke into device internals in acpi_processor_add()
and touch "struct device { .offline }" attribute, since
for CPUs onlined at boot it's set by:
topology_init() -> arch_register_cpu() -> register_cpu()
before ACPI device tree is parsed, and for hotplugged
CPUs it's set when userspace onlines CPU via sysfs.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
-rw-r--r-- | drivers/acpi/acpi_processor.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index f29e06efa479..f99cb6a15c00 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -410,7 +410,6 @@ static int acpi_processor_add(struct acpi_device *device, goto err; pr->dev = dev; - dev->offline = pr->flags.need_hotplug_init; /* Trigger the processor driver's .probe() if present. */ if (device_attach(dev) >= 0) |