# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1290173014 0
# Node ID b0cd945b39b45d438803b8a7af8422f2bc462710
# Parent d272ae0cb1a07c59f5db0ad0e96061255717184d
iommu: adjust section annotations in pass-through code
Most importantly, anything Dom0 construction related can be __init.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
xen/drivers/passthrough/amd/pci_amd_iommu.c | 4 ++--
xen/drivers/passthrough/iommu.c | 4 ++--
xen/drivers/passthrough/vtd/ia64/vtd.c | 6 +++---
xen/drivers/passthrough/vtd/iommu.c | 6 +++---
xen/drivers/passthrough/vtd/x86/ats.c | 8 ++++----
xen/drivers/passthrough/vtd/x86/vtd.c | 4 ++--
6 files changed, 16 insertions(+), 16 deletions(-)
diff -r d272ae0cb1a0 -r b0cd945b39b4 xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c Fri Nov 19 13:21:09
2010 +0000
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c Fri Nov 19 13:23:34
2010 +0000
@@ -117,7 +117,7 @@ static void amd_iommu_setup_domain_devic
spin_unlock_irqrestore(&iommu->lock, flags);
}
-static void amd_iommu_setup_dom0_devices(struct domain *d)
+static void __init amd_iommu_setup_dom0_devices(struct domain *d)
{
struct amd_iommu *iommu;
struct pci_dev *pdev;
@@ -232,7 +232,7 @@ static int amd_iommu_domain_init(struct
return 0;
}
-static void amd_iommu_dom0_init(struct domain *d)
+static void __init amd_iommu_dom0_init(struct domain *d)
{
unsigned long i;
diff -r d272ae0cb1a0 -r b0cd945b39b4 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c Fri Nov 19 13:21:09 2010 +0000
+++ b/xen/drivers/passthrough/iommu.c Fri Nov 19 13:23:34 2010 +0000
@@ -40,7 +40,7 @@ custom_param("iommu", parse_iommu_param)
custom_param("iommu", parse_iommu_param);
bool_t __read_mostly iommu_enabled = 1;
bool_t __read_mostly force_iommu;
-bool_t __read_mostly iommu_dom0_strict;
+bool_t __initdata iommu_dom0_strict;
bool_t __read_mostly iommu_verbose;
bool_t __read_mostly iommu_workaround_bios_bug;
bool_t __read_mostly iommu_passthrough;
@@ -102,7 +102,7 @@ int iommu_domain_init(struct domain *d)
return hd->platform_ops->init(d);
}
-void iommu_dom0_init(struct domain *d)
+void __init iommu_dom0_init(struct domain *d)
{
struct hvm_iommu *hd = domain_hvm_iommu(d);
diff -r d272ae0cb1a0 -r b0cd945b39b4 xen/drivers/passthrough/vtd/ia64/vtd.c
--- a/xen/drivers/passthrough/vtd/ia64/vtd.c Fri Nov 19 13:21:09 2010 +0000
+++ b/xen/drivers/passthrough/vtd/ia64/vtd.c Fri Nov 19 13:23:34 2010 +0000
@@ -92,8 +92,8 @@ void hvm_dpci_isairq_eoi(struct domain *
/* dummy */
}
-static int do_dom0_iommu_mapping(unsigned long start, unsigned long end,
- void *arg)
+static int __init do_dom0_iommu_mapping(unsigned long start,
+ unsigned long end, void *arg)
{
unsigned long tmp, pfn, j, page_addr = start;
struct domain *d = (struct domain *)arg;
@@ -120,7 +120,7 @@ static int do_dom0_iommu_mapping(unsigne
return 0;
}
-void iommu_set_dom0_mapping(struct domain *d)
+void __init iommu_set_dom0_mapping(struct domain *d)
{
if (dom0)
BUG_ON(d != dom0);
diff -r d272ae0cb1a0 -r b0cd945b39b4 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c Fri Nov 19 13:21:09 2010 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.c Fri Nov 19 13:23:34 2010 +0000
@@ -1231,7 +1231,7 @@ static int intel_iommu_domain_init(struc
return 0;
}
-static void intel_iommu_dom0_init(struct domain *d)
+static void __init intel_iommu_dom0_init(struct domain *d)
{
struct acpi_drhd_unit *drhd;
@@ -1826,7 +1826,7 @@ static int intel_iommu_remove_device(str
return domain_context_unmap(pdev->domain, pdev->bus, pdev->devfn);
}
-static void setup_dom0_devices(struct domain *d)
+static void __init setup_dom0_devices(struct domain *d)
{
struct pci_dev *pdev;
int bus, devfn;
@@ -1961,7 +1961,7 @@ static int init_vtd_hw(void)
return 0;
}
-static void setup_dom0_rmrr(struct domain *d)
+static void __init setup_dom0_rmrr(struct domain *d)
{
struct acpi_rmrr_unit *rmrr;
u16 bdf;
diff -r d272ae0cb1a0 -r b0cd945b39b4 xen/drivers/passthrough/vtd/x86/ats.c
--- a/xen/drivers/passthrough/vtd/x86/ats.c Fri Nov 19 13:21:09 2010 +0000
+++ b/xen/drivers/passthrough/vtd/x86/ats.c Fri Nov 19 13:23:34 2010 +0000
@@ -28,7 +28,7 @@
#include "../vtd.h"
#include "../extern.h"
-LIST_HEAD(ats_dev_drhd_units);
+static LIST_HEAD(ats_dev_drhd_units);
#define ATS_REG_CAP 4
#define ATS_REG_CTL 6
@@ -47,9 +47,9 @@ static void parse_ats_param(char *s);
static void parse_ats_param(char *s);
custom_param("ats", parse_ats_param);
-int ats_enabled = 1;
-
-static void parse_ats_param(char *s)
+int __read_mostly ats_enabled = 1;
+
+static void __init parse_ats_param(char *s)
{
char *ss;
diff -r d272ae0cb1a0 -r b0cd945b39b4 xen/drivers/passthrough/vtd/x86/vtd.c
--- a/xen/drivers/passthrough/vtd/x86/vtd.c Fri Nov 19 13:21:09 2010 +0000
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c Fri Nov 19 13:23:34 2010 +0000
@@ -34,7 +34,7 @@
* iommu_inclusive_mapping: when set, all memory below 4GB is included in dom0
* 1:1 iommu mappings except xen and unusable regions.
*/
-static int iommu_inclusive_mapping = 1;
+static int __read_mostly iommu_inclusive_mapping = 1;
boolean_param("iommu_inclusive_mapping", iommu_inclusive_mapping);
void *map_vtd_domain_page(u64 maddr)
@@ -127,7 +127,7 @@ void hvm_dpci_isairq_eoi(struct domain *
spin_unlock(&d->event_lock);
}
-void iommu_set_dom0_mapping(struct domain *d)
+void __init iommu_set_dom0_mapping(struct domain *d)
{
u64 i, j, tmp, max_pfn;
extern int xen_in_range(unsigned long mfn);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|