diff options
Diffstat (limited to 'include/linux/dmar.h')
| -rw-r--r-- | include/linux/dmar.h | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index d81a51978d01..8917a32173c4 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h @@ -65,6 +65,7 @@ struct dmar_pci_notify_info {  extern struct rw_semaphore dmar_global_lock;  extern struct list_head dmar_drhd_units; +extern int intel_iommu_enabled;  #define for_each_drhd_unit(drhd)					\  	list_for_each_entry_rcu(drhd, &dmar_drhd_units, list,		\ @@ -88,7 +89,8 @@ extern struct list_head dmar_drhd_units;  static inline bool dmar_rcu_check(void)  {  	return rwsem_is_locked(&dmar_global_lock) || -	       system_state == SYSTEM_BOOTING; +	       system_state == SYSTEM_BOOTING || +	       (IS_ENABLED(CONFIG_INTEL_IOMMU) && !intel_iommu_enabled);  }  #define	dmar_rcu_dereference(p)	rcu_dereference_check((p), dmar_rcu_check())  | 
