From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::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 1B83421E2BE5C for ; Tue, 29 Aug 2017 08:42:10 -0700 (PDT) Received: by mail-wr0-x231.google.com with SMTP id z91so11467811wrc.1 for ; Tue, 29 Aug 2017 08:44:50 -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=7Yt6TXkKs2fK4wY9L8fMIbPlosUO0O40U3IWXMvKtNE=; b=FfxDjjxALrp6rxhgFRgvbtaNk2dq0bQ/3e9hLHxHkzNW8slq9hxWvBZ1TwmXNirP2L V29ejMTfE9pgaCq6mH0gPlxuPHcq23wTL/Ss0ljU2cZmzDNEc4IM6Kh9Yn6vfYbhl1+D lYLYufO+NHFae3KrrUhApjCCe1qyamjyz21mk= 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=7Yt6TXkKs2fK4wY9L8fMIbPlosUO0O40U3IWXMvKtNE=; b=aZYIpsCvtqBntWBYD64aTAWVTey6fP1iNKFKlAlzSUE7cvYaTtm2QSC85aZSQEnTAG Sy4ZnIH8dedt3YYevdDkiFrWw1TZx61F5k8qb4qQFV75Gg+hBI12ammki//4MbblNTNc 4NGvBxnSgkAwxjBpCCZSfZZG4nBcEcTYsUr5LX4fmXxtH6I9m8i27Qdi+P5zRn2ifdIA zgDtt6fLR8xy0cwxZttYgw+JyCBlaZnnyVzKv040yMj+32LHmEz/SSAoXCDUFmqOtVCX j8LwG5zC/YNMqhLuZR24d87LZJjGwUkg8h7HklsBAqOqZiYwN2y9no4Tp89s+caioHtk ukXw== X-Gm-Message-State: AHYfb5i7qQHqf7lgNSh60/CAegx73ThSSqD6ARcRcdZJzP1VgRqyiRE6 HmGJoJHH3F/szRcw X-Received: by 10.223.195.207 with SMTP id d15mr581963wrg.4.1504021489278; Tue, 29 Aug 2017 08:44:49 -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 s36sm2982486wrc.14.2017.08.29.08.44.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Aug 2017 08:44:48 -0700 (PDT) Date: Tue, 29 Aug 2017 16:44:46 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20170829154446.d32yijnzbzlhw6b5@bivouac.eciton.net> References: <20170825121014.15739-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170825121014.15739-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH 0/5] ArmPkg et al: remove UncachedMemoryallocationLib 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: Tue, 29 Aug 2017 15:42:10 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 25, 2017 at 01:10:09PM +0100, Ard Biesheuvel wrote: > This series is a followup to 'ArmPkg/ArmDmaLib: remove dependency on > UncachedMemoryAllocationLib' sent out yesterday, and removes library > entirely. > > There are two reasons for this: > - UncachedMemoryAllocationLib is often abused by drivers that should > be using DMA abstractions instead. It is up to the platform to decide > whether DMA is cache coherent or not, and the fact that non-cache > coherent DMA may be implemented using uncached allocations should remain > an implementation detail of the DmaLib instance. > > - The code is poorly maintained, only frees its allocations in the destructor, > and misleads by exposing pool allocate/free entry points that are actually > backed by page based allocations. > > Patches #1 and #2 add a DmaAllocateAlignedBuffer() to DmaLib and both > its implementations. This is required for current users of > UncachedMemoryAllocationLib that rely on minimum alignment to be able > to switch the DmaLib. > > Patches #3 and #4 remove a couple of stale references. > > Patch #5 actually removes the library and its single remaining implementation. For the series: Reviewed-by: Leif Lindholm However, this breaks a bunch of (edk2-)platforms: juno, fvp, tc2, hikey and armada70x0. Is there a follow-on patch coming for those, and could you hold off on pushing this series until that is ready? Armada has the only non-bogus UncachedMemoryAllocationLib dependency, the others are just trivial deletions. / Leif > Ard Biesheuvel (5): > EmbeddedPkg/DmaLib: add routine to allocate aligned buffers > ArmPkg/ArmDmaLib: implement DmaAllocateAlignedBuffer() > BeagleBoardPkg: remove UncachedMemoryAllocationLib resolutions > Omap35xxPkg: remove bogus UncachedMemoryAllocationLib dependency > ArmPkg: remove UncachedMemoryAllocationLib > > ArmPkg/ArmPkg.dec | 4 - > ArmPkg/ArmPkg.dsc | 2 - > ArmPkg/Include/Library/UncachedMemoryAllocationLib.h | 665 ------------------ > ArmPkg/Library/ArmDmaLib/ArmDmaLib.c | 42 +- > ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c | 719 -------------------- > ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf | 50 -- > BeagleBoardPkg/BeagleBoardPkg.dsc | 2 - > EmbeddedPkg/Include/Library/DmaLib.h | 30 +- > EmbeddedPkg/Library/NullDmaLib/NullDmaLib.c | 48 +- > Omap35xxPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.inf | 1 + > Omap35xxPkg/Library/OmapDmaLib/OmapDmaLib.inf | 1 - > Omap35xxPkg/Omap35xxPkg.dsc | 2 - > 12 files changed, 112 insertions(+), 1454 deletions(-) > delete mode 100644 ArmPkg/Include/Library/UncachedMemoryAllocationLib.h > delete mode 100644 ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c > delete mode 100644 ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf > > -- > 2.11.0 >