From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Ard Biesheuvel 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: [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: Fri, 25 Aug 2017 12:07:48 -0000 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