Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5990908imm; Mon, 27 Aug 2018 07:52:38 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYiAf6vI+9crUbxHZBz+dL+hROpeY45UKh+gOjmBD2CG9hkqAc/c07nGJIP6tQXbcw2LeR/ X-Received: by 2002:aa7:831b:: with SMTP id t27-v6mr14602995pfm.81.1535381558161; Mon, 27 Aug 2018 07:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535381558; cv=none; d=google.com; s=arc-20160816; b=oXiOUageF6jrjP4SBORAHOEdkMY2Noq1IzuV5JRiZ0wLyVvsZflBiU8ej+65RRI1q4 22c9mE+4i3yqI5z9CzwdWFdbKt9yQk/qbA7mvyRUDWXEZqTpXbvLMbCJlEi0S69EbW3U u9bPwTG0bI6aX5KMo0clSq1peNnyl2ep7OWV8KOTICYW82kfdnOFmUK7wVk0VyNrq6mv eWf1AwDuoyWLxu3w/NfF5n11FExgfeXPus/TTd4X0m/V5AgRaZnCFjOtviQE3wvgzTzL ZCM7SZfBcdPytm+lHLOBvD9lcYqlmGxWKYRQmYzlkZFmwpWaq7q3X5vHHxTy99n8WwEX JHSg== 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=B9B+czopVD1XDEm1zVeboVAiiwpjaQGbUi9Ag3Br6D0=; b=Bw7/4ehhwVSFbRei1xNOhx/i4UhYsAdexzM0iOSvgsTHILaWRhsU2sDxGA6LNTWHob konfg0ffRAno0SDrkchEgzsRXjIPFFzxCF3wIWnHr7l0WS6zmxtdr5Z0NXtLQo8gQKL5 ykJZubPIA9F0/ytafFlTxXHXaRNpcx22961/HZ9ZDg6mtsAKfX7mFt7GBRGgwoxQU5gF C4JlUa1QNncwp3C4baVesc6lALWIuJH/nAkxUkAvol4kmyW4UC2774oI3sA1+12QNUCh 6eahdDvTHVN83bOhtbYnsBD9fIah5n31MZ6FyHrJ58KIcuaagqp3boRakKUsc2JR292a /n4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=er3V17+h; 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 d41-v6si14135877pla.172.2018.08.27.07.52.23; Mon, 27 Aug 2018 07:52:38 -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=er3V17+h; 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 S1727295AbeH0Shl (ORCPT + 99 others); Mon, 27 Aug 2018 14:37:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38756 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727174AbeH0Shl (ORCPT ); Mon, 27 Aug 2018 14:37:41 -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=B9B+czopVD1XDEm1zVeboVAiiwpjaQGbUi9Ag3Br6D0=; b=er3V17+hYLVlo+1qC5Sug6+rT 5/nt4y+xRGb75e/FV9ul83Irt8MKiEneAc8Uzm/At3qhNYv8ETFEY5aKEXGWsTr9FsewR92mia+EJ irYlUBXffVzrBoNQGvgqtlnEzwJCAasxNW2QTuOM7iWPGmRb9aahX40zdUpqkIQysnWLZvF/kUMr7 7qqhrD7jeRy6GFj8BdaFpYzU6n26TpKZIkBY0+q+y9ajzkEdH6rjVe6XwEJ4Jw55PTQ8twfUuoCzr ywaBSnzrlTWzOp7dTwbKL4q6d/fVXo1n4dXpVnv8dXbfNRiT+Mi2u47mdKamd/H0f+Hqr5WthcbIF 5rBTcKqxg==; Received: from 089144202128.atnat0011.highway.a1.net ([89.144.202.128] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuIqj-0004VD-0l; Mon, 27 Aug 2018 14:50:39 +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: Date: Mon, 27 Aug 2018 16:50:27 +0200 Message-Id: <20180827145032.9522-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Subject: [RFC] merge dma_direct_ops and dma_noncoherent_ops 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