From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: merge dma_direct_ops and dma_noncoherent_ops v2 Date: Mon, 10 Sep 2018 08:05:28 +0200 Message-ID: <20180910060533.27172-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, Greg Kroah-Hartman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Paul Burton , Robin Murphy List-Id: iommu@lists.linux-foundation.org While most architectures are either always or never dma coherent for a given build, the arm, arm64, mips and soon arc architectures can have different dma coherent settings on a per-device basis. Additionally some mips builds can decide at boot time if dma is coherent or not. I've started to look into handling noncoherent dma in swiotlb, and moving the dma-iommu ops into common code [1], and for that we need a generic way to check if a given device is coherent or not. Moving this flag into struct device also simplifies the conditionally coherent architecture implementations. These patches are also available in a git tree given that they have a few previous posted dependencies: git://git.infradead.org/users/hch/misc.git dma-direct-noncoherent-merge Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-direct-noncoherent-merge Changes since v1: - rebased to the latest Linus' tree which includes coherent dma support for arc - a couple tidyups suggested by Paul Burton From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 10 Sep 2018 08:05:52 +0200 (CEST) Received: from bombadil.infradead.org ([IPv6:2607:7c80:54:e::133]:37700 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23991783AbeIJGFs21Frw (ORCPT ); Mon, 10 Sep 2018 08:05:48 +0200 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=rl9VsC8YtoqxZDi65X5wq6sAbW8snqOj8zWTPGtWDoU=; b=iRGTeGUrZQwDzsEssdzH505tP QBRnpWl4YEG4Bi79ypCil93pjusfWtRZncpV5D1c5PpczCbE1iMlmPi1ocfaMCKIY1DHgXbN9dwtO cN7BmkYLIVPhm49cL7Mp4WI7hpijfIgTsOK19OKi4aOTsW0tZv2wqeTMXFF3bWqxjsQPmC40KPyYz BO5SjRXeMHPySefWkaClf2rY7/EpADDMEyYgf6XiXHAQvMK9goaZ+V4iOnxkUNMkxD4vA7Tlflh7y QyMC7SEkXnV5fcLMebwaxDBPqBXuPkw2ynQaqPOpWrywM2mpJOU3kYpGVbysK40guBG6MvV+gYBvb 2Xo3zAdZw==; Received: from 213-225-3-213.nat.highway.a1.net ([213.225.3.213] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzFKK-0007xA-3M; Mon, 10 Sep 2018 06:05:36 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: Marek Szyprowski , Robin Murphy , Paul Burton , Greg Kroah-Hartman , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: merge dma_direct_ops and dma_noncoherent_ops v2 Date: Mon, 10 Sep 2018 08:05:28 +0200 Message-Id: <20180910060533.27172-1-hch@lst.de> X-Mailer: git-send-email 2.18.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 66167 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: hch@lst.de Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips While most architectures are either always or never dma coherent for a given build, the arm, arm64, mips and soon arc architectures can have different dma coherent settings on a per-device basis. Additionally some mips builds can decide at boot time if dma is coherent or not. I've started to look into handling noncoherent dma in swiotlb, and moving the dma-iommu ops into common code [1], and for that we need a generic way to check if a given device is coherent or not. Moving this flag into struct device also simplifies the conditionally coherent architecture implementations. These patches are also available in a git tree given that they have a few previous posted dependencies: git://git.infradead.org/users/hch/misc.git dma-direct-noncoherent-merge Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-direct-noncoherent-merge Changes since v1: - rebased to the latest Linus' tree which includes coherent dma support for arc - a couple tidyups suggested by Paul Burton