Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360727
b: refs/heads/master
c: 1b37d6e
h: refs/heads/master
i:
  360725: 0450351
  360723: 860cb8e
  360719: 1635e16
v: v3
  • Loading branch information
Liu Jinsong authored and Konrad Rzeszutek Wilk committed Feb 25, 2013
1 parent 81f5887 commit f5f9609
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 484400ffbf2dd33446d71c05b9cddf91932a882e
refs/heads/master: 1b37d6ea2cdc61102f4643d8cd654ec15212b927
34 changes: 12 additions & 22 deletions trunk/drivers/xen/xen-acpi-cpuhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,24 +239,6 @@ static acpi_status xen_acpi_cpu_hotadd(struct acpi_processor *pr)
return AE_OK;
}

static
int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
{
acpi_handle phandle;
struct acpi_device *pdev;

if (acpi_get_parent(handle, &phandle))
return -ENODEV;

if (acpi_bus_get_device(phandle, &pdev))
return -ENODEV;

if (acpi_bus_scan(handle))
return -ENODEV;

return 0;
}

static int acpi_processor_device_remove(struct acpi_device *device)
{
pr_debug(PREFIX "Xen does not support CPU hotremove\n");
Expand All @@ -272,6 +254,8 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,
u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */
int result;

acpi_scan_lock_acquire();

switch (event) {
case ACPI_NOTIFY_BUS_CHECK:
case ACPI_NOTIFY_DEVICE_CHECK:
Expand All @@ -286,12 +270,16 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,
if (!acpi_bus_get_device(handle, &device))
break;

result = acpi_processor_device_add(handle, &device);
result = acpi_bus_scan(handle);
if (result) {
pr_err(PREFIX "Unable to add the device\n");
break;
}

result = acpi_bus_get_device(handle, &device);
if (result) {
pr_err(PREFIX "Missing device object\n");
break;
}
ost_code = ACPI_OST_SC_SUCCESS;
break;

Expand Down Expand Up @@ -321,11 +309,13 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,
"Unsupported event [0x%x]\n", event));

/* non-hotplug event; possibly handled by other handler */
return;
goto out;
}

(void) acpi_evaluate_hotplug_ost(handle, event, ost_code, NULL);
return;

out:
acpi_scan_lock_release();
}

static acpi_status is_processor_device(acpi_handle handle)
Expand Down

0 comments on commit f5f9609

Please sign in to comment.