VT-d: section adjustments to DMAR parsing code
authorJan Beulich <jbeulich@novell.com>
Wed, 9 Mar 2011 16:22:40 +0000 (16:22 +0000)
committerJan Beulich <jbeulich@novell.com>
Wed, 9 Mar 2011 16:22:40 +0000 (16:22 +0000)
Move whatever possible into .init.*, and some data items into
.data.read_mostly.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/vtd/dmar.c
xen/drivers/passthrough/vtd/dmar.h
xen/include/xen/list.h

index 0bc10ba0479b7e8ddad6adce0ababb5dcabf83dd..1046c331a37e8bf5c113d203f82b1dce6ad2323c 100644 (file)
 #define MIN_SCOPE_LEN (sizeof(struct acpi_pci_path) + \
                        sizeof(struct acpi_dev_scope))
 
-LIST_HEAD(acpi_drhd_units);
-LIST_HEAD(acpi_rmrr_units);
-LIST_HEAD(acpi_atsr_units);
-LIST_HEAD(acpi_rhsa_units);
+LIST_HEAD_READ_MOSTLY(acpi_drhd_units);
+LIST_HEAD_READ_MOSTLY(acpi_rmrr_units);
+static LIST_HEAD_READ_MOSTLY(acpi_atsr_units);
+static LIST_HEAD_READ_MOSTLY(acpi_rhsa_units);
 
-static u64 igd_drhd_address;
-u8 dmar_host_address_width;
+static u64 __read_mostly igd_drhd_address;
 
 void dmar_scope_add_buses(struct dmar_scope *scope, u16 sec_bus, u16 sub_bus)
 {
@@ -679,6 +678,7 @@ static int __init acpi_parse_dmar(struct acpi_table_header *table)
 {
     struct acpi_table_dmar *dmar;
     struct acpi_dmar_entry_header *entry_header;
+    u8 dmar_host_address_width;
     int ret = 0;
 
     dmar = (struct acpi_table_dmar *)table;
index e0c0fff85479c35137f48421f9443cd5ce89f6c6..427f55a01b48c7fe83dd03ac4cd4f091c92a9732 100644 (file)
@@ -24,8 +24,6 @@
 #include <xen/list.h>
 #include <xen/iommu.h>
 
-extern u8 dmar_host_address_width;
-
 /* This one is for interrupt remapping */
 struct acpi_ioapic_unit {
     struct list_head list;
index 619128fcd3a7f46dad6b45a7ae29ffd6464b0af0..b87682f53642a780d86b93a3034bf98921ca56ac 100644 (file)
@@ -36,6 +36,9 @@ struct list_head {
 #define LIST_HEAD(name) \
     struct list_head name = LIST_HEAD_INIT(name)
 
+#define LIST_HEAD_READ_MOSTLY(name) \
+    struct list_head __read_mostly name = LIST_HEAD_INIT(name)
+
 static inline void INIT_LIST_HEAD(struct list_head *list)
 {
     list->next = list;