Received: by 10.213.65.68 with SMTP id h4csp856844imn; Wed, 14 Mar 2018 02:04:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELvrPkzB7nhfFi9PSdwbMK4W+KsAS+RVHlAHTUTvxGFAA6bXrgvjIwg05EBevNC1ELjxaM9a X-Received: by 2002:a17:902:69ce:: with SMTP id m14-v6mr2281603pln.358.1521018292227; Wed, 14 Mar 2018 02:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521018292; cv=none; d=google.com; s=arc-20160816; b=jB3LJHiEmx5phHmIXJlCRg6t5IAbqcG05MGrbHxjJeXc2XGEqPmhCFfSqY7Ql7nZiC MqtBmh90XO2hMTMuIeRVnxn0SIJxSedVRG4XIWy5GrBHCLZ7LBDfhgO0FdcAt3+9PE5F LLNfU3IL7Q5/mlVKgpvIr+H3U/SzxD4UunUKahqw73vRSsYnzLbGczOO/XhJoiRgYm1Y HeRkOMXtWjdO9f1hOrvf3zMbDc3Ov73O8pV6quiAO/YTHsPCsRXVv85tQhOvPIE3Nl/T X8O7hJIgr/EbY9H8TZy+u1kl1TzpJ9dbsCrJ4C9mDufYZ+sxBeSXdp+kkfDGhLqYX4am CbWw== 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=fT1ZKgReRby6mVYTOBjuXOGVBdc3byjas+0xCP/Bl5w=; b=wkvk9bySazfZl7jdX1MojnoBFBZblREPHDpiriw3ofTC6ySrL0fWnAuoRyYtqR9cre BZkRJ3wm/WfbJEHLpyWFju8YAqiVQeW6gOL72tRC5ksIwXyU7P+xpWRECrhS0eb6CgOu E09/q+ghMnMK1mGlLeuECZmdsuRpqmwAXFV3enfCoqzv4So7rVeykdGd93f5ouHtrqM1 Jc2wEDaXRx9PU+Xzv7Z4BTuvYsn+PfP+3ovylzvQafGlAZKuns7vcrLtnbFPtzfUvS3R p2onRgjJtMDT5JyA4rk+VcpghEqIR/sUJW024d6XIPzagANnunNuJTNWFcMAnwjWYgwA RpXQ== 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 n10si1517604pgp.343.2018.03.14.02.04.37; Wed, 14 Mar 2018 02:04:52 -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 S1751976AbeCNJDK (ORCPT + 99 others); Wed, 14 Mar 2018 05:03:10 -0400 Received: from verein.lst.de ([213.95.11.211]:34731 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbeCNJDI (ORCPT ); Wed, 14 Mar 2018 05:03:08 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id A8CF19F160; Wed, 14 Mar 2018 10:03:06 +0100 (CET) Date: Wed, 14 Mar 2018 10:03:06 +0100 From: Christoph Hellwig To: Nipun Gupta Cc: Christoph Hellwig , "robin.murphy@arm.com" , "linux@armlinux.org.uk" , "gregkh@linuxfoundation.org" , "m.szyprowski@samsung.com" , "bhelgaas@google.com" , "dmitry.torokhov@gmail.com" , "rafael.j.wysocki@intel.com" , "jarkko.sakkinen@linux.intel.com" , "linus.walleij@linaro.org" , "johan@kernel.org" , "msuchanek@suse.de" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-pci@vger.kernel.org" Subject: Re: [PATCH] dma-mapping: move dma configuration to bus infrastructure Message-ID: <20180314090306.GF28983@lst.de> References: <1520868292-2479-1-git-send-email-nipun.gupta@nxp.com> <20180313073448.GA32269@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > Agree. There is no good point in duplicating the code. > So this new API will be part of 'drivers/base/dma-mapping.c' file? Yes. > > As mention in my previous reply I think we don't even need a deconfigure > > callback at this point - just remove the ACPI and OF wrappers and > > clear the dma ops. > > > > Also in this series we should replace the force_dma flag by use of the > > proper method, e.g. give a force parameter to of_dma_configure and the > > new dma_common_configure helper that the busses that want it can set. > > I am more inclined to what Robin states in other mail to keep symmetry. > i.e. to keep dma_configure() and dma_deconfigure() and call > dev->bus->dma_configure from dma_configure(). Is this okay? Sure.