[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 05/10] xen/acpi: Move acpi_memory_info definition to public



>From 0172b1ce6a2ba70e739f968622d78ac1796813f9 Mon Sep 17 00:00:00 2001
From: Liu Jinsong <jinsong.liu@xxxxxxxxx>
Date: Sun, 11 Dec 2011 17:25:35 +0800
Subject: [PATCH 05/10] xen/acpi: Move acpi_memory_info definition to public

This patch rebased from Jeremy's pvops commit
359e747e6260f105f750657917e1dc75f6427602

Move this definition to header file so that it can be used by dom0
memory hotadd logic also.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 drivers/acpi/acpi_memhotplug.c |   15 ---------------
 include/acpi/acpi_drivers.h    |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index d985713..e28e64d 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -71,21 +71,6 @@ static struct acpi_driver acpi_memory_device_driver = {
                },
 };
 
-struct acpi_memory_info {
-       struct list_head list;
-       u64 start_addr;         /* Memory Range start physical addr */
-       u64 length;             /* Memory Range length */
-       unsigned short caching; /* memory cache attribute */
-       unsigned short write_protect;   /* memory read/write attribute */
-       unsigned int enabled:1;
-};
-
-struct acpi_memory_device {
-       struct acpi_device * device;
-       unsigned int state;     /* State of the memory device */
-       struct list_head res_list;
-};
-
 static int acpi_hotmem_initialized;
 
 static acpi_status
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index e49c36d..833de75 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -154,4 +154,25 @@ static inline void 
unregister_hotplug_dock_device(acpi_handle handle)
 }
 #endif
 
+/*--------------------------------------------------------------------------
+                                Memory
+  -------------------------------------------------------------------------- */
+#if defined(CONFIG_ACPI_HOTPLUG_MEMORY) || \
+        defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
+struct acpi_memory_info {
+        struct list_head list;
+        u64 start_addr;         /* Memory Range start physical addr */
+        u64 length;             /* Memory Range length */
+        unsigned short caching; /* memory cache attribute */
+        unsigned short write_protect;   /* memory read/write attribute */
+        unsigned int enabled:1;
+};
+
+struct acpi_memory_device {
+        struct acpi_device *device;
+        unsigned int state;     /* State of the memory device */
+        struct list_head res_list;
+};
+#endif
+
 #endif /*__ACPI_DRIVERS_H__*/
-- 
1.6.5.6

Attachment: 0005-xen-acpi-Move-acpi_memory_info-definition-to-public.patch
Description: 0005-xen-acpi-Move-acpi_memory_info-definition-to-public.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.