iommu/vt-d: Introduce helper function dmar_walk_resources()
[cascardo/linux.git] / drivers / iommu / intel-iommu.c
index a27d6cb..b9cc9c2 100644 (file)
@@ -195,6 +195,7 @@ static inline void set_root_present(struct root_entry *root)
 }
 static inline void set_root_value(struct root_entry *root, unsigned long value)
 {
+       root->val &= ~VTD_PAGE_MASK;
        root->val |= value & VTD_PAGE_MASK;
 }
 
@@ -247,6 +248,7 @@ static inline void context_set_translation_type(struct context_entry *context,
 static inline void context_set_address_root(struct context_entry *context,
                                            unsigned long value)
 {
+       context->lo &= ~VTD_PAGE_MASK;
        context->lo |= value & VTD_PAGE_MASK;
 }
 
@@ -3682,7 +3684,7 @@ static inline void init_iommu_pm_ops(void) {}
 #endif /* CONFIG_PM */
 
 
-int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header)
+int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
 {
        struct acpi_dmar_reserved_memory *rmrr;
        struct dmar_rmrr_unit *rmrru;
@@ -3708,7 +3710,7 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header)
        return 0;
 }
 
-int __init dmar_parse_one_atsr(struct acpi_dmar_header *hdr)
+int __init dmar_parse_one_atsr(struct acpi_dmar_header *hdr, void *arg)
 {
        struct acpi_dmar_atsr *atsr;
        struct dmar_atsr_unit *atsru;