|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [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
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 <=
|
|
|
|
|