Re: cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v3

2021-04-07 Thread Joerg Roedel
On Thu, Apr 01, 2021 at 05:52:36PM +0200, Christoph Hellwig wrote:
> Diffstat:
>  arch/powerpc/include/asm/fsl_pamu_stash.h   |   12 
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c |5 
>  drivers/iommu/amd/iommu.c   |   23 
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   75 ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |1 
>  drivers/iommu/arm/arm-smmu/arm-smmu.c   |  111 +---
>  drivers/iommu/arm/arm-smmu/arm-smmu.h   |2 
>  drivers/iommu/dma-iommu.c   |9 
>  drivers/iommu/fsl_pamu.c|  293 ---
>  drivers/iommu/fsl_pamu.h|   12 
>  drivers/iommu/fsl_pamu_domain.c |  688 
> ++--
>  drivers/iommu/fsl_pamu_domain.h |   46 -
>  drivers/iommu/intel/iommu.c |   95 ---
>  drivers/iommu/iommu.c   |  118 +---
>  drivers/soc/fsl/qbman/qman_portal.c |   55 --
>  drivers/vfio/vfio_iommu_type1.c |   31 -
>  drivers/vhost/vdpa.c|   10 
>  include/linux/io-pgtable.h  |4 
>  include/linux/iommu.h   |   76 ---
>  19 files changed, 203 insertions(+), 1463 deletions(-)

Applied, thanks.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v3

2021-04-01 Thread Christoph Hellwig
Hi all,

there are a bunch of IOMMU APIs that are entirely unused, or only used as
a private communication channel between the FSL PAMU driver and it's only
consumer, the qbman portal driver.

So this series drops a huge chunk of entirely unused FSL PAMU
functionality, then drops all kinds of unused IOMMU APIs, and then
replaces what is left of the iommu_attrs with properly typed, smaller
and easier to use specific APIs.

Changes since v2:
 - remove a comment fragment a little bit earlier
 - fix the aperture end passed to pamu_config_ppaace
 - fix a few trivial typos
 - remove more unused arguments to pamu_config_ppaace
 - do not accidentally enable lazy flushing for non-dma domains

Changes since v1:
 - use a different way to control strict flushing behavior (from Robin)
 - remove the iommu_cmd_line wrappers
 - simplify the pagetbl quirks a little more
 - slightly improved patch ordering
 - better changelogs

Diffstat:
 arch/powerpc/include/asm/fsl_pamu_stash.h   |   12 
 drivers/gpu/drm/msm/adreno/adreno_gpu.c |5 
 drivers/iommu/amd/iommu.c   |   23 
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   75 ---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |1 
 drivers/iommu/arm/arm-smmu/arm-smmu.c   |  111 +---
 drivers/iommu/arm/arm-smmu/arm-smmu.h   |2 
 drivers/iommu/dma-iommu.c   |9 
 drivers/iommu/fsl_pamu.c|  293 ---
 drivers/iommu/fsl_pamu.h|   12 
 drivers/iommu/fsl_pamu_domain.c |  688 ++--
 drivers/iommu/fsl_pamu_domain.h |   46 -
 drivers/iommu/intel/iommu.c |   95 ---
 drivers/iommu/iommu.c   |  118 +---
 drivers/soc/fsl/qbman/qman_portal.c |   55 --
 drivers/vfio/vfio_iommu_type1.c |   31 -
 drivers/vhost/vdpa.c|   10 
 include/linux/io-pgtable.h  |4 
 include/linux/iommu.h   |   76 ---
 19 files changed, 203 insertions(+), 1463 deletions(-)
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v2

2021-03-16 Thread Christoph Hellwig
Hi all,

there are a bunch of IOMMU APIs that are entirely unused, or only used as
a private communication channel between the FSL PAMU driver and it's only
consumer, the qbman portal driver.

So this series drops a huge chunk of entirely unused FSL PAMU
functionality, then drops all kinds of unused IOMMU APIs, and then
replaces what is left of the iommu_attrs with properly typed, smaller
and easier to use specific APIs.

Changes since v1:
 - use a different way to control strict flushing behavior (from Robin)
 - remove the iommu_cmd_line wrappers
 - simplify the pagetbl quirks a little more
 - slightly improved patch ordering
 - better changelogs

Diffstat:
 arch/powerpc/include/asm/fsl_pamu_stash.h   |   12 
 drivers/gpu/drm/msm/adreno/adreno_gpu.c |5 
 drivers/iommu/amd/iommu.c   |   23 
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   75 ---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |1 
 drivers/iommu/arm/arm-smmu/arm-smmu.c   |  111 +---
 drivers/iommu/arm/arm-smmu/arm-smmu.h   |2 
 drivers/iommu/dma-iommu.c   |9 
 drivers/iommu/fsl_pamu.c|  264 --
 drivers/iommu/fsl_pamu.h|   10 
 drivers/iommu/fsl_pamu_domain.c |  694 ++--
 drivers/iommu/fsl_pamu_domain.h |   46 -
 drivers/iommu/intel/iommu.c |   95 ---
 drivers/iommu/iommu.c   |  115 +---
 drivers/soc/fsl/qbman/qman_portal.c |   55 --
 drivers/vfio/vfio_iommu_type1.c |   31 -
 drivers/vhost/vdpa.c|   10 
 include/linux/io-pgtable.h  |4 
 include/linux/iommu.h   |   76 ---
 19 files changed, 203 insertions(+), 1435 deletions(-)
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver

2021-03-05 Thread Li Yang
On Mon, Mar 1, 2021 at 2:44 AM Christoph Hellwig  wrote:
>
> Hi all,
>
> there are a bunch of IOMMU APIs that are entirely unused, or only used as
> a private communication channel between the FSL PAMU driver and it's only
> consumer, the qbman portal driver.
>
> So this series drops a huge chunk of entirely unused FSL PAMU
> functionality, then drops all kinds of unused IOMMU APIs, and then
> replaces what is left of the iommu_attrs with properly typed, smaller
> and easier to use specific APIs.

It looks like the unused APIs were added for functionality that were
never completed later on.  So

Acked-by: Li Yang 

>
> Diffstat:
>  arch/powerpc/include/asm/fsl_pamu_stash.h   |   12
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c |2
>  drivers/iommu/amd/iommu.c   |   23
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   85 ---
>  drivers/iommu/arm/arm-smmu/arm-smmu.c   |  122 +---
>  drivers/iommu/dma-iommu.c   |8
>  drivers/iommu/fsl_pamu.c|  264 --
>  drivers/iommu/fsl_pamu.h|   10
>  drivers/iommu/fsl_pamu_domain.c |  694 
> ++--
>  drivers/iommu/fsl_pamu_domain.h |   46 -
>  drivers/iommu/intel/iommu.c |   55 --
>  drivers/iommu/iommu.c   |   75 ---
>  drivers/soc/fsl/qbman/qman_portal.c |   56 --
>  drivers/vfio/vfio_iommu_type1.c |   31 -
>  drivers/vhost/vdpa.c|   10
>  include/linux/iommu.h   |   81 ---
>  16 files changed, 214 insertions(+), 1360 deletions(-)
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver

2021-03-04 Thread Joerg Roedel
On Mon, Mar 01, 2021 at 09:42:40AM +0100, Christoph Hellwig wrote:
> Diffstat:
>  arch/powerpc/include/asm/fsl_pamu_stash.h   |   12 
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c |2 
>  drivers/iommu/amd/iommu.c   |   23 
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   85 ---
>  drivers/iommu/arm/arm-smmu/arm-smmu.c   |  122 +---
>  drivers/iommu/dma-iommu.c   |8 
>  drivers/iommu/fsl_pamu.c|  264 --
>  drivers/iommu/fsl_pamu.h|   10 
>  drivers/iommu/fsl_pamu_domain.c |  694 
> ++--
>  drivers/iommu/fsl_pamu_domain.h |   46 -
>  drivers/iommu/intel/iommu.c |   55 --
>  drivers/iommu/iommu.c   |   75 ---
>  drivers/soc/fsl/qbman/qman_portal.c |   56 --
>  drivers/vfio/vfio_iommu_type1.c |   31 -
>  drivers/vhost/vdpa.c|   10 
>  include/linux/iommu.h   |   81 ---
>  16 files changed, 214 insertions(+), 1360 deletions(-)

Nice cleanup, thanks. The fsl_pamu driver and interface has always been
a little bit of an alien compared to other IOMMU drivers. I am inclined
to merge this after -rc3 is out, given some reviews. Can you also please
add changelogs to the last three patches?

Thanks,

Joerg
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver

2021-03-01 Thread Christoph Hellwig
Hi all,

there are a bunch of IOMMU APIs that are entirely unused, or only used as
a private communication channel between the FSL PAMU driver and it's only
consumer, the qbman portal driver.

So this series drops a huge chunk of entirely unused FSL PAMU
functionality, then drops all kinds of unused IOMMU APIs, and then
replaces what is left of the iommu_attrs with properly typed, smaller
and easier to use specific APIs.

Diffstat:
 arch/powerpc/include/asm/fsl_pamu_stash.h   |   12 
 drivers/gpu/drm/msm/adreno/adreno_gpu.c |2 
 drivers/iommu/amd/iommu.c   |   23 
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   85 ---
 drivers/iommu/arm/arm-smmu/arm-smmu.c   |  122 +---
 drivers/iommu/dma-iommu.c   |8 
 drivers/iommu/fsl_pamu.c|  264 --
 drivers/iommu/fsl_pamu.h|   10 
 drivers/iommu/fsl_pamu_domain.c |  694 ++--
 drivers/iommu/fsl_pamu_domain.h |   46 -
 drivers/iommu/intel/iommu.c |   55 --
 drivers/iommu/iommu.c   |   75 ---
 drivers/soc/fsl/qbman/qman_portal.c |   56 --
 drivers/vfio/vfio_iommu_type1.c |   31 -
 drivers/vhost/vdpa.c|   10 
 include/linux/iommu.h   |   81 ---
 16 files changed, 214 insertions(+), 1360 deletions(-)
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu