* [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM
@ 2020-11-15 20:59 Lukas Bulwahn
2020-11-15 23:47 ` Lu Baolu
2020-11-17 23:24 ` Will Deacon
0 siblings, 2 replies; 3+ messages in thread
From: Lukas Bulwahn @ 2020-11-15 20:59 UTC (permalink / raw)
To: Liu Yi L, Jacob Pan, David Woodhouse, Lu Baolu, Joerg Roedel, iommu
Cc: Nick Desaulniers, Arnd Bergmann, Tom Rix, kernel-janitors,
linux-kernel, clang-built-linux, Lukas Bulwahn,
Nathan Chancellor
Commit 6ee1b77ba3ac ("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.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
applies cleanly on current master and next-20201113
Liu Yi L, Jakob Pan, Lu Baolu, please ack.
Joerg, please pick this minor non-urgent clean-up patch.
drivers/iommu/intel/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index c6622011d493..7b32703c0b47 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -5386,6 +5386,7 @@ static void intel_iommu_aux_detach_device(struct iommu_domain *domain,
aux_domain_remove_dev(to_dmar_domain(domain), dev);
}
+#ifdef CONFIG_INTEL_IOMMU_SVM
/*
* 2D array for converting and sanitizing IOMMU generic TLB granularity to
* VT-d granularity. Invalidation is typically included in the unmap operation
@@ -5432,7 +5433,6 @@ static inline u64 to_vtd_size(u64 granu_size, u64 nr_granules)
return order_base_2(nr_pages);
}
-#ifdef CONFIG_INTEL_IOMMU_SVM
static int
intel_iommu_sva_invalidate(struct iommu_domain *domain, struct device *dev,
struct iommu_cache_invalidate_info *inv_info)
--
2.17.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM
2020-11-15 20:59 [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM Lukas Bulwahn
@ 2020-11-15 23:47 ` Lu Baolu
2020-11-17 23:24 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Lu Baolu @ 2020-11-15 23:47 UTC (permalink / raw)
To: Lukas Bulwahn, Liu Yi L, Jacob Pan, David Woodhouse, Joerg Roedel, iommu
Cc: kernel-janitors, Arnd Bergmann, Tom Rix, Nick Desaulniers,
linux-kernel, clang-built-linux, Nathan Chancellor
On 2020/11/16 4:59, Lukas Bulwahn wrote:
> Commit 6ee1b77ba3ac ("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.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Fixes: 6ee1b77ba3ac0 ("iommu/vt-d: Add svm/sva invalidate function")
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Best regards,
baolu
> ---
> applies cleanly on current master and next-20201113
>
> Liu Yi L, Jakob Pan, Lu Baolu, please ack.
>
> Joerg, please pick this minor non-urgent clean-up patch.
>
> drivers/iommu/intel/iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index c6622011d493..7b32703c0b47 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -5386,6 +5386,7 @@ static void intel_iommu_aux_detach_device(struct iommu_domain *domain,
> aux_domain_remove_dev(to_dmar_domain(domain), dev);
> }
>
> +#ifdef CONFIG_INTEL_IOMMU_SVM
> /*
> * 2D array for converting and sanitizing IOMMU generic TLB granularity to
> * VT-d granularity. Invalidation is typically included in the unmap operation
> @@ -5432,7 +5433,6 @@ static inline u64 to_vtd_size(u64 granu_size, u64 nr_granules)
> return order_base_2(nr_pages);
> }
>
> -#ifdef CONFIG_INTEL_IOMMU_SVM
> static int
> intel_iommu_sva_invalidate(struct iommu_domain *domain, struct device *dev,
> struct iommu_cache_invalidate_info *inv_info)
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM
2020-11-15 20:59 [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM Lukas Bulwahn
2020-11-15 23:47 ` Lu Baolu
@ 2020-11-17 23:24 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2020-11-17 23:24 UTC (permalink / raw)
To: Lu Baolu, Joerg Roedel, Liu Yi L, David Woodhouse, iommu,
Lukas Bulwahn, Jacob Pan
Cc: kernel-janitors, Arnd Bergmann, Will Deacon, catalin.marinas,
Nick Desaulniers, linux-kernel, clang-built-linux, Tom Rix,
Nathan Chancellor, kernel-team
On Sun, 15 Nov 2020 21:59:51 +0100, Lukas Bulwahn wrote:
> Commit 6ee1b77ba3ac ("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.
>
> [...]
Applied to arm64 (for-next/iommu/vt-d), thanks!
[1/1] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM
https://git.kernel.org/arm64/c/68dd9d89eaf5
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-17 23:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 20:59 [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM Lukas Bulwahn
2020-11-15 23:47 ` Lu Baolu
2020-11-17 23:24 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).