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

* Re: linux-next: build failure after merge of the iommu tree
  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
  1 sibling, 1 reply; 25+ messages in thread
From: Ohad Ben-Cohen @ 2011-08-29  5:11 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Joerg Roedel, linux-next, linux-kernel

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

On Mon, Aug 29, 2011 at 6:32 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 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.

Thank you, Stephen, you're completely right of course.

Here is what we're missing (patch also attached):

>From 7a7949ca60bb0d58079b669733f9aa43015ba0f0 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Mon, 29 Aug 2011 07:57:44 +0300
Subject: [PATCH] iommu: omap: add Kconfig OMAP dependency

Make CONFIG_OMAP_IOMMU depend on CONFIG_ARCH_OMAP so other
allmodconfig builds won't fail.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/iommu/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 432463b..d901930 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -110,6 +110,7 @@ config INTR_REMAP
 # OMAP IOMMU support
 config OMAP_IOMMU
 	bool "OMAP IOMMU Support"
+	depends on ARCH_OMAP
 	select IOMMU_API

 config OMAP_IOVMM
-- 
1.7.4.1

[-- Attachment #2: 0001-iommu-omap-add-Kconfig-OMAP-dependency.patch --]
[-- Type: text/x-patch, Size: 815 bytes --]

From 7a7949ca60bb0d58079b669733f9aa43015ba0f0 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Mon, 29 Aug 2011 07:57:44 +0300
Subject: [PATCH] iommu: omap: add Kconfig OMAP dependency

Make CONFIG_OMAP_IOMMU depend on CONFIG_ARCH_OMAP so other
allmodconfig builds won't fail.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/iommu/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 432463b..d901930 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -110,6 +110,7 @@ config INTR_REMAP
 # OMAP IOMMU support
 config OMAP_IOMMU
 	bool "OMAP IOMMU Support"
+	depends on ARCH_OMAP
 	select IOMMU_API
 
 config OMAP_IOVMM
-- 
1.7.4.1


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

* Re: linux-next: build failure after merge of the iommu tree
  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  8:36 ` Joerg Roedel
  1 sibling, 0 replies; 25+ messages in thread
From: Joerg Roedel @ 2011-08-29  8:36 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Ohad Ben-Cohen

On Mon, Aug 29, 2011 at 01:32:37PM +1000, Stephen Rothwell wrote:
> 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).

Thanks for the report Stephen, I apply Ohads patch today so that this
should be fixed for tomorrow.

	Joerg

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

* Re: linux-next: build failure after merge of the iommu tree
  2011-08-29  5:11 ` Ohad Ben-Cohen
@ 2011-08-29 10:42   ` Joerg Roedel
  0 siblings, 0 replies; 25+ messages in thread
From: Joerg Roedel @ 2011-08-29 10:42 UTC (permalink / raw)
  To: Ohad Ben-Cohen; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Mon, Aug 29, 2011 at 08:11:53AM +0300, Ohad Ben-Cohen wrote:
> Thank you, Stephen, you're completely right of course.
> 
> Here is what we're missing (patch also attached):
> 
> >From 7a7949ca60bb0d58079b669733f9aa43015ba0f0 Mon Sep 17 00:00:00 2001
> From: Ohad Ben-Cohen <ohad@wizery.com>
> Date: Mon, 29 Aug 2011 07:57:44 +0300
> Subject: [PATCH] iommu: omap: add Kconfig OMAP dependency
> 
> Make CONFIG_OMAP_IOMMU depend on CONFIG_ARCH_OMAP so other
> allmodconfig builds won't fail.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
> ---
>  drivers/iommu/Kconfig |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 432463b..d901930 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -110,6 +110,7 @@ config INTR_REMAP
>  # OMAP IOMMU support
>  config OMAP_IOMMU
>  	bool "OMAP IOMMU Support"
> +	depends on ARCH_OMAP
>  	select IOMMU_API
> 
>  config OMAP_IOVMM

Applied to arm/omap and pushed into my next branch, Thanks.

	Joerg

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

* Re: linux-next: build failure after merge of the iommu tree
  2021-10-12 11:21   ` Lorenzo Pieralisi
@ 2021-10-13  1:43     ` Bjorn Helgaas
  0 siblings, 0 replies; 25+ messages in thread
From: Bjorn Helgaas @ 2021-10-13  1:43 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Marc Zyngier, bhelgaas, Stephen Rothwell, Joerg Roedel,
	Robin Murphy, Linux Kernel Mailing List, Linux Next Mailing List,
	Sven Peter

On Tue, Oct 12, 2021 at 12:21:58PM +0100, Lorenzo Pieralisi wrote:
> On Tue, Oct 12, 2021 at 09:33:48AM +0100, Marc Zyngier wrote:
> > [+ Sven]
> > 
> > On Tue, 12 Oct 2021 04:46:39 +0100,
> > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > 
> > > 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>
> > 
> > Thanks for fixing this. Lorenzo, do you mind slapping this on top of
> > the Apple PCIe series?
> 
> I think this will have to be done by Bjorn at PR time, depending on
> IOMMU<->PCI trees PRs timing, please correct me if I am wrong, we
> have to reintroduce the line above since it is deleted by:
> 
> b2b2781a9755 ("iommu/dart: Clean up IOVA cookie crumbs")
> 
> in the IOMMU tree.

Sure, no problem.  I made a note to check for this when I send the
pull request and fix it up or mention it to Joerg and/or Linus as
necessary.

Thanks for the heads-up!

Bjorn

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

* Re: linux-next: build failure after merge of the iommu tree
  2021-10-12  8:33 ` Marc Zyngier
@ 2021-10-12 11:21   ` Lorenzo Pieralisi
  2021-10-13  1:43     ` Bjorn Helgaas
  0 siblings, 1 reply; 25+ messages in thread
From: Lorenzo Pieralisi @ 2021-10-12 11:21 UTC (permalink / raw)
  To: Marc Zyngier, bhelgaas
  Cc: Stephen Rothwell, Joerg Roedel, Robin Murphy,
	Linux Kernel Mailing List, Linux Next Mailing List, Sven Peter

On Tue, Oct 12, 2021 at 09:33:48AM +0100, Marc Zyngier wrote:
> [+ Sven]
> 
> On Tue, 12 Oct 2021 04:46:39 +0100,
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > 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>
> 
> Thanks for fixing this. Lorenzo, do you mind slapping this on top of
> the Apple PCIe series?

I think this will have to be done by Bjorn at PR time, depending on
IOMMU<->PCI trees PRs timing, please correct me if I am wrong, we
have to reintroduce the line above since it is deleted by:

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

in the IOMMU tree.

Lorenzo

> 
> Thanks,
> 
> 	M.
> 
> -- 
> Without deviation from the norm, progress is not possible.

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

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

[+ Sven]

On Tue, 12 Oct 2021 04:46:39 +0100,
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> 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>

Thanks for fixing this. Lorenzo, do you mind slapping this on top of
the Apple PCIe series?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[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

* Re: linux-next: build failure after merge of the iommu tree
  2020-10-13  7:31 ` Stephen Rothwell
@ 2020-10-15  2:43   ` Stephen Rothwell
  0 siblings, 0 replies; 25+ messages in thread
From: Stephen Rothwell @ 2020-10-15  2:43 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Joerg Roedel, Rob Clark, Sean Paul, DRI, Jordan Crouse,
	Tom Murphy, Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

On Tue, 13 Oct 2020 18:31:07 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Mon, 21 Sep 2020 14:09:01 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > 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  
> 
> This merge fix up is now needed when the iommu tree and the drm tree are merged.

This merge fix up is now needed when the drm tree is merged with Linus' tree.

-- 
Cheers,
Stephen Rothwell

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

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

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

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

Hi all,

On Mon, 21 Sep 2020 14:09:01 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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

This merge fix up is now needed when the iommu tree and the drm tree are merged.
-- 
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

* Re: linux-next: build failure after merge of the iommu tree
  2019-09-02 14:26   ` Lendacky, Thomas
@ 2019-09-03  5:28     ` Stephen Rothwell
  0 siblings, 0 replies; 25+ messages in thread
From: Stephen Rothwell @ 2019-09-03  5:28 UTC (permalink / raw)
  To: Lendacky, Thomas
  Cc: Joerg Roedel, Thiago Jung Bauermann, Michael Ellerman,
	Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

On Mon, 2 Sep 2019 14:26:40 +0000 "Lendacky, Thomas" <Thomas.Lendacky@amd.com> wrote:
>
> On 9/2/19 9:03 AM, Joerg Roedel wrote:
> > 
> > tl;dr: And IOMMU commit introduces a new user for sme_active() in
> >         generic code, and commit
> > 
> >         	284e21fab2cf x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header
> > 
> >         breaks the build of drivers/iommu/ for all architectures not
> >         implementing sme_active().
> > 
> > On Mon, Sep 02, 2019 at 04:39:51PM +1000, Stephen Rothwell wrote:  
> >> 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()) {  
> 
> Maybe we should make this mem_encrypt_active(), since this will probably
> be needed if/when an IOMMU device is eventually added to a guest, and the
> referenced commit below doesn't remove that call.

I have done that for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 3 Sep 2019 15:19:34 +1000
Subject: [PATCH] iommu: use mem_encrypt_active() instead of sme_active()

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

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 66cfacaa483d..b870044ecd49 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -120,7 +120,7 @@ static int __init iommu_subsys_init(void)
 		else
 			iommu_set_default_translated(false);
 
-		if (iommu_default_passthrough() && sme_active()) {
+		if (iommu_default_passthrough() && mem_encrypt_active()) {
 			pr_info("SME detected - Disabling default IOMMU Passthrough\n");
 			iommu_set_default_translated(false);
 		}
-- 
2.23.0.rc1

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

* Re: linux-next: build failure after merge of the iommu tree
  2019-09-02 14:03 ` Joerg Roedel
@ 2019-09-02 14:26   ` Lendacky, Thomas
  2019-09-03  5:28     ` Stephen Rothwell
  0 siblings, 1 reply; 25+ messages in thread
From: Lendacky, Thomas @ 2019-09-02 14:26 UTC (permalink / raw)
  To: Joerg Roedel, Stephen Rothwell, Thiago Jung Bauermann, Michael Ellerman
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

On 9/2/19 9:03 AM, Joerg Roedel wrote:
> Hi,
> 
> tl;dr: And IOMMU commit introduces a new user for sme_active() in
>         generic code, and commit
> 
>         	284e21fab2cf x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header
> 
>         breaks the build of drivers/iommu/ for all architectures not
>         implementing sme_active().
> 
> On Mon, Sep 02, 2019 at 04:39:51PM +1000, Stephen Rothwell wrote:
>> 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()) {

Maybe we should make this mem_encrypt_active(), since this will probably
be needed if/when an IOMMU device is eventually added to a guest, and the
referenced commit below doesn't remove that call.

Thanks,
Tom

>>        |                                      ^~~~~~~~~~
>>        |                                      cpu_active
>>
>> Caused by commit
>>
>>    2cc13bb4f59f ("iommu: Disable passthrough mode when SME is active")
> 
> 
> Actually it is caused by:
> 
> 	commit 284e21fab2cfcf90dacce565e0b12f29e5df00c1
> 	Author: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> 	Date:   Tue Aug 6 01:49:17 2019 -0300
> 
> 	    x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header
> 
> which removes the sme_active prototype from the generic headers. The
> iommu commit is in next already for a couple of days and didn't cause
> problems before.
> 
>> sme_active() seems to be only relevant to X86.
> 
> It has an implementation on x86 and s390.
> 
>> I have reverted that commit for today.
> 
> Thanks, but I suggest reverting above commit instead.
> 
> 
> Regards,
> 
> 	Joerg
> 

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

* Re: linux-next: build failure after merge of the iommu tree
  2019-09-02  6:39 Stephen Rothwell
@ 2019-09-02 14:03 ` Joerg Roedel
  2019-09-02 14:26   ` Lendacky, Thomas
  0 siblings, 1 reply; 25+ messages in thread
From: Joerg Roedel @ 2019-09-02 14:03 UTC (permalink / raw)
  To: Stephen Rothwell, Thiago Jung Bauermann, Michael Ellerman, Tom Lendacky
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

Hi,

tl;dr: And IOMMU commit introduces a new user for sme_active() in
       generic code, and commit

       	284e21fab2cf x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header

       breaks the build of drivers/iommu/ for all architectures not
       implementing sme_active().

On Mon, Sep 02, 2019 at 04:39:51PM +1000, Stephen Rothwell wrote:
> 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")


Actually it is caused by:

	commit 284e21fab2cfcf90dacce565e0b12f29e5df00c1
	Author: Thiago Jung Bauermann <bauerman@linux.ibm.com>
	Date:   Tue Aug 6 01:49:17 2019 -0300

	    x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header

which removes the sme_active prototype from the generic headers. The
iommu commit is in next already for a couple of days and didn't cause
problems before.

> sme_active() seems to be only relevant to X86.

It has an implementation on x86 and s390.

> I have reverted that commit for today.

Thanks, but I suggest reverting above commit instead.


Regards,

	Joerg

^ 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

* Re: linux-next: build failure after merge of the iommu tree
  2015-11-01 15:14 ` Joerg Roedel
@ 2015-11-02  0:15   ` Magnus Damm
  0 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2015-11-02  0:15 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Stephen Rothwell, linux-next, linux-kernel, Magnus Damm

Hi Joerg, everyone,

On Mon, Nov 2, 2015 at 12:14 AM, Joerg Roedel <joro@8bytes.org> wrote:
> Hi Stephen,
>
> On Sun, Nov 01, 2015 at 10:42:52PM +1100, Stephen Rothwell wrote:
>> 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.
>
> Thanks, I reverted the broken commit and will push out an updated tree
> soon.

Thanks for your help and my apologies for the breakage. I did not
expect this patch to enable build on non-ARM platforms but I can now
understand that the LPAE Kconfig bits may have been the last bit
stopping other architectures to build this driver.

I'm currently poking around with this driver on 32/64-bit ARM and
getting rid of those includes from asm/ is for sure on my TODO list.

/ magnus

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

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

Hi Stephen,

On Sun, Nov 01, 2015 at 10:42:52PM +1100, Stephen Rothwell wrote:
> 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.

Thanks, I reverted the broken commit and will push out an updated tree
soon.


	Joerg

^ 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

* Re: 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, 0 replies; 25+ messages in thread
From: Joerg Roedel @ 2014-11-05 11:16 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Olav Haugan, ppc-dev

On Wed, Nov 05, 2014 at 01:47:31PM +1100, Stephen Rothwell wrote:
> 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.

Thanks Stephen, I exluded the my core branch from next for now until the
issue is fixed.


	Joerg

^ 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

* Re: 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
  1 sibling, 0 replies; 25+ messages in thread
From: Joerg Roedel @ 2014-07-08 11:20 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Alex Williamson

Hi Stephen,

On Tue, Jul 08, 2014 at 02:02:46PM +1000, Stephen Rothwell wrote:
> 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.

I have committed the patch from Alex and published a new next branch. It
should be fixed now.


Thanks,

	Joerg

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

* Re: 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
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Williamson @ 2014-07-08  4:12 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Joerg Roedel, linux-next, linux-kernel

On Tue, 2014-07-08 at 14:02 +1000, Stephen Rothwell wrote:
> 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 :-(

Yep, I already posted a patch for this:

http://lists.linuxfoundation.org/pipermail/iommu/2014-July/009123.html

Sorry for the trouble.  Thanks,

Alex

^ permalink raw reply	[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

* Re: 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, 0 replies; 25+ messages in thread
From: Joerg Roedel @ 2011-12-15 10:09 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Alex Williamson, Jesse Barnes

Hi Stephen,

On Thu, Dec 15, 2011 at 03:40:51PM +1100, Stephen Rothwell wrote:
> 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).

Thanks for resolving this too. I already have a patch for this, it was
just not queued yet. I will queue it in my tree and update my next
branch.
Jesse already provided me a branch which I can pull in, so some of the
patches in his tree will also be in the iommu-tree then.


	Joerg

^ 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

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