lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 15 Jan 2013 12:31:45 +0000
From:	"Liu, Jinsong" <jinsong.liu@...el.com>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	Konrad Rzeszutek Wilk <konrad@...nel.org>
Subject: [PATCH V1 2/3] Move xen_acpi_get_pxm to Xen acpi.h

>From 398b5a92a407aeaf5d1497e4060490d135d4897a Mon Sep 17 00:00:00 2001
From: Liu Jinsong <jinsong.liu@...el.com>
Date: Mon, 14 Jan 2013 20:31:04 +0800
Subject: [PATCH 2/3] Move xen_acpi_get_pxm to Xen acpi.h

So that it could be reused by Xen CPU hotplug logic.

Signed-off-by: Liu, Jinsong <jinsong.liu@...el.com>
---
 drivers/xen/xen-acpi-memhotplug.c |   18 ------------------
 include/xen/acpi.h                |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/xen/xen-acpi-memhotplug.c b/drivers/xen/xen-acpi-memhotplug.c
index 346d80b..f01d425 100644
--- a/drivers/xen/xen-acpi-memhotplug.c
+++ b/drivers/xen/xen-acpi-memhotplug.c
@@ -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;
diff --git a/include/xen/acpi.h b/include/xen/acpi.h
index 1c99eb5..5ac46d3 100644
--- a/include/xen/acpi.h
+++ b/include/xen/acpi.h
@@ -46,6 +46,24 @@
 
 extern struct acpi_driver xen_stub_memory_device_driver;
 
+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;
+}
+
 #define ACPI_PROCESSOR_CLASS            "processor"
 #define ACPI_PROCESSOR_DEVICE_HID       "ACPI0007"
 #define ACPI_PROCESSOR_DEVICE_NAME      "Processor"
-- 
1.7.1

Download attachment "0002-Move-xen_acpi_get_pxm-to-Xen-acpi.h.patch" of type "application/octet-stream" (2060 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ