]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen/acpi: Move xen_acpi_get_pxm to Xen's acpi.h
authorLiu Jinsong <jinsong.liu@intel.com>
Fri, 25 Jan 2013 07:42:31 +0000 (15:42 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sat, 26 Jan 2013 00:34:58 +0000 (19:34 -0500)
So that it could be reused by Xen CPU hotplug logic.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-acpi-memhotplug.c
include/xen/acpi.h

index 2c3759ac10f07bd6ffe804f64b1bb2a84b047db5..678680cb213c7204a56fe013fc9fe4cb6888cecc 100644 (file)
@@ -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;
index 2b3103b33725abb87f061bb41712f840fe4d4fe5..dc69c91605b81979ffe9f49fb770da689c8900e2 100644 (file)
@@ -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 */