mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API
@ 2024-07-04 10:22 Shivaprasad G Bhat
  2024-07-06 23:10 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Shivaprasad G Bhat @ 2024-07-04 10:22 UTC (permalink / raw)
  To: mpe, linuxppc-dev
  Cc: npiggin, christophe.leroy, gbatra, sbhat, jgg, ruscur,
	linux-kernel, tpearson, msuchanek, vaibhav

The patch fixes the below warning,
arch/powerpc/platforms/pseries/iommu.c:1824:37: warning: 'spapr_tce_table_group_ops' defined but not used [-Wunused-variable]

The other error reported by the test robot no longer exists on the top
of the tree due to later changes on the file.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407020357.Hz8kQkKf-lkp@intel.com/
Fixes: b09c031d9433 ("powerpc/iommu: Move pSeries specific functions to pseries/iommu.c")
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
---
 arch/powerpc/platforms/pseries/iommu.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 672199ba7400..534cd159e9ab 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -68,7 +68,9 @@ static struct iommu_table *iommu_pseries_alloc_table(int node)
 	return tbl;
 }
 
+#ifdef CONFIG_IOMMU_API
 static struct iommu_table_group_ops spapr_tce_table_group_ops;
+#endif
 
 static struct iommu_table_group *iommu_pseries_alloc_group(int node)
 {
@@ -165,6 +167,7 @@ static unsigned long tce_get_pseries(struct iommu_table *tbl, long index)
 	return be64_to_cpu(*tcep);
 }
 
+#ifdef CONFIG_IOMMU_API
 static long pseries_tce_iommu_userspace_view_alloc(struct iommu_table *tbl)
 {
 	unsigned long cb = ALIGN(sizeof(tbl->it_userspace[0]) * tbl->it_size, PAGE_SIZE);
@@ -183,6 +186,7 @@ static long pseries_tce_iommu_userspace_view_alloc(struct iommu_table *tbl)
 
 	return 0;
 }
+#endif
 
 static void tce_iommu_userspace_view_free(struct iommu_table *tbl)
 {
@@ -738,6 +742,7 @@ struct iommu_table_ops iommu_table_lpar_multi_ops = {
 	.free = tce_free_pSeries
 };
 
+#ifdef CONFIG_IOMMU_API
 /*
  * When the DMA window properties might have been removed,
  * the parent node has the table_group setup on it.
@@ -757,6 +762,7 @@ static struct device_node *pci_dma_find_parent_node(struct pci_dev *dev,
 
 	return NULL;
 }
+#endif
 
 /*
  * Find nearest ibm,dma-window (default DMA window) or direct DMA window or
@@ -1845,6 +1851,7 @@ static bool iommu_bypass_supported_pSeriesLP(struct pci_dev *pdev, u64 dma_mask)
 	return false;
 }
 
+#ifdef CONFIG_IOMMU_API
 /*
  * A simple iommu_table_group_ops which only allows reusing the existing
  * iommu_table. This handles VFIO for POWER7 or the nested KVM.
@@ -2327,6 +2334,7 @@ static struct iommu_table_group_ops spapr_tce_table_group_ops = {
 	.take_ownership = spapr_tce_take_ownership,
 	.release_ownership = spapr_tce_release_ownership,
 };
+#endif
 
 static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action,
 		void *data)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API
  2024-07-04 10:22 [PATCH] powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API Shivaprasad G Bhat
@ 2024-07-06 23:10 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2024-07-06 23:10 UTC (permalink / raw)
  To: mpe, linuxppc-dev, Shivaprasad G Bhat
  Cc: npiggin, christophe.leroy, gbatra, jgg, ruscur, linux-kernel,
	tpearson, msuchanek, vaibhav

On Thu, 04 Jul 2024 10:22:37 +0000, Shivaprasad G Bhat wrote:
> The patch fixes the below warning,
> arch/powerpc/platforms/pseries/iommu.c:1824:37: warning: 'spapr_tce_table_group_ops' defined but not used [-Wunused-variable]
> 
> The other error reported by the test robot no longer exists on the top
> of the tree due to later changes on the file.
> 
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API
      https://git.kernel.org/powerpc/c/af199e6ca29c77fb8fea9a78f18dfb165af37cd7

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-06 23:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-04 10:22 [PATCH] powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API Shivaprasad G Bhat
2024-07-06 23:10 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®