Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298027
b: refs/heads/master
c: c6436f5
h: refs/heads/master
i:
  298025: 28dcdf8
  298023: 35d0993
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Mar 30, 2012
1 parent d62b4b7 commit 964656d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 41 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: 9f324bda970c599ca35f7be89d9d1bcb96d6053c
refs/heads/master: c6436f5a395d346e9f4892d7aeed4c3f99261f0f
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ static int suspend_nvs_register(unsigned long start, unsigned long size)
{
struct nvs_page *entry, *next;

pr_info("PM: Registering ACPI NVS region at %lx (%ld bytes)\n",
start, size);
pr_info("PM: Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
start, start + size - 1, size);

while (size > 0) {
unsigned int nr_bytes;
Expand Down
48 changes: 10 additions & 38 deletions trunk/drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
#define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82
#define ACPI_PROCESSOR_DEVICE_HID "ACPI0007"

#define ACPI_PROCESSOR_LIMIT_USER 0
#define ACPI_PROCESSOR_LIMIT_THERMAL 1
Expand All @@ -89,7 +88,7 @@ static int acpi_processor_start(struct acpi_processor *pr);

static const struct acpi_device_id processor_device_ids[] = {
{ACPI_PROCESSOR_OBJECT_HID, 0},
{ACPI_PROCESSOR_DEVICE_HID, 0},
{"ACPI0007", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, processor_device_ids);
Expand Down Expand Up @@ -742,46 +741,20 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,
return;
}

static acpi_status is_processor_device(acpi_handle handle)
{
struct acpi_device_info *info;
char *hid;
acpi_status status;

status = acpi_get_object_info(handle, &info);
if (ACPI_FAILURE(status))
return status;

if (info->type == ACPI_TYPE_PROCESSOR) {
kfree(info);
return AE_OK; /* found a processor object */
}

if (!(info->valid & ACPI_VALID_HID)) {
kfree(info);
return AE_ERROR;
}

hid = info->hardware_id.string;
if ((hid == NULL) || strcmp(hid, ACPI_PROCESSOR_DEVICE_HID)) {
kfree(info);
return AE_ERROR;
}

kfree(info);
return AE_OK; /* found a processor device object */
}

static acpi_status
processor_walk_namespace_cb(acpi_handle handle,
u32 lvl, void *context, void **rv)
{
acpi_status status;
int *action = context;
acpi_object_type type = 0;

status = is_processor_device(handle);
status = acpi_get_type(handle, &type);
if (ACPI_FAILURE(status))
return AE_OK; /* not a processor; continue to walk */
return (AE_OK);

if (type != ACPI_TYPE_PROCESSOR)
return (AE_OK);

switch (*action) {
case INSTALL_NOTIFY_HANDLER:
Expand All @@ -799,8 +772,7 @@ processor_walk_namespace_cb(acpi_handle handle,
break;
}

/* found a processor; skip walking underneath */
return AE_CTRL_DEPTH;
return (AE_OK);
}

static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
Expand Down Expand Up @@ -858,7 +830,7 @@ void acpi_processor_install_hotplug_notify(void)
{
#ifdef CONFIG_ACPI_HOTPLUG_CPU
int action = INSTALL_NOTIFY_HANDLER;
acpi_walk_namespace(ACPI_TYPE_ANY,
acpi_walk_namespace(ACPI_TYPE_PROCESSOR,
ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX,
processor_walk_namespace_cb, NULL, &action, NULL);
Expand All @@ -871,7 +843,7 @@ void acpi_processor_uninstall_hotplug_notify(void)
{
#ifdef CONFIG_ACPI_HOTPLUG_CPU
int action = UNINSTALL_NOTIFY_HANDLER;
acpi_walk_namespace(ACPI_TYPE_ANY,
acpi_walk_namespace(ACPI_TYPE_PROCESSOR,
ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX,
processor_walk_namespace_cb, NULL, &action, NULL);
Expand Down

0 comments on commit 964656d

Please sign in to comment.