diff options
author | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2011-11-23 13:42:14 -0500 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-12-16 11:49:57 -0500 |
commit | 8bc1f85c02a20a59956b00b3acea12c04dce9ae8 (patch) | |
tree | 259cc3a7b192afbde9c4b2bf066f0e1a3e4b3999 | |
parent | 522200858093a6f31af9830672109f6d9807dd1e (diff) |
iommu: Export intel_iommu_enabled to signal when iommu is in use
In i915 driver, we do not enable either rc6 or semaphores on SNB when dmar
is enabled. The new 'intel_iommu_enabled' variable signals when the
iommu code is in operation.
Cc: Ted Phelps <phelps@gnusto.com>
Cc: Peter <pab1612@gmail.com>
Cc: Lukas Hejtmanek <xhejtman@fi.muni.cz>
Cc: Andrew Lutomirski <luto@mit.edu>
CC: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | drivers/iommu/intel-iommu.c | 5 | ||||
-rw-r--r-- | include/linux/dma_remapping.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c0c7820d4c46..8dc19b8f5d45 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -405,6 +405,9 @@ int dmar_disabled = 0; | |||
405 | int dmar_disabled = 1; | 405 | int dmar_disabled = 1; |
406 | #endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/ | 406 | #endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/ |
407 | 407 | ||
408 | int intel_iommu_enabled = 0; | ||
409 | EXPORT_SYMBOL_GPL(intel_iommu_enabled); | ||
410 | |||
408 | static int dmar_map_gfx = 1; | 411 | static int dmar_map_gfx = 1; |
409 | static int dmar_forcedac; | 412 | static int dmar_forcedac; |
410 | static int intel_iommu_strict; | 413 | static int intel_iommu_strict; |
@@ -3647,6 +3650,8 @@ int __init intel_iommu_init(void) | |||
3647 | 3650 | ||
3648 | bus_register_notifier(&pci_bus_type, &device_nb); | 3651 | bus_register_notifier(&pci_bus_type, &device_nb); |
3649 | 3652 | ||
3653 | intel_iommu_enabled = 1; | ||
3654 | |||
3650 | return 0; | 3655 | return 0; |
3651 | } | 3656 | } |
3652 | 3657 | ||
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h index ef90cbd8e173..57c9a8ae4f2d 100644 --- a/include/linux/dma_remapping.h +++ b/include/linux/dma_remapping.h | |||
@@ -31,6 +31,7 @@ extern void free_dmar_iommu(struct intel_iommu *iommu); | |||
31 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); | 31 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); |
32 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); | 32 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); |
33 | extern int dmar_disabled; | 33 | extern int dmar_disabled; |
34 | extern int intel_iommu_enabled; | ||
34 | #else | 35 | #else |
35 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) | 36 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) |
36 | { | 37 | { |
@@ -44,6 +45,7 @@ static inline void free_dmar_iommu(struct intel_iommu *iommu) | |||
44 | { | 45 | { |
45 | } | 46 | } |
46 | #define dmar_disabled (1) | 47 | #define dmar_disabled (1) |
48 | #define intel_iommu_enabled (0) | ||
47 | #endif | 49 | #endif |
48 | 50 | ||
49 | 51 | ||