]> xenbits.xensource.com Git - xen.git/commitdiff
amd-iommu: __init-annotate
authorJan Beulich <jbeulich@novell.com>
Sat, 2 Apr 2011 14:57:35 +0000 (15:57 +0100)
committerJan Beulich <jbeulich@novell.com>
Sat, 2 Apr 2011 14:57:35 +0000 (15:57 +0100)
Besides marking a few more items __init/__initdata, use the recently
introduced .init.o mechanism to move all the literal strings into
.init.rodata in those files that consist of only contributions to
.init.*.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/amd/Makefile
xen/drivers/passthrough/amd/iommu_acpi.c
xen/drivers/passthrough/amd/iommu_detect.c
xen/drivers/passthrough/amd/iommu_init.c

index 48bd305c06f88387058e21afe36928342d2cf151..687bc8ec6f366faf23664c55eb5ef92e56a995be 100644 (file)
@@ -1,6 +1,6 @@
-obj-y += iommu_detect.o
+obj-bin-y += iommu_detect.init.o
 obj-y += iommu_init.o
 obj-y += iommu_map.o
 obj-y += pci_amd_iommu.o
-obj-y += iommu_acpi.o
+obj-bin-y += iommu_acpi.init.o
 obj-y += iommu_intr.o
index 8e0868fabd1b332b93b330ef03d4a1d92750c6f4..57a4c16ddec4cd0042bc9d433fc52bbb2a4ddf28 100644 (file)
 extern unsigned long amd_iommu_page_entries;
 extern unsigned short ivrs_bdf_entries;
 extern struct ivrs_mappings *ivrs_mappings;
-extern unsigned short last_bdf;
 extern int ioapic_bdf[MAX_IO_APICS];
 extern void *shared_intremap_table;
 
-static void add_ivrs_mapping_entry(
+static unsigned short __initdata last_bdf;
+
+static void __init add_ivrs_mapping_entry(
     u16 bdf, u16 alias_id, u8 flags, struct amd_iommu *iommu)
 {
     u8 sys_mgt, lint1_pass, lint0_pass, nmi_pass, ext_int_pass, init_pass;
index a98bef586cbb7390787996200bddbedd960e09c7..164a6aeb9adbda201bff77ec6f54cf63a679ccdb 100644 (file)
@@ -27,8 +27,6 @@
 #include <asm/hvm/svm/amd-iommu-proto.h>
 #include <asm/hvm/svm/amd-iommu-acpi.h>
 
-unsigned short last_bdf = 0;
-
 static int __init get_iommu_msi_capabilities(u8 bus, u8 dev, u8 func,
             struct amd_iommu *iommu)
 {
index a65c9d587ce3d68dbb4ffaac36f09d80d68e6e46..dc88c021d994c59f909077ec191c817ed526694b 100644 (file)
 #include <asm-x86/fixmap.h>
 #include <mach_apic.h>
 
-static struct amd_iommu **irq_to_iommu;
-static int nr_amd_iommus;
-static long amd_iommu_cmd_buffer_entries = IOMMU_CMD_BUFFER_DEFAULT_ENTRIES;
-static long amd_iommu_event_log_entries = IOMMU_EVENT_LOG_DEFAULT_ENTRIES;
+static struct amd_iommu **__read_mostly irq_to_iommu;
+static int __initdata nr_amd_iommus;
 
 unsigned short ivrs_bdf_entries;
 struct ivrs_mappings *ivrs_mappings;
@@ -629,8 +627,8 @@ static int __init allocate_cmd_buffer(struct amd_iommu *iommu)
     iommu->cmd_buffer_tail = 0;
     iommu->cmd_buffer.alloc_size = PAGE_SIZE <<
                                    get_order_from_bytes(
-                                   PAGE_ALIGN(amd_iommu_cmd_buffer_entries *
-                                   IOMMU_CMD_BUFFER_ENTRY_SIZE));
+                                   PAGE_ALIGN(IOMMU_CMD_BUFFER_DEFAULT_ENTRIES
+                                              * IOMMU_CMD_BUFFER_ENTRY_SIZE));
     iommu->cmd_buffer.entries = iommu->cmd_buffer.alloc_size /
                                 IOMMU_CMD_BUFFER_ENTRY_SIZE;
 
@@ -643,7 +641,7 @@ static int __init allocate_event_log(struct amd_iommu *iommu)
     iommu->event_log_head = 0;
     iommu->event_log.alloc_size = PAGE_SIZE <<
                                   get_order_from_bytes(
-                                  PAGE_ALIGN(amd_iommu_event_log_entries *
+                                  PAGE_ALIGN(IOMMU_EVENT_LOG_DEFAULT_ENTRIES *
                                   IOMMU_EVENT_LOG_ENTRY_SIZE));
     iommu->event_log.entries = iommu->event_log.alloc_size /
                                IOMMU_EVENT_LOG_ENTRY_SIZE;