Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356933
b: refs/heads/master
c: 40a5863
h: refs/heads/master
i:
  356931: b66c46c
v: v3
  • Loading branch information
Liu Jinsong authored and Konrad Rzeszutek Wilk committed Feb 20, 2013
1 parent 3d4f511 commit e3a2de1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 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: b22ff77b82598ff131d215627533e09e4a472220
refs/heads/master: 40a58637a4fa10a2faea71f0f30ff0b3d74c6e00
18 changes: 0 additions & 18 deletions trunk/drivers/xen/xen-acpi-memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,6 @@ static int xen_hotadd_memory(int pxm, struct acpi_memory_info *info)
return rc;
}

static int xen_acpi_get_pxm(acpi_handle h)
{
unsigned long long pxm;
acpi_status status;
acpi_handle handle;
acpi_handle phandle = h;

do {
handle = phandle;
status = acpi_evaluate_integer(handle, "_PXM", NULL, &pxm);
if (ACPI_SUCCESS(status))
return pxm;
status = acpi_get_parent(handle, &phandle);
} while (ACPI_SUCCESS(status));

return -ENXIO;
}

static int xen_acpi_memory_enable_device(struct acpi_memory_device *mem_device)
{
int pxm, result;
Expand Down
18 changes: 18 additions & 0 deletions trunk/include/xen/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,22 @@ static inline void xen_acpi_sleep_register(void)
}
#endif

static inline int xen_acpi_get_pxm(acpi_handle h)
{
unsigned long long pxm;
acpi_status status;
acpi_handle handle;
acpi_handle phandle = h;

do {
handle = phandle;
status = acpi_evaluate_integer(handle, "_PXM", NULL, &pxm);
if (ACPI_SUCCESS(status))
return pxm;
status = acpi_get_parent(handle, &phandle);
} while (ACPI_SUCCESS(status));

return -ENXIO;
}

#endif /* _XEN_ACPI_H */

0 comments on commit e3a2de1

Please sign in to comment.