Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp568951imm; Fri, 14 Sep 2018 03:01:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbhqefRVURcxOpn0BZP15TCqbtNLXi/LYCyFEnRgfCCIeHkIuH7n90dUKc9kZ+5oOwQRriZ X-Received: by 2002:a17:902:b03:: with SMTP id 3-v6mr11604918plq.156.1536919299606; Fri, 14 Sep 2018 03:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536919299; cv=none; d=google.com; s=arc-20160816; b=WUUB+6eS5gEUJJBocKhE7l2p6NQ51LN8WaSUHTRCQkNXNAFSqFZsHcH22SsDV5bmyd ugET8QLXbL+HWToRzYlmA3kKJiPkkl1DtlsSty6n5gDelain0//heo9tY4r/+cwF4IXH a9Ph9ZSWe9/GDrvU0NiSHq+21OFze9amaFTdVIxCoTBW91Q3lj6I+zXLDSNRJ/e0SUfJ dMTedOGpFxEe2OUdOv7HFRHfw06uJmf7niyQGefzDp54TIhIEI0b3tZDKrBUNUgDgvzt x6CI4VGGwS3iaax+Y9n0R5XVep5K7H0k9U9LkP5u1dGkialDYeFfZkiSNFRNFEAcLkGQ QxRQ== 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; bh=5nXA/hHUO0A19w4qcEUepqG2LtudD+S0SQEZjFE/eCQ=; b=dB7lorS7jH9Gd2/6Ry6tdpsbswt/OzF7MsQz1IMxkP0yc3Z6mfWKTw0qv3uxXhty8y xeq8CJS95MWUcYRz6GgbQSI5uoT+932IpQnV3fUSPe7D4Fn5/GLHPqPEHhTi7h9xih/5 1L/LJlE9Huhn1lUaIrAaXhktBzqXfkCNXbuJrF9vq+VdLTnOKrmeTpDM9i90d/SfSbfB Fb7lqj2YQr/pVDrEDq/l2Zzvs5nAcy94Rz12y0lWqpvxZkuMftL8FBMZNPCwYheiTgJA wMp4a6t/4HvAMQ3oLeXq3MCy+baQ39tURqkfajvojbIwp2EDp1BIjGo+yzT2ddWfBkW6 fv7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=BwmtMJuE; 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 e39-v6si6811389plg.386.2018.09.14.03.01.23; Fri, 14 Sep 2018 03:01:39 -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=BwmtMJuE; 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 S1728078AbeINPMK (ORCPT + 99 others); Fri, 14 Sep 2018 11:12:10 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59134 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbeINPMK (ORCPT ); Fri, 14 Sep 2018 11:12:10 -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=5nXA/hHUO0A19w4qcEUepqG2LtudD+S0SQEZjFE/eCQ=; b=BwmtMJuEf+S2fisZZhmhrH3A2 KpRlKFzcO61nfARMjUIhTdk7BaydewlFBjOc7iC/Rx/+MY6LNno41dhGiUpMUuZZv9ex3Dn160p+I 5DFBiwmdrui8zsxidJ43+baJu6TGLny7L8RkkuPuZtk7PWBBDLv1TKqok6YpcyJwhO2WcKCZWlILX oxXJWujvTgJjJ0nKyXzMkSIlBMhpGXuE2BzNacuX9htz+7NV8qsb5A9R9tC90KItJU307oxbCV765 KgzZ0g/C5q455L8YOYUOatK6Fffdpe6vyYQgpfCmgOXbXyCerbua3VGk7Uv8Wfrd+z+/xL8zkbYMr QBEidK6dA==; Received: from 089144198037.atnat0007.highway.a1.net ([89.144.198.37] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0krc-0000NR-IY; Fri, 14 Sep 2018 09:58:12 +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 v3 Date: Fri, 14 Sep 2018 11:58:02 +0200 Message-Id: <20180914095808.22202-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 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 v2: - return bool from dev_is_dma_coherent Changes since v1: - rebased to the latest Linus' tree which includes coherent dma support for arc - a couple tidyups suggested by Paul Burton