From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gk1KE-0003vN-HA for barebox@lists.infradead.org; Thu, 17 Jan 2019 06:38:54 +0000 Received: by mail-pl1-x644.google.com with SMTP id b5so4269924plr.4 for ; Wed, 16 Jan 2019 22:38:50 -0800 (PST) From: Andrey Smirnov Date: Wed, 16 Jan 2019 22:38:28 -0800 Message-Id: <20190117063840.13674-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 00/12] ARM/ARM64 MMU code consolidation, zeroing of DMA coherent memory To: barebox@lists.infradead.org Cc: Andrey Smirnov Everyone: This series is a result of my attempt at changing the behaviour of dma_alloc_coherent() to guarantee that memory it returns is zeroed out. Mostly to avoid having to do that explicitly in driver code, but also to match behaviour that that function has in Linux. While working on that I noticed that there was a fair bit of MMU/DMA related code between ARM/ARM64 that can be shared, so I created a number of patches to do just that. Feedback is welcome! Thanks, Andrey Smirnov Andrey Smirnov (12): ARM: mmu: Drop custom virt_to_phys/phys_to_virt ARM: mmu: Simplify the use of dma_inv_range() ARM: mmu: Share code for dma_(un)map_single() ARM64: mmu: Use arch_remap_range() internaly ARM64: mmu: Merge create_sections() and map_region() together ARM: mmu: Share code for dma_free_coherent() ARM64: mmu: Invalidate memory before remapping as DMA coherent ARM: mmu: Share code for dma_alloc_coherent() ARM: mmu: Share code for dma_sync_single_for_cpu() ARM: mmu: Share sanity checking code in mmu_init() ARM: mmu: Share code for arm_mmu_not_initialized_error() ARM: mmu: Make sure DMA coherent memory is zeroed out arch/arm/cpu/Makefile | 2 +- arch/arm/cpu/mmu-common.c | 82 +++++++++++++++++++++++++++++++++ arch/arm/cpu/mmu-common.h | 20 ++++++++ arch/arm/cpu/mmu.c | 96 +++------------------------------------ arch/arm/cpu/mmu.h | 2 + arch/arm/cpu/mmu_64.c | 96 ++++++--------------------------------- arch/arm/cpu/mmu_64.h | 2 + arch/arm/include/asm/io.h | 5 -- 8 files changed, 128 insertions(+), 177 deletions(-) create mode 100644 arch/arm/cpu/mmu-common.c create mode 100644 arch/arm/cpu/mmu-common.h -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox