WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Move acpi memory infor definition to public

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "Brown, Len" <len.brown@xxxxxxxxx>
Subject: [Xen-devel] [PATCH] Move acpi memory infor definition to public
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Tue, 22 Dec 2009 19:29:38 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Dec 2009 03:30:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqC+gurgx7Dk0moQUOk4kit/stFQQ==
Thread-topic: [PATCH] Move acpi memory infor definition to public
This is the updated version based on Konrad's feedback.
Difference with previous submit: 1) Move it to acpi_driver.h, instead of acpi.h 
2) Under CONFIG_ACPI_HOTPLUG_MEMORY ifdef.
Tested with CONFIG_ACPI_HOTPLUG_MEMORY as both module and yes.

--jyh

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

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>
---
 drivers/acpi/acpi_memhotplug.c |   15 ---------------
 include/acpi/acpi_drivers.h    |   20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 9a62224..50e17c7 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -72,21 +72,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 f4906f6..6992fd6 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -154,4 +154,24 @@ static inline void 
unregister_hotplug_dock_device(acpi_handle handle)
 }
 #endif
 
+/*--------------------------------------------------------------------------
+                               Memory
+  -------------------------------------------------------------------------- */
+#if defined(CONFIG_ACPI_HOTPLUG_MEMORY) || (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.5.3.8



Attachment: 0001-Move-acpi_memory_info-definition-to-public.patch
Description: 0001-Move-acpi_memory_info-definition-to-public.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Move acpi memory infor definition to public, Jiang, Yunhong <=