Most importantly, anything Dom0 construction related can be __init.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -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;
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -40,7 +40,7 @@ static int iommu_populate_page_table(str
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);
--- a/xen/drivers/passthrough/vtd/ia64/vtd.c
+++ b/xen/drivers/passthrough/vtd/ia64/vtd.c
@@ -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);
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -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;
--- a/xen/drivers/passthrough/vtd/x86/ats.c
+++ b/xen/drivers/passthrough/vtd/x86/ats.c
@@ -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 LIST_HEAD(ats_devices);
static void parse_ats_param(char *s);
custom_param("ats", parse_ats_param);
-int ats_enabled = 1;
+int __read_mostly ats_enabled = 1;
-static void parse_ats_param(char *s)
+static void __init parse_ats_param(char *s)
{
char *ss;
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -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);
passthrough-sections.patch
Description: Text document
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|