From: Christoph Hellwig <hch@lst.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Olof Johansson <olof@lixom.net>
Cc: iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: use generic DMA mapping code in powerpc V7
Date: Wed, 13 Feb 2019 08:01:01 +0100 [thread overview]
Message-ID: <20190213070133.11259-1-hch@lst.de> (raw)
Hi all,
this series switches the powerpc port to use the generic swiotlb and
noncoherent dma ops, and to use more generic code for the coherent
direct mapping, as well as removing a lot of dead code.
As this series is very large and depends on the dma-mapping tree I've
also published a git tree:
git://git.infradead.org/users/hch/misc.git powerpc-dma.7
Gitweb:
http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.7
Thanks a lot to Christian Zigotzky who spent a lot of time testing
iterations on pasemi and FSL boards!
Changes since v4:
- rebased on top of the latests powerpc/next tree
- fix the DART IOMMU bypass selection
- remove the return value from arch_dma_set_mask, which was done
incorrectly and isn't actually needed.
- add a new patch to remove swiotlb_dma_supported
- add a new patch to set a dma mask in the pasemi ethernet driver,
given that we now validate it
- add a new patch to fix a ZONE_DMA32 assumption in the dma-direct
patch
- split up a few patches to improve bisectability
(v5 and v6 were never posted)
Changes since v3:
- rebase on the powerpc fixes tree
- add a new patch to actually make the baseline amigaone config
configure without warnings
- only use ZONE_DMA for 64-bit embedded CPUs, on pseries an IOMMU is
always present
- fix compile in mem.c for one configuration
- drop the full npu removal for now, will be resent separately
- a few git bisection fixes
The changes since v1 are to big to list and v2 was not posted in public.
arch/powerpc/kernel/dma.c | 362 ------------------------
b/arch/powerpc/Kconfig | 5
b/arch/powerpc/include/asm/device.h | 10
b/arch/powerpc/include/asm/dma-direct.h | 18 -
b/arch/powerpc/include/asm/dma-mapping.h | 92 ------
b/arch/powerpc/include/asm/iommu.h | 17 +
b/arch/powerpc/include/asm/machdep.h | 4
b/arch/powerpc/include/asm/pci-bridge.h | 5
b/arch/powerpc/include/asm/pci.h | 2
b/arch/powerpc/include/asm/pgtable.h | 1
b/arch/powerpc/include/asm/swiotlb.h | 5
b/arch/powerpc/kernel/Makefile | 3
b/arch/powerpc/kernel/dma-iommu.c | 75 ++++
b/arch/powerpc/kernel/dma-mask.c | 12
b/arch/powerpc/kernel/dma-swiotlb.c | 89 -----
b/arch/powerpc/kernel/pci-common.c | 10
b/arch/powerpc/kernel/setup-common.c | 1
b/arch/powerpc/mm/dma-noncoherent.c | 40 +-
b/arch/powerpc/mm/mem.c | 22 -
b/arch/powerpc/platforms/44x/ppc476.c | 1
b/arch/powerpc/platforms/44x/warp.c | 2
b/arch/powerpc/platforms/85xx/corenet_generic.c | 5
b/arch/powerpc/platforms/85xx/ge_imp3a.c | 2
b/arch/powerpc/platforms/85xx/mpc8536_ds.c | 2
b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4
b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | 4
b/arch/powerpc/platforms/85xx/p1010rdb.c | 1
b/arch/powerpc/platforms/85xx/p1022_ds.c | 2
b/arch/powerpc/platforms/85xx/p1022_rdk.c | 2
b/arch/powerpc/platforms/85xx/qemu_e500.c | 1
b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1
b/arch/powerpc/platforms/Kconfig.cputype | 3
b/arch/powerpc/platforms/cell/iommu.c | 172 +----------
b/arch/powerpc/platforms/pasemi/iommu.c | 2
b/arch/powerpc/platforms/pasemi/setup.c | 51 ---
b/arch/powerpc/platforms/powernv/npu-dma.c | 2
b/arch/powerpc/platforms/powernv/pci-ioda.c | 132 +-------
b/arch/powerpc/platforms/pseries/iommu.c | 99 +-----
b/arch/powerpc/platforms/pseries/vio.c | 95 ++----
b/arch/powerpc/sysdev/dart_iommu.c | 58 +--
b/arch/powerpc/sysdev/fsl_pci.c | 25 -
b/drivers/misc/cxl/vphb.c | 3
b/drivers/net/ethernet/pasemi/pasemi_mac.c | 1
b/include/linux/swiotlb.h | 3
b/kernel/dma/Kconfig | 3
b/kernel/dma/direct.c | 3
b/kernel/dma/mapping.c | 11
b/kernel/dma/swiotlb.c | 12
48 files changed, 317 insertions(+), 1158 deletions(-)
next reply other threads:[~2019-02-13 7:07 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 7:01 Christoph Hellwig [this message]
2019-02-13 7:01 ` [PATCH 01/32] net: pasemi: set a 64-bit DMA mask on the DMA device Christoph Hellwig
2019-02-22 9:47 ` [01/32] " Michael Ellerman
2019-02-13 7:01 ` [PATCH 02/32] dma-direct: we might need GFP_DMA for 32-bit dma masks Christoph Hellwig
2019-02-13 7:01 ` [PATCH 03/32] powerpc/dma: untangle vio_dma_mapping_ops from dma_iommu_ops Christoph Hellwig
2019-02-13 7:01 ` [PATCH 04/32] powerpc/dma: handle iommu bypass in dma_iommu_ops Christoph Hellwig
2019-02-13 7:01 ` [PATCH 05/32] powerpc/pseries: unwind dma_get_required_mask_pSeriesLP a bit Christoph Hellwig
2019-02-13 7:01 ` [PATCH 06/32] powerpc/pseries: use the generic iommu bypass code Christoph Hellwig
2019-02-13 7:01 ` [PATCH 07/32] powerpc/cell: move dma direct window setup out of dma_configure Christoph Hellwig
2019-02-13 7:01 ` [PATCH 08/32] powerpc/cell: use the generic iommu bypass code Christoph Hellwig
2019-02-13 7:01 ` [PATCH 09/32] powerpc/dart: remove dead cleanup code in iommu_init_early_dart Christoph Hellwig
2019-02-13 7:01 ` [PATCH 10/32] powerpc/dart: use the generic iommu bypass code Christoph Hellwig
2019-02-13 7:01 ` [PATCH 11/32] powerpc/powernv: remove pnv_pci_ioda_pe_single_vendor Christoph Hellwig
2019-02-13 7:01 ` [PATCH 12/32] powerpc/powernv: remove pnv_npu_dma_set_mask Christoph Hellwig
2019-02-13 7:01 ` [PATCH 13/32] powerpc/powernv: use the generic iommu bypass code Christoph Hellwig
2019-02-13 7:01 ` [PATCH 14/32] powerpc/dma: stop overriding dma_get_required_mask Christoph Hellwig
2019-02-13 7:01 ` [PATCH 15/32] powerpc/pci: remove the dma_set_mask pci_controller ops methods Christoph Hellwig
2019-02-13 7:01 ` [PATCH 16/32] powerpc/dma: remove the iommu fallback for coherent allocations Christoph Hellwig
2019-02-13 7:01 ` [PATCH 17/32] powerpc/dma: remove get_pci_dma_ops Christoph Hellwig
2019-02-13 7:01 ` [PATCH 18/32] powerpc/dma: move pci_dma_dev_setup_swiotlb to fsl_pci.c Christoph Hellwig
2019-02-13 7:01 ` [PATCH 19/32] powerpc/dma: remove max_direct_dma_addr Christoph Hellwig
2019-02-13 7:01 ` [PATCH 20/32] powerpc/dma: fix an off-by-one in dma_capable Christoph Hellwig
2019-02-13 7:01 ` [PATCH 21/32] dma-mapping, powerpc: simplify the arch dma_set_mask override Christoph Hellwig
2019-02-13 7:01 ` [PATCH 22/32] powerpc/dma: use phys_to_dma instead of get_dma_offset Christoph Hellwig
2019-02-13 7:01 ` [PATCH 23/32] powerpc/dma: remove dma_nommu_mmap_coherent Christoph Hellwig
2019-02-13 7:01 ` [PATCH 24/32] powerpc/dma: remove dma_nommu_get_required_mask Christoph Hellwig
2019-02-13 7:01 ` [PATCH 25/32] powerpc/dma: remove dma_nommu_dma_supported Christoph Hellwig
2019-02-13 7:01 ` [PATCH 26/32] swiotlb: remove swiotlb_dma_supported Christoph Hellwig
2019-02-13 7:01 ` [PATCH 27/32] powerpc/dma: use the dma-direct allocator for coherent platforms Christoph Hellwig
2019-02-13 7:01 ` [PATCH 28/32] powerpc/dma: use the dma_direct mapping routines Christoph Hellwig
2019-02-13 7:01 ` [PATCH 29/32] powerpc/dma: use the generic direct mapping bypass Christoph Hellwig
2019-02-13 7:01 ` [PATCH 30/32] powerpc/dma: remove get_dma_offset Christoph Hellwig
2019-02-13 7:01 ` [PATCH 31/32] powerpc/dma: remove set_dma_offset Christoph Hellwig
2019-02-13 7:01 ` [PATCH 32/32] powerpc/dma: trim the fat from <asm/dma-mapping.h> Christoph Hellwig
2019-02-20 14:23 ` use generic DMA mapping code in powerpc V7 Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190213070133.11259-1-hch@lst.de \
--to=hch@lst.de \
--cc=benh@kernel.crashing.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=olof@lixom.net \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).