]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Sun, 15 Nov 2020 20:59:51 +0000 (21:59 +0100)
committerWill Deacon <will@kernel.org>
Tue, 17 Nov 2020 22:29:49 +0000 (22:29 +0000)
commit0d2dc56595da1905f8846a14ab1c0011a469e1b8
tree5feb1672dc3f8f5d998d90ea440121d452dfe6dc
parentc264010cc5c3df68366b65702bff545bebd1b7d0
iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM

Commit d5f141ee3a13 ("iommu/vt-d: Add svm/sva invalidate function")
introduced intel_iommu_sva_invalidate() when CONFIG_INTEL_IOMMU_SVM.
This function uses the dedicated static variable inv_type_granu_table
and functions to_vtd_granularity() and to_vtd_size().

These parts are unused when !CONFIG_INTEL_IOMMU_SVM, and hence,
make CC=clang W=1 warns with an -Wunused-function warning.

Include these parts conditionally on CONFIG_INTEL_IOMMU_SVM.

Fixes: d5f141ee3a13 ("iommu/vt-d: Add svm/sva invalidate function")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20201115205951.20698-1-lukas.bulwahn@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/intel/iommu.c