convert microblaze to the generic dma remap allocator
Hi Michal,
can you take a look at this patch that moves microblaze over to the generic DMA remap allocator? I've been trying to slowly get all architectures over to the generic code, and microblaze is one that seems very straightfoward to convert.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
PATCH 1/2 microblaze/nommu: use the generic uncached segment support
Stop providing our own arch alloc/free hooks for nommu platforms and just expose the segment offset and use the generic dma-direct allocator.
--- arch/microblaze/Kconfig | 2 + arch/microblaze/mm/consistent.c | 93 +++++++++++++++------------------ 2 files changed, 43 insertions(+), 52 deletions(-)
arch/microblaze/Kconfig +2 -0
@@ -5,9 +5,11 @@ config MICROBLAZE select ARCH_NO_SWAP select ARCH_HAS_BINFMT_FLAT if !MMU select ARCH_HAS_DMA_COHERENT_TO_PFN if MMU + select ARCH_HAS_DMA_PREP_COHERENT select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE + select ARCH_HAS_UNCACHED_SEGMENT if !MMU select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_NO_COHERENT_DMA_MMAP if !MMU select ARCH_WANT_IPC_PARSE_VERSION
arch/microblaze/mm/consistent.c +41 -52
154 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
PATCH 2/2 microblaze: use the generic dma coherent remap allocator
In reply to Christoph HellwigThis switches to using common code for the DMA allocations, including potential use of the CMA allocator if configured.
Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation, and also adds various other minor features drivers start relying upon. It also makes sure we have on tested code base for all architectures that require uncached pte bits for coherent DMA allocations.
--- arch/microblaze/Kconfig | 1 + arch/microblaze/mm/consistent.c | 152 +------------------------------- 2 files changed, 5 insertions(+), 148 deletions(-)
arch/microblaze/Kconfig +1 -0
@@ -17,6 +17,7 @@ config MICROBLAZE select TIMER_OF select CLONE_BACKWARDS3 select COMMON_CLK + select DMA_DIRECT_REMAP if MMU select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS select GENERIC_CPU_DEVICES
arch/microblaze/mm/consistent.c +4 -148
173 lines not on this page · raw message
Signature · 1 line
2.20.1
Quoted 6 lines · Christoph Hellwig
Hi Michal,
can you take a look at this patch that moves microblaze over to the generic DMA remap allocator? I've been trying to slowly get all architectures over to the generic code, and microblaze is one that seems very straightfoward to convert.
Michal, any chance you could look over this series?
Michal Simek
maintainerHi,
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Christoph Hellwig
Hi Michal,
can you take a look at this patch that moves microblaze over to the generic DMA remap allocator? I've been trying to slowly get all architectures over to the generic code, and microblaze is one that seems very straightfoward to convert.
Michal, any chance you could look over this series?
let me take a look.
M
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
Michal Simek
maintainerHi Christoph,
Quoted 7 lines · Christoph Hellwig
Hi Michal,
can you take a look at this patch that moves microblaze over to the generic DMA remap allocator? I've been trying to slowly get all architectures over to the generic code, and microblaze is one that seems very straightfoward to convert.
I took at look at this series and tested it on kc705 and I can't see any issue.
Patches applied.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs