xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: add missing __ini annotations
@ 2010-05-04 15:52 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2010-05-04 15:52 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 3284 bytes --]

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-05-04.orig/xen/drivers/passthrough/amd/pci_amd_iommu.c	2009-10-29 12:24:49.000000000 +0100
+++ 2010-05-04/xen/drivers/passthrough/amd/pci_amd_iommu.c	2010-05-04 13:22:15.000000000 +0200
@@ -158,7 +158,7 @@ static void amd_iommu_setup_dom0_devices
     spin_unlock(&pcidevs_lock);
 }
 
-int amd_iov_detect(void)
+int __init amd_iov_detect(void)
 {
     INIT_LIST_HEAD(&amd_iommu_head);
 
--- 2010-05-04.orig/xen/drivers/passthrough/iommu.c	2010-03-18 14:53:21.000000000 +0100
+++ 2010-05-04/xen/drivers/passthrough/iommu.c	2010-05-04 13:22:15.000000000 +0200
@@ -277,7 +277,7 @@ int deassign_device(struct domain *d, u8
     return ret;
 }
 
-int iommu_setup(void)
+int __init iommu_setup(void)
 {
     int rc = -ENODEV;
 
--- 2010-05-04.orig/xen/drivers/passthrough/vtd/extern.h	2009-08-07 09:20:56.000000000 +0200
+++ 2010-05-04/xen/drivers/passthrough/vtd/extern.h	2010-05-04 13:22:15.000000000 +0200
@@ -48,7 +48,6 @@ struct iommu * ioapic_to_iommu(unsigned 
 struct acpi_drhd_unit * ioapic_to_drhd(unsigned int apic_id);
 struct acpi_drhd_unit * iommu_to_drhd(struct iommu *iommu);
 struct acpi_rhsa_unit * drhd_to_rhsa(struct acpi_drhd_unit *drhd);
-void clear_fault_bits(struct iommu *iommu);
 int ats_device(int seg, int bus, int devfn);
 int enable_ats_device(int seg, int bus, int devfn);
 int disable_ats_device(int seg, int bus, int devfn);
--- 2010-05-04.orig/xen/drivers/passthrough/vtd/iommu.c	2010-04-22 14:43:25.000000000 +0200
+++ 2010-05-04/xen/drivers/passthrough/vtd/iommu.c	2010-05-04 13:22:15.000000000 +0200
@@ -109,7 +109,7 @@ static int context_set_domain_id(struct 
     return 0;
 }
 
-static struct intel_iommu *alloc_intel_iommu(void)
+static struct intel_iommu *__init alloc_intel_iommu(void)
 {
     struct intel_iommu *intel;
 
@@ -124,7 +124,7 @@ static struct intel_iommu *alloc_intel_i
     return intel;
 }
 
-static void free_intel_iommu(struct intel_iommu *intel)
+static void __init free_intel_iommu(struct intel_iommu *intel)
 {
     xfree(intel);
 }
@@ -1037,7 +1037,7 @@ static int iommu_set_interrupt(struct io
     return irq;
 }
 
-static int iommu_alloc(struct acpi_drhd_unit *drhd)
+static int __init iommu_alloc(struct acpi_drhd_unit *drhd)
 {
     struct iommu *iommu;
     unsigned long sagaw, nr_dom;
@@ -1131,7 +1131,7 @@ static int iommu_alloc(struct acpi_drhd_
     return 0;
 }
 
-static void iommu_free(struct acpi_drhd_unit *drhd)
+static void __init iommu_free(struct acpi_drhd_unit *drhd)
 {
     struct iommu *iommu = drhd->iommu;
 
@@ -1779,7 +1779,7 @@ static void setup_dom0_devices(struct do
     spin_unlock(&pcidevs_lock);
 }
 
-void clear_fault_bits(struct iommu *iommu)
+static void clear_fault_bits(struct iommu *iommu)
 {
     u64 val;
     unsigned long flags;
@@ -1912,7 +1912,7 @@ static void setup_dom0_rmrr(struct domai
     spin_unlock(&pcidevs_lock);
 }
 
-static void platform_quirks(void)
+static void __init platform_quirks(void)
 {
     u32 id;
 
@@ -1925,7 +1925,7 @@ static void platform_quirks(void)
     }
 }
 
-int intel_vtd_setup(void)
+int __init intel_vtd_setup(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;




[-- Attachment #2: iommu-init-annotate.patch --]
[-- Type: text/plain, Size: 3278 bytes --]

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-05-04.orig/xen/drivers/passthrough/amd/pci_amd_iommu.c	2009-10-29 12:24:49.000000000 +0100
+++ 2010-05-04/xen/drivers/passthrough/amd/pci_amd_iommu.c	2010-05-04 13:22:15.000000000 +0200
@@ -158,7 +158,7 @@ static void amd_iommu_setup_dom0_devices
     spin_unlock(&pcidevs_lock);
 }
 
-int amd_iov_detect(void)
+int __init amd_iov_detect(void)
 {
     INIT_LIST_HEAD(&amd_iommu_head);
 
--- 2010-05-04.orig/xen/drivers/passthrough/iommu.c	2010-03-18 14:53:21.000000000 +0100
+++ 2010-05-04/xen/drivers/passthrough/iommu.c	2010-05-04 13:22:15.000000000 +0200
@@ -277,7 +277,7 @@ int deassign_device(struct domain *d, u8
     return ret;
 }
 
-int iommu_setup(void)
+int __init iommu_setup(void)
 {
     int rc = -ENODEV;
 
--- 2010-05-04.orig/xen/drivers/passthrough/vtd/extern.h	2009-08-07 09:20:56.000000000 +0200
+++ 2010-05-04/xen/drivers/passthrough/vtd/extern.h	2010-05-04 13:22:15.000000000 +0200
@@ -48,7 +48,6 @@ struct iommu * ioapic_to_iommu(unsigned 
 struct acpi_drhd_unit * ioapic_to_drhd(unsigned int apic_id);
 struct acpi_drhd_unit * iommu_to_drhd(struct iommu *iommu);
 struct acpi_rhsa_unit * drhd_to_rhsa(struct acpi_drhd_unit *drhd);
-void clear_fault_bits(struct iommu *iommu);
 int ats_device(int seg, int bus, int devfn);
 int enable_ats_device(int seg, int bus, int devfn);
 int disable_ats_device(int seg, int bus, int devfn);
--- 2010-05-04.orig/xen/drivers/passthrough/vtd/iommu.c	2010-04-22 14:43:25.000000000 +0200
+++ 2010-05-04/xen/drivers/passthrough/vtd/iommu.c	2010-05-04 13:22:15.000000000 +0200
@@ -109,7 +109,7 @@ static int context_set_domain_id(struct 
     return 0;
 }
 
-static struct intel_iommu *alloc_intel_iommu(void)
+static struct intel_iommu *__init alloc_intel_iommu(void)
 {
     struct intel_iommu *intel;
 
@@ -124,7 +124,7 @@ static struct intel_iommu *alloc_intel_i
     return intel;
 }
 
-static void free_intel_iommu(struct intel_iommu *intel)
+static void __init free_intel_iommu(struct intel_iommu *intel)
 {
     xfree(intel);
 }
@@ -1037,7 +1037,7 @@ static int iommu_set_interrupt(struct io
     return irq;
 }
 
-static int iommu_alloc(struct acpi_drhd_unit *drhd)
+static int __init iommu_alloc(struct acpi_drhd_unit *drhd)
 {
     struct iommu *iommu;
     unsigned long sagaw, nr_dom;
@@ -1131,7 +1131,7 @@ static int iommu_alloc(struct acpi_drhd_
     return 0;
 }
 
-static void iommu_free(struct acpi_drhd_unit *drhd)
+static void __init iommu_free(struct acpi_drhd_unit *drhd)
 {
     struct iommu *iommu = drhd->iommu;
 
@@ -1779,7 +1779,7 @@ static void setup_dom0_devices(struct do
     spin_unlock(&pcidevs_lock);
 }
 
-void clear_fault_bits(struct iommu *iommu)
+static void clear_fault_bits(struct iommu *iommu)
 {
     u64 val;
     unsigned long flags;
@@ -1912,7 +1912,7 @@ static void setup_dom0_rmrr(struct domai
     spin_unlock(&pcidevs_lock);
 }
 
-static void platform_quirks(void)
+static void __init platform_quirks(void)
 {
     u32 id;
 
@@ -1925,7 +1925,7 @@ static void platform_quirks(void)
     }
 }
 
-int intel_vtd_setup(void)
+int __init intel_vtd_setup(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-04 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 15:52 [PATCH] iommu: add missing __ini annotations Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).