From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D8A9D21E95E15 for ; Wed, 30 Aug 2017 06:04:01 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id u126so9470794wmg.1 for ; Wed, 30 Aug 2017 06:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JaQQSQqpvlNbmEy6Q2rEp/v+bzlYEa/bXPdPTQ/tWNQ=; b=BgI2gJSOPjL5AA4G5OvMDM3/Nh8YG1Bi/Xm101BHsi9aoo6449PNflyP7frOQy1xBq yzSfu0lI0iQYB94dLm3t4XsEjj+uuXRfrAN2KjLXH/MB9jFi5KyqshVR/eyImzlRVZ9G yfr8SS5NOGnZ1UataXpcXPRtJwomODLZNtE7k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JaQQSQqpvlNbmEy6Q2rEp/v+bzlYEa/bXPdPTQ/tWNQ=; b=c7///gx6Qsi+XPJLieRnegEQ5q6jJ7VW2sRIOykqd5fLeltKngBvByL3d25QfzXPll aGvDdkHYrBn2KNC95OEUPBX8OfvoSJOL+tN+v9yzydbx0/VIh7f82BeCrRH+5zj2B1rq UygFpDn+qJ5xwDcajvAkEKuvLNRxbJHJmTy31IvjhR4v2uLUg8jVVRDJqoBxczODjCbo cLsn2y///6/33oFY8NeRF1d4e4lnrcpoP3J71Ub8GIoW3rj7247DuEiUc7WuT5pTijgh 9XixCc/LgjMU3ILzb8OyyR4llBdn/Yqc4lN/6QXnFXFGwMFoQS2G9qQre49dMphxYwc9 jkGQ== X-Gm-Message-State: AHYfb5i9BpTY0W1LEp5spGVRciJy6Phc7/3j6B5fwKtIvSHSO2wc2KKK dBmckBDGMNWTM+gV X-Received: by 10.28.9.139 with SMTP id 133mr1196922wmj.101.1504098402081; Wed, 30 Aug 2017 06:06:42 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id b196sm5273393wmd.29.2017.08.30.06.06.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Aug 2017 06:06:41 -0700 (PDT) Date: Wed, 30 Aug 2017 14:06:39 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20170830130639.dutwmsa5fzx3khsp@bivouac.eciton.net> References: <20170830082108.7470-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170830082108.7470-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH 0/6] ArmPkg EmbeddedPkg: clean up DmaLib implementations X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 13:04:02 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 30, 2017 at 09:21:02AM +0100, Ard Biesheuvel wrote: > Currently, we have two DmaLib implementations: a cache coherent one called > 'NullDmaLib' residing in EmbeddedPkg, and a non-cache coherent one called > 'ArmDmaLib', residinh in ArmPkg. > > In both cases, this is slightly awkward: NullDmaLib suggests no functionality > whatsoever, which is slightly misleading because 'nothing' is the correct > action in case of cache coherent DMA, rather than a lack of action. As for > ArmDmalib, this was never specific to ARM, and no longer depends on anything > that ArmPkg provides, so it does not really belong in ArmPkg anymore. > > So let's rename them to CoherentDmaLib and NonCoherentDmaLib, respectively, > and move that latter into EmbeddedPkg where it arguably belongs. To align > the two further, add support for non-1:1 DMA mappings to CoherentDmaLib as > well. > > Note that the final patch can only be merged after out-of-tree platforms > have switched from ArmDmaLib to NonCoherentDmaLib. For 4-6/6: Reviewed-by: Leif Lindholm > Ard Biesheuvel (6): > EmbeddedPkg: rename NullDmaLib to CoherentDmaLib > EmbeddedPkg/CoherentDmaLib: add support for non-1:1 DMA translation > EmbeddedPkg: implement NonCoherentDmaLib based on ArmDmaLib > Omap35xxPkg: switch to EmbeddedPkg's NonCoherentDmaLib > BeagleBoardPkg: switch to generic non-coherent DmaLib > ArmPkg: remove ArmDmaLib > > ArmPkg/ArmPkg.dsc | 2 - > ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf | 49 --------- > BeagleBoardPkg/BeagleBoardPkg.dsc | 2 +- > EmbeddedPkg/EmbeddedPkg.dec | 7 ++ > EmbeddedPkg/EmbeddedPkg.dsc | 3 +- > EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.c => CoherentDmaLib/CoherentDmaLib.c} | 10 +- > EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.inf => CoherentDmaLib/CoherentDmaLib.inf} | 19 ++-- > ArmPkg/Library/ArmDmaLib/ArmDmaLib.c => EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c | 105 +++++++++++--------- > EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf | 50 ++++++++++ > Omap35xxPkg/Omap35xxPkg.dsc | 2 +- > 10 files changed, 136 insertions(+), 113 deletions(-) > delete mode 100644 ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf > rename EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.c => CoherentDmaLib/CoherentDmaLib.c} (94%) > rename EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.inf => CoherentDmaLib/CoherentDmaLib.inf} (75%) > rename ArmPkg/Library/ArmDmaLib/ArmDmaLib.c => EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c (82%) > create mode 100644 EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf > > -- > 2.11.0 >