iommu/vt-d: Expose struct svm_dev_ops without CONFIG_INTEL_IOMMU_SVM
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Oct 2015 23:36:08 +0000 (08:36 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Oct 2015 23:36:08 +0000 (08:36 +0900)
The point in providing an inline version of intel_svm_bind_mm() which
just returns -ENOSYS is that people are supposed to be able to *use* it
and just see that it fails. So we need to let them have a definition of
struct svm_dev_ops (and the flags) too.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
include/linux/intel-svm.h

index 0a48ccf..3c25794 100644 (file)
@@ -16,8 +16,6 @@
 #ifndef __INTEL_SVM_H__
 #define __INTEL_SVM_H__
 
-#ifdef CONFIG_INTEL_IOMMU_SVM
-
 struct device;
 
 struct svm_dev_ops {
@@ -55,6 +53,8 @@ struct svm_dev_ops {
  */
 #define SVM_FLAG_SUPERVISOR_MODE       (1<<1)
 
+#ifdef CONFIG_INTEL_IOMMU_SVM
+
 /**
  * intel_svm_bind_mm() - Bind the current process to a PASID
  * @dev:       Device to be granted acccess