linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the iommu tree
@ 2011-08-29  3:32 Stephen Rothwell
  2011-08-29  5:11 ` Ohad Ben-Cohen
  2011-08-29  8:36 ` Joerg Roedel
  0 siblings, 2 replies; 25+ messages in thread
From: Stephen Rothwell @ 2011-08-29  3:32 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-next, linux-kernel, Ohad Ben-Cohen

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

Hi Joerg,

After merging the iommu tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/iommu/omap-iommu.c:27:24: fatal error: plat/iommu.h: No such file or directory

Caused by commit fcf3a6ef4a58 ("omap: iommu/iovmm: move to dedicated
iommu folder").  Presumably building of this code should be restricted to
just some platforms only.

I have dropped the iommu tree for today (since I have no older working
version).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2011-12-15  4:40 Stephen Rothwell
  2011-12-15 10:09 ` Joerg Roedel
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2011-12-15  4:40 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-next, linux-kernel, Alex Williamson, Jesse Barnes

[-- Attachment #1: Type: text/plain, Size: 2746 bytes --]

Hi Joerg,

After merging the iommu tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/iommu/amd_iommu.c: In function 'pci_iommuv2_capable':
drivers/iommu/amd_iommu.c:179:3: error: 'PCI_PRI_CAP' undeclared (first use in this function)
drivers/iommu/amd_iommu.c:180:3: error: 'PCI_PASID_CAP' undeclared (first use in this function)
drivers/iommu/amd_iommu.c: In function 'pri_reset_while_enabled':
drivers/iommu/amd_iommu.c:1981:38: error: 'PCI_PRI_CAP' undeclared (first use in this function)
drivers/iommu/amd_iommu.c:1981:2: warning: passing argument 2 of 'pci_find_ext_capability' makes integer from pointer without a cast [enabled by default]
include/linux/pci.h:712:5: note: expected 'int' but argument is of type 'const int *'
drivers/iommu/amd_iommu.c: In function 'pci_pri_tlp_required':
drivers/iommu/amd_iommu.c:2045:38: error: 'PCI_PRI_CAP' undeclared (first use in this function)
drivers/iommu/amd_iommu.c:2045:2: warning: passing argument 2 of 'pci_find_ext_capability' makes integer from pointer without a cast [enabled by default]
include/linux/pci.h:712:5: note: expected 'int' but argument is of type 'const int *'

Caused by commit 56288ab6e949 ("PCI: Fix PRI and PASID consistency") from
the pci tree interacting with various commits from the iommu tree.

I have added the following merge fix patch (and can carry it as
necessary).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 15 Dec 2011 15:35:23 +1100
Subject: [PATCH] iommu: fix for pci identifier changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/iommu/amd_iommu.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 32fc99c..b1f155e 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -176,8 +176,8 @@ static bool pci_iommuv2_capable(struct pci_dev *pdev)
 {
 	static const int caps[] = {
 		PCI_EXT_CAP_ID_ATS,
-		PCI_PRI_CAP,
-		PCI_PASID_CAP,
+		PCI_EXT_CAP_ID_PRI,
+		PCI_EXT_CAP_ID_PASID,
 	};
 	int i, pos;
 
@@ -1978,7 +1978,7 @@ static int pri_reset_while_enabled(struct pci_dev *pdev)
 	u16 control;
 	int pos;
 
-	pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+	pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
 	if (!pos)
 		return -EINVAL;
 
@@ -2042,7 +2042,7 @@ bool pci_pri_tlp_required(struct pci_dev *pdev)
 	u16 control;
 	int pos;
 
-	pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+	pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
 	if (!pos)
 		return false;
 
-- 
1.7.7.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2014-07-08  4:02 Stephen Rothwell
  2014-07-08  4:12 ` Alex Williamson
  2014-07-08 11:20 ` Joerg Roedel
  0 siblings, 2 replies; 25+ messages in thread
From: Stephen Rothwell @ 2014-07-08  4:02 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-next, linux-kernel, Alex Williamson

[-- Attachment #1: Type: text/plain, Size: 1857 bytes --]

Hi Joerg,

After merging the iommu tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/platforms/built-in.o:(.opd+0x29e8): multiple definition of `iommu_device_destroy'
arch/powerpc/kernel/built-in.o:(.opd+0x5628): first defined here
arch/powerpc/platforms/built-in.o: In function `.iommu_device_unlink':
(.text+0x13240): multiple definition of `.iommu_device_unlink'
arch/powerpc/kernel/built-in.o:(.text+0x2b240): first defined here
arch/powerpc/platforms/built-in.o: In function `.iommu_device_create':
(.text+0x13210): multiple definition of `.iommu_device_create'
arch/powerpc/kernel/built-in.o:(.text+0x2b210): first defined here
arch/powerpc/platforms/built-in.o: In function `.iommu_device_destroy':
(.text+0x13220): multiple definition of `.iommu_device_destroy'
arch/powerpc/kernel/built-in.o:(.text+0x2b220): first defined here
arch/powerpc/platforms/built-in.o: In function `.iommu_device_link':
(.text+0x13230): multiple definition of `.iommu_device_link'
arch/powerpc/kernel/built-in.o:(.text+0x2b230): first defined here
arch/powerpc/platforms/built-in.o:(.opd+0x2a00): multiple definition of `iommu_device_link'
arch/powerpc/kernel/built-in.o:(.opd+0x5640): first defined here
arch/powerpc/platforms/built-in.o:(.opd+0x2a18): multiple definition of `iommu_device_unlink'
arch/powerpc/kernel/built-in.o:(.opd+0x5658): first defined here
arch/powerpc/platforms/built-in.o:(.opd+0x29d0): multiple definition of `iommu_device_create'
arch/powerpc/kernel/built-in.o:(.opd+0x5610): first defined here

Caused by commit c61959ecbbc6 ("iommu: Add sysfs support for IOMMUs").
CONFIG_IOMMU_API is not set for this build.  Forgotten "static
inline"s :-(

I have used the iommu tree from next-20140707 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2014-11-05  2:47 Stephen Rothwell
  2014-11-05 11:16 ` Joerg Roedel
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2014-11-05  2:47 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-next, linux-kernel, Olav Haugan, ppc-dev

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

Hi Joerg,

After merging the iommu tree, today's linux-next build (powerpc
pc64_defconfig) failed like this:

In file included from arch/powerpc/platforms/powernv/pci.c:33:0:
arch/powerpc/include/asm/iommu.h:140:12: error: conflicting types for 'iommu_map_sg'
 extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
            ^
In file included from arch/powerpc/platforms/powernv/pci.c:23:0:
include/linux/iommu.h:311:22: note: previous definition of 'iommu_map_sg' was here
 static inline size_t iommu_map_sg(struct iommu_domain *domain,
                      ^

Caused by commit 315786ebbf4a ("iommu: Add iommu_map_sg() function").
Grep is your friend ...

I have used the iommu tree from next-20141104 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2015-11-01 11:42 Stephen Rothwell
  2015-11-01 15:14 ` Joerg Roedel
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2015-11-01 11:42 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-next, linux-kernel, Magnus Damm

Hi Joerg,

After merging the iommu tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/iommu/ipmmu-vmsa.c:24:27: fatal error: asm/dma-iommu.h: No such file or directory

Caused by commit

  bad78b13e305 ("iommu/ipmmu-vmsa: Drop LPAE Kconfig dependency")

Only arm has the include file ...

I have used the iommu tree from next-20151022 for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2019-09-02  6:39 Stephen Rothwell
  2019-09-02 14:03 ` Joerg Roedel
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2019-09-02  6:39 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

Hi all,

After merging the iommu tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/iommu/iommu.c: In function 'iommu_subsys_init':
drivers/iommu/iommu.c:123:38: error: implicit declaration of function 'sme_active'; did you mean 'cpu_active'? [-Werror=implicit-function-declaration]
  123 |   if (iommu_default_passthrough() && sme_active()) {
      |                                      ^~~~~~~~~~
      |                                      cpu_active

Caused by commit

  2cc13bb4f59f ("iommu: Disable passthrough mode when SME is active")

sme_active() seems to be only relevant to X86.

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2020-09-21  4:09 Stephen Rothwell
  2020-10-13  7:31 ` Stephen Rothwell
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2020-09-21  4:09 UTC (permalink / raw)
  To: Joerg Roedel, Rob Clark, Sean Paul
  Cc: Dave Airlie, DRI, Jordan Crouse, Tom Murphy,
	Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]

Hi all,

After merging the iommu tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/gpu/drm/msm/msm_iommu.c: In function 'msm_iommu_pagetable_unmap':
drivers/gpu/drm/msm/msm_iommu.c:46:2: error: implicit declaration of function 'iommu_flush_tlb_all'; did you mean 'iommu_flush_iotlb_all'? [-Werror=implicit-function-declaration]
   46 |  iommu_flush_tlb_all(to_msm_iommu(pagetable->parent)->domain);
      |  ^~~~~~~~~~~~~~~~~~~
      |  iommu_flush_iotlb_all

Caused by commit

  aae4c8e27bd7 ("iommu: Rename iommu_tlb_* functions to iommu_iotlb_*")

interacting with commit

  b145c6e65eb0 ("drm/msm: Add support to create a local pagetable")

from the drm-msm tree.

I have applied the following merge fix patch.  Someone will need to tell
Linus about this fix up when the trees get merged.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 21 Sep 2020 14:04:14 +1000
Subject: [PATCH] merge fix upt for iommu_flush_iotlb_all() rename

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/msm/msm_iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c
index 3a83ffdb3b90..22ac7c692a81 100644
--- a/drivers/gpu/drm/msm/msm_iommu.c
+++ b/drivers/gpu/drm/msm/msm_iommu.c
@@ -43,7 +43,7 @@ static int msm_iommu_pagetable_unmap(struct msm_mmu *mmu, u64 iova,
 		size -= 4096;
 	}
 
-	iommu_flush_tlb_all(to_msm_iommu(pagetable->parent)->domain);
+	iommu_flush_iotlb_all(to_msm_iommu(pagetable->parent)->domain);
 
 	return (unmapped == size) ? 0 : -EINVAL;
 }
@@ -199,7 +199,7 @@ struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent)
 
 	/*
 	 * TODO we would like each set of page tables to have a unique ASID
-	 * to optimize TLB invalidation.  But iommu_flush_tlb_all() will
+	 * to optimize TLB invalidation.  But iommu_flush_iotlb_all() will
 	 * end up flushing the ASID used for TTBR1 pagetables, which is not
 	 * what we want.  So for now just use the same ASID as TTBR1.
 	 */
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 25+ messages in thread
* linux-next: build failure after merge of the iommu tree
@ 2021-10-12  3:46 Stephen Rothwell
  2021-10-12  8:33 ` Marc Zyngier
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2021-10-12  3:46 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Robin Murphy, Lorenzo Pieralisi, Marc Zyngier,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

Hi all,

After merging the iommu tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/iommu/apple-dart.c: In function 'apple_dart_get_resv_regions':
drivers/iommu/apple-dart.c:758:2: error: implicit declaration of function 'iommu_dma_get_resv_regions'; did you mean 'iommu_get_resv_regions'? [-Werror=implicit-function-declaration]
  758 |  iommu_dma_get_resv_regions(dev, head);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |  iommu_get_resv_regions
cc1: all warnings being treated as errors

Caused by commit

  b2b2781a9755 ("iommu/dart: Clean up IOVA cookie crumbs")

interactig with commit

  05dc551614a4 ("iommu/dart: Exclude MSI doorbell from PCIe device IOVA range")

from the pci tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 12 Oct 2021 14:40:49 +1100
Subject: [PATCH] fix for "iommu/dart: Exclude MSI doorbell from PCIe device
 IOVA range"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/iommu/apple-dart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 912be9b7669c..280ff8df728d 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -15,6 +15,7 @@
 #include <linux/bitfield.h>
 #include <linux/clk.h>
 #include <linux/dev_printk.h>
+#include <linux/dma-iommu.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
 #include <linux/interrupt.h>
-- 
2.33.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-10-13  1:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29  3:32 linux-next: build failure after merge of the iommu tree Stephen Rothwell
2011-08-29  5:11 ` Ohad Ben-Cohen
2011-08-29 10:42   ` Joerg Roedel
2011-08-29  8:36 ` Joerg Roedel
2011-12-15  4:40 Stephen Rothwell
2011-12-15 10:09 ` Joerg Roedel
2014-07-08  4:02 Stephen Rothwell
2014-07-08  4:12 ` Alex Williamson
2014-07-08 11:20 ` Joerg Roedel
2014-11-05  2:47 Stephen Rothwell
2014-11-05 11:16 ` Joerg Roedel
2015-11-01 11:42 Stephen Rothwell
2015-11-01 15:14 ` Joerg Roedel
2015-11-02  0:15   ` Magnus Damm
2019-09-02  6:39 Stephen Rothwell
2019-09-02 14:03 ` Joerg Roedel
2019-09-02 14:26   ` Lendacky, Thomas
2019-09-03  5:28     ` Stephen Rothwell
2020-09-21  4:09 Stephen Rothwell
2020-10-13  7:31 ` Stephen Rothwell
2020-10-15  2:43   ` Stephen Rothwell
2021-10-12  3:46 Stephen Rothwell
2021-10-12  8:33 ` Marc Zyngier
2021-10-12 11:21   ` Lorenzo Pieralisi
2021-10-13  1:43     ` Bjorn Helgaas

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).