Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933346AbeAJIAl (ORCPT + 1 other); Wed, 10 Jan 2018 03:00:41 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:40154 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753768AbeAJIAj (ORCPT ); Wed, 10 Jan 2018 03:00:39 -0500 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: Konrad Rzeszutek Wilk , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, Michal Simek , linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, patches@groups.riscv.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Guan Xuetao , x86@kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: consolidate direct dma mapping V3 Date: Wed, 10 Jan 2018 08:59:54 +0100 Message-Id: <20180110080027.13879-1-hch@lst.de> X-Mailer: git-send-email 2.14.2 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Almost every architecture supports a direct dma mapping implementation, where no iommu is used and the device dma address is a 1:1 mapping to the physical address or has a simple linear offset. Currently the code for this implementation is most duplicated over the architectures, and the duplicated again in the swiotlb code, and then duplicated again for special cases like the x86 memory encryption DMA ops. This series takes the existing very simple dma-noop dma mapping implementation, enhances it with all the x86 features and quirks, and creates a common set of architecture hooks for it and the swiotlb code. It then switches a number of architectures to this generic direct map implemention. Note that for now this only handles architectures that do cache coherent DMA, but a similar consolidation for non-coherent architectures is in the work for later merge windows. A git tree is also available: git://git.infradead.org/users/hch/misc.git dma-direct.3 Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-direct.3 Changes since V1: - fixed a few patch description typos - fixed a few printk formats - fixed an off by one in dma_coherent_ok - add a few Reviewed-by/Acked-by tags. - moved the swiotlb consolidation to a new series - dropped a few patches for now to not overwhelem the x86 maintainers. They will be resubmitted in the next merge window