Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp472512imm; Fri, 11 May 2018 01:01:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrMBRP30hmDaLj6BUKHCEd3juY1Qi0kZ6aZfsP6JgCk82VTZuLqdMjmMSm3RhkF5q4oefOO X-Received: by 2002:a62:f619:: with SMTP id x25-v6mr4457343pfh.106.1526025705548; Fri, 11 May 2018 01:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526025705; cv=none; d=google.com; s=arc-20160816; b=BKjviIKQtT3gVeAfsVKkZOrWrZrwS9h33T7PB4LTTnRvoIZ4eHss0Px1fIvuIU/OHE Bx2JdLQFg1ee+Jx8tMUJkaAqnT8eUyCE11pZnS7yxNyW2DuYH1Vq5gCt/LpmiVyEjixd kkheeQFs5Y+rDv52Q0mLs8gz2y2x0HgUdsWu+j/ZXXLaHRhI6l2eARAyF72CoUw3roSf mIbSn4XClOObqDXCX4bvBrjUfgsYrXN78IVzQbg/N5iMNxAq1GgbAzf0aWn/BeqgzqOA WDis85noYCbnMcqNjEnbzrXDAKzC0gxKGlsNyrBNOMdl+jaF5WkTzXlwCB1kOROpuWDi /Zwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=WD4YEmTLDWiMTyG4hKguROqugKwHZGJ1sWE5bD4H65k=; b=D2kbb4iGB/alOfDlxYCkExG4UTjig9SJ9AABvQZcWK9w9AyGtzDdMl+svbnMzxMfAJ SLPhKmj5qqaEMg1V8ebi+bQ03paZVZ7XA5kjjQbXlx97ed9OlF4SZCkRJbyd5NHR8o1T SMbkc+fDDc/Uxhb1eSYKGVFeAZoTm9zVW6wCcT9qW1Ilxt4guxzUrNZDbBpMS+OlWnDh appb0gy+Jx9iVz5Pc/Y4t66NJ192eioX32mE2IjMpPbhm4YzejcfAeJcpwVhxdYprLfk Lc9GALSc+oMlIOxfcBamcIrFishkmH+nQYk6gr6yWp/D/2dJGUVGkopBwHFEe68r4sGF iL+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=mlDYQETF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j188-v6si2216600pgc.94.2018.05.11.01.01.30; Fri, 11 May 2018 01:01:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=mlDYQETF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbeEKIAK (ORCPT + 99 others); Fri, 11 May 2018 04:00:10 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33426 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406AbeEKIAI (ORCPT ); Fri, 11 May 2018 04:00:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WD4YEmTLDWiMTyG4hKguROqugKwHZGJ1sWE5bD4H65k=; b=mlDYQETFW4HVm/imr0G0/BNCf wM+rtmM3D/ckF94azme9N1Vp+9hgoC217u66ZIQF9KSG2eKxx9lAxLDElTXFoxPVYyYPvIL7M2e3h bYVbZTMuzbopMoLJBCevXjFm5BGZgDyR2Mh3Wj6LhwRFo+2Dw9uO6wwZWOY44czQzRzTctVnmSTlV nCzCoPfFm4tQxMon8epjc3z5CYWfUsDWPmuoL6ab3HaJcU4iv5W7dVhHmMIa+MVxHk4xfo/smB55u L7QWRI3xnOTBvnS5VAr7tOUM4GcOcr+PgJx9SfBxjJUvKqauVb3rhODEcuQ4Yfbb7Wz7YeMsNK0Th fDayst2Ag==; Received: from 213-225-15-246.nat.highway.a1.net ([213.225.15.246] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fH2xy-0006NA-10; Fri, 11 May 2018 07:59:50 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: linux-arch@vger.kernel.org, Michal Simek , Greentime Hu , Vincent Chen , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org Subject: common non-cache coherent direct dma mapping ops Date: Fri, 11 May 2018 09:59:25 +0200 Message-Id: <20180511075945.16548-1-hch@lst.de> X-Mailer: git-send-email 2.17.0 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, this series continues consolidating the dma-mapping code, with a focus on architectures that do not (always) provide cache coherence for DMA. Three architectures (arm, mips and powerpc) are still left to be converted later due to complexity of their dma ops selection. The dma-noncoherent ops calls the dma-direct ops for the actual translation of streaming mappins and allow the architecture to provide any cache flushing required for cpu to device and/or device to cpu ownership transfers. The dma coherent allocator is for now still left entirely to architecture supplied implementations due the amount of variations. Hopefully we can do some consolidation for them later on as well. A lot of architectures are currently doing very questionable things in their dma mapping routines, which are documented in the changelogs for each patch. Please review them very careful and correct me on incorrect assumptions. Because this series sits on top of two previously submitted series a git tree might be useful to actually test it. It is provided here: git://git.infradead.org/users/hch/misc.git generic-dma-noncoherent Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/generic-dma-noncoherent Changes since RFC: - fix a typo accidentally disabling the device to cpu transfer sync - fixed a few compile failures