The hw_info uAPI will support a bidirectional data_type field that can be used as an input field for user space to request for a specific info data. To prepare for the uAPI update, change the iommu layer first: - Add a new IOMMU_HW_INFO_TYPE_DEFAULT as an input, for which driver can output its only (or firstly) supported type - Update the kdoc accordingly - Roll out the type validation in the existing drivers
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -593,13 +593,15 @@ struct iommu_hw_info_arm_smmuv3 { · 592 unmodified lines | |||
| 593 | 593 | ||
| 594 | /** | 594 | /** |
| 595 | * enum iommu_hw_info_type - IOMMU Hardware Info Types | 595 | * enum iommu_hw_info_type - IOMMU Hardware Info Types |
| 596 | * @IOMMU_HW_INFO_TYPE_NONE: Used by the drivers that do not report hardware | 596 | * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware |
| 597 | * info | 597 | * info |
| 598 | * @IOMMU_HW_INFO_TYPE_DEFAULT: Input to request for a default type | ||
| 598 | * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type | 599 | * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type |
| 599 | * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type | 600 | * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type |
| 600 | */ | 601 | */ |
| 601 | enum iommu_hw_info_type { | 602 | enum iommu_hw_info_type { |
| 602 | IOMMU_HW_INFO_TYPE_NONE = 0, | 603 | IOMMU_HW_INFO_TYPE_NONE = 0, |
| 604 | IOMMU_HW_INFO_TYPE_DEFAULT = 0, | ||
| 603 | IOMMU_HW_INFO_TYPE_INTEL_VTD = 1, | 605 | IOMMU_HW_INFO_TYPE_INTEL_VTD = 1, |
| 604 | IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2, | 606 | IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2, |
| 605 | }; | 607 | }; |