Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1473542imm; Tue, 22 May 2018 04:48:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoBGO0FpR06gIFGJqkM+N+SVXVwag+1JKdr6VY+j65AIx/65KXFTpjnlOjTzBannDl2DTSm X-Received: by 2002:a17:902:778a:: with SMTP id o10-v6mr24585533pll.214.1526989717874; Tue, 22 May 2018 04:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526989717; cv=none; d=google.com; s=arc-20160816; b=LyDDAk3GLgw7XQxZnEHbNaLVUok3X7L65tuLWntEBZdqVwurcJ0YRtyJhqJJl9yc92 H7M0wW2rV6fUTY34lGLE2YufacDyiIvxvLyO1oOvwFlvdxW/JSyjvzf+5PPhuA687QDz LCoeGdarXOd1D3T6kAs0IXKiHUD9iApwbqwj1baYqvG/oZRvSvhGSSOeMOZEJgj2GWPT g0ue13jDyDqgPQE+JXMNP8TJF8PKUSBHeaz70YYfjchjn44CIuov6TkZ6PhnFyWmtk41 AH38My4ASiiM87NsQHSm0PP6uxooc2vtwg36WgA3xN1FbxHd96kUrBvPoL4RI6A2nzuG Nakg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=a8aLEdDw5aZW3qsLo5g5VifuazkXAP1GQQl+H2yI2l0=; b=mxGh5N5Eb/+gaD5L9MSk4yWY+hmp4OGYYCKQU/0vwrHestNYbB+uD0SzT6dABI/OI5 fNcYdbSrmGqg6fZbpXnhCFeAUnTcoIs1h2cnYxyVXvbwxdDFsGxlN1rHba4ZFsOQA9XB cif/n7k5DD++if67IMvq7chKPZoFQEy2jxwhbbDcswhbHLTXiLkKotY5HkkRw2btljPe VIa+sVEtrXxHCoYcyJQeXxErIzfsm56qchqJEjWpqlfpBFNTAqk+vaRcL8fB50j337JL LiOb/3c8wAvnhyCL+T45bg71i2qVPGWeMQyZY94SsuGgoh4Iz3OSnzEcdacVR56Jmkpg v5vw== ARC-Authentication-Results: i=1; mx.google.com; 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 v17-v6si16329803pfg.222.2018.05.22.04.48.22; Tue, 22 May 2018 04:48:37 -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; 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 S1751525AbeEVLsJ (ORCPT + 99 others); Tue, 22 May 2018 07:48:09 -0400 Received: from verein.lst.de ([213.95.11.211]:48127 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbeEVLsG (ORCPT ); Tue, 22 May 2018 07:48:06 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 946FE68C7A; Tue, 22 May 2018 13:53:20 +0200 (CEST) Date: Tue, 22 May 2018 13:53:20 +0200 From: Christoph Hellwig To: Russell King - ARM Linux Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-xtensa@linux-xtensa.org, Michal Simek , Vincent Chen , linux-c6x-dev@linux-c6x.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Greentime Hu , linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, nios2-dev@lists.rocketboards.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 04/20] arm-nommu: use generic dma_noncoherent_ops Message-ID: <20180522115320.GA14530@lst.de> References: <20180511075945.16548-1-hch@lst.de> <20180511075945.16548-5-hch@lst.de> <20180511091114.GA16141@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180511091114.GA16141@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 11, 2018 at 10:11:15AM +0100, Russell King - ARM Linux wrote: > > +void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr, > > + size_t size, enum dma_data_direction dir) > > Please no. There is a lot of history of these (__dma_page_cpu_to_dev etc) > functions being abused by out of tree drivers, because they think they > know better. This is stopped by making them static and ensuring that > drivers have no access to these functions. > > Please do not re-expose these to the global kernel. > > While it may make things easier for a cross-architecture point of view, > it makes it a lot easier for people to abuse these private APIs. The point of this series, which isn't fully archived yet, is to consolidate the direct mapping dma code, that is all dma_map_ops instances except for iommus. It is in fact in many ways modelled after the ARM code. For that we need the architectures to supply the cache maintainance routines. However, even if they now appear in dma-noncoherent.h they are NOT and will NOT be exported, so using them directly from drivers won't easily be possible. I'll drop the arm-nommu patch for now, but I will pester your with this again once arm is the last architecture not sharing the common code. > > -- > RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up > According to speedtest.net: 8.21Mbps down 510kbps up ---end quoted text---