From patchwork Fri Aug 25 12:10:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 111012 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp909347qge; Fri, 25 Aug 2017 05:10:26 -0700 (PDT) X-Received: by 10.84.238.131 with SMTP id v3mr10935251plk.168.1503663026529; Fri, 25 Aug 2017 05:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503663026; cv=none; d=google.com; s=arc-20160816; b=Er6wcDf9PiYZTC62E7MDRcDdiZXVdEfrx3+AAVbvP6fLInmJ//xN/Z2sP8lO/kamTW GDUtwapDCcC+nZz4hx1kmBv6022fLrDpC4wEgmD6xs8nBYGb8F3NsuQhIDbWTDojuphZ YIl7njniLRDYRd9xfnIM+DsN0p/oF0Ka84Z/RWdQmEK1J+9e0LgeTL/Wpkxf5iM6zavs 9rwQoAE7DzZ408qpzH2BV0AKVX+AZuaLJXkCwjTjOpJlY0a619idniyywrVG2yMA7baL 2upK9+KuKovEiGv9DYCyR2wsY7Qx1kR+X8P1NTYTsWcNFKgFFCuKlu7dJQkZyVonf6uj fSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=iwL8/cbWJqJoBD8yVYmd+Wkrks3C64KpoJC8NhyP2BY=; b=WcTtvUqsbWW6j2nWDpeoVtk0sD7hB/SVVk5/hLKP9sL19jODGTnFg2C46MDwB5UU91 EM3U8IMXKiUdzzIYmZsNpn6aeANBDb+5if9NVRjH9jlPiYlcJ3XJOUmq4gtoJigI1k/6 aOxknRJz8o7Yo/OeHuDAip8mDYNt0ZjNrztOcJF200NU6CkHy3iKF6Dl2/KkFk09+PuR 1JBhoddx84kW5mEMcydF3KhVldSFbTof1ho/guTuMfkQAclP3R07bsi0fOWYM93pJiDX Lq7ERfNoVGHNxEjiBNRLI/HeHUkXNdgnFcHbX3OCJ37IEKifWQBk2T2JhAT1UgSj/trp ZVDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WDm/IdH/; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id r3si4514677pgf.128.2017.08.25.05.10.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Aug 2017 05:10:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WDm/IdH/; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 622C22095AE4F; Fri, 25 Aug 2017 05:07:49 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (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 60B4421D1E2FD for ; Fri, 25 Aug 2017 05:07:48 -0700 (PDT) Received: by mail-wr0-x236.google.com with SMTP id k46so2483546wre.0 for ; Fri, 25 Aug 2017 05:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jhXVSDreKaSdMu3eAGcY8dns7Gk/MLhZnlnvYXhlTOQ=; b=WDm/IdH/t0JYtyQLiTZKxZeNnLTdTOH+J6GZx4VVgodU65BtRR0ZGu5bl921Ni6Mdr fVnF6n3iDMM8f/Ytujuu5tLBA0i8/XzOc+JcjoFwYdaoRuLyJOws0Y99xSInrsxkdhl/ PY/l18/HXT/nA+MXyH9f9JVC+3VqYAOBWt64k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jhXVSDreKaSdMu3eAGcY8dns7Gk/MLhZnlnvYXhlTOQ=; b=PV7gHDbGY+GmpTjqPFaMJACFETpE0LxAxezZ+/B340r7drLc2wJnVJxXmpEUc+Zbjf FlDLBwM+w9OmZojcDvR35QoZDzENar29TvFO9ZEos8HoK+bMVIzo13wlzqre2Ezrt3ZZ WjOZvLt1B44Wh6qdp6epPuO1YhwVY0NQ0wRXLoSFHhPpbS19HUrdkyd1A853VFhI0ZGE mHHN6dS149RsJnj93qslcyQPgrh1CUwpDAuQwMhgBE50cVNE1MvR/Agct8HtvhXPUsrR WHTVmn0cCeljlZuDDRqirwP/WWydIiozHC9NWpaVaLLvkS/pLypiMLX5DbLncAnfRfED 9vQg== X-Gm-Message-State: AHYfb5gLoYcOE1OclCJhfZ+MuTc0bHxemLdZ1uQEcwASM8fFxY0T49H+ 5Oe3igHIWLADsQv9OTqfRA== X-Received: by 10.223.136.104 with SMTP id e37mr6184621wre.152.1503663022228; Fri, 25 Aug 2017 05:10:22 -0700 (PDT) Received: from localhost.localdomain ([105.137.125.182]) by smtp.gmail.com with ESMTPSA id 9sm1996137wmo.35.2017.08.25.05.10.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Aug 2017 05:10:21 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Fri, 25 Aug 2017 13:10:09 +0100 Message-Id: <20170825121014.15739-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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. 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm