diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-11-09 09:47:56 -0500 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-11-18 05:18:35 -0500 |
commit | c2a0b538d2c778aef7bf2fbe7973229192c9a392 (patch) | |
tree | 43fb6451526e573d70bd29cca9f2bef286b5a0ee /include/linux/dmar.h | |
parent | 1a2262f90f493103496f3383741fb5d594c33738 (diff) |
iommu/vt-d: Introduce helper function dmar_walk_resources()
Introduce helper function dmar_walk_resources to walk resource entries
in DMAR table and ACPI buffer object returned by ACPI _DSM method
for IOMMU hot-plug.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/dmar.h')
-rw-r--r-- | include/linux/dmar.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 593fff99e6bf..495df5e48f80 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -121,22 +121,21 @@ extern int dmar_remove_dev_scope(struct dmar_pci_notify_info *info, | |||
121 | extern int detect_intel_iommu(void); | 121 | extern int detect_intel_iommu(void); |
122 | extern int enable_drhd_fault_handling(void); | 122 | extern int enable_drhd_fault_handling(void); |
123 | 123 | ||
124 | static inline int dmar_res_noop(struct acpi_dmar_header *hdr, void *arg) | ||
125 | { | ||
126 | return 0; | ||
127 | } | ||
128 | |||
124 | #ifdef CONFIG_INTEL_IOMMU | 129 | #ifdef CONFIG_INTEL_IOMMU |
125 | extern int iommu_detected, no_iommu; | 130 | extern int iommu_detected, no_iommu; |
126 | extern int intel_iommu_init(void); | 131 | extern int intel_iommu_init(void); |
127 | extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header); | 132 | extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg); |
128 | extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); | 133 | extern int dmar_parse_one_atsr(struct acpi_dmar_header *header, void *arg); |
129 | extern int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info); | 134 | extern int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info); |
130 | #else /* !CONFIG_INTEL_IOMMU: */ | 135 | #else /* !CONFIG_INTEL_IOMMU: */ |
131 | static inline int intel_iommu_init(void) { return -ENODEV; } | 136 | static inline int intel_iommu_init(void) { return -ENODEV; } |
132 | static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header) | 137 | #define dmar_parse_one_rmrr dmar_res_noop |
133 | { | 138 | #define dmar_parse_one_atsr dmar_res_noop |
134 | return 0; | ||
135 | } | ||
136 | static inline int dmar_parse_one_atsr(struct acpi_dmar_header *header) | ||
137 | { | ||
138 | return 0; | ||
139 | } | ||
140 | static inline int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info) | 139 | static inline int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info) |
141 | { | 140 | { |
142 | return 0; | 141 | return 0; |