From patchwork Wed Aug 30 08:21:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 111269 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp552360ybm; Wed, 30 Aug 2017 01:21:21 -0700 (PDT) X-Google-Smtp-Source: ADKCNb78xxbesEEyd777AsX1KMFzGTl02gA65DV0sDkeoCoCq2hYfdo51wYkDpjhebhj6er88bly X-Received: by 10.98.34.146 with SMTP id p18mr812702pfj.306.1504081281510; Wed, 30 Aug 2017 01:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504081281; cv=none; d=google.com; s=arc-20160816; b=vmnxwGGIE6hcgNzdWUdtqeki45U6rVolTGMKirkCAy7+xDIPHpYBmN1Sk3X3n6df9J +UOf2oN6nENqjeDXXui5ZxEYhK4IjC4hvNFuzD8rwRSlL7PEEyNvL3Upg7xrigSuTxgc 3y70GzWEKhzXJrfXUn/c3mSoJNTae+GwvA8abk54g3nVRPC5qJtHxjmGgPlO7uXMt6w5 89hbsn/TS0z2oKyt7ss/FJKk5XWO6ooTSDENxI+T87ObZLw5C8k6NKkb/DxRGxPL2Wo9 0IMQN2yvuhf7x1XGCaOj3Sd3VbKRLOEbdzQixS/fPAtZtpXz+Z1adtPYldlPNqVMRqXq +iew== 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=pYeCNEDNEhfR3nB2S/HBidVaVurQf9YkTe4+LmKeO2Q=; b=NddiumNcDL6BfUoCQED74YH9GIduOZDCfPuYvcQeS4x/KbONfijvw/vJPy1wvppJux OJ31BPHnJk4HeoLH1jo4u3BdhQvoOz6CKghtBzh35hY59ZZiHiGNqU0p0tKsveFq6fMl WikA1Bsr0fsgugeZkB4fiTv210t5WNwjJtJncVnjFfdFYzvDcw8slHfVzLaESLI59d3W F4wrPLZzyKdn/lFREf3aoG6S6OqQsj84PsgYU14av2h4EtWYkusi+gLCZ6A3Uww+tg2s 6bWnofw0E+k6ayVZU7+mgD3noty8ENqFpmU+EAPuMNE4zLS4yuHN7jTzIwHFllsKRnLI U0Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JlEkFi3A; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id r1si4051623plb.274.2017.08.30.01.21.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Aug 2017 01:21:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JlEkFi3A; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 BC6DB21E95E13; Wed, 30 Aug 2017 01:18:38 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 9D93021E95E0F for ; Wed, 30 Aug 2017 01:18:36 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id z91so16346210wrc.1 for ; Wed, 30 Aug 2017 01:21:18 -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=59qYgT7BVpUTADGgs0bY15l5Z/7ntt+2LAqWIEd29Ng=; b=JlEkFi3A0m1f05IT84EVEp3CkzO1uYeK5iVOQzVkj5P49DNDp1t+f83mxI73qP8kYY iSW3h4lgOXJA/BGumqcQ6vw4zBwl9FI3beTNhYOXbwlhm/65JQgMkQG7A7hRbw4e9tBs opPfBdDwoEXjy8wsUYfJeC1W9fAWG0l/CHFws= 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=59qYgT7BVpUTADGgs0bY15l5Z/7ntt+2LAqWIEd29Ng=; b=uGydHP+ZYlkHg4CZVFSxPphRxVeHdYHxeJVVOPP/lHCm6X3Kh76NK+vg0jEbics06h x8vjf3XloatCTK+HHlskJUysU9qjfBPNYyjoM9TxLSLo7BAyuntO4ySC26CEsC0Yz5Ce f1weoE8OmomlDUpmrMKCwRBWP7urb67Er81coOHZjEH1mL6u0O4tqAoIbVMUPxhTzzm/ RdPgSN+K0fhI4fZnIzrwTBcAL50MvaQvKoSKWqUXI3aMRt8+ALzY+qJG1Kk+m2lWa1Zr dokkpuQ6x8rzzw6BIj+CTZAx1dRb9YAzrog0ZEYLXsEHJ9iWcudeDoHa8Lq7e0Hd3171 GoNQ== X-Gm-Message-State: AHYfb5jiy5yR0ZrdG5K1b+WDogwCIIrQSHxuwaDwUjP/EU8eke4BhI8K 28umxUmULV2kfnsO3F47hQ== X-Received: by 10.223.164.19 with SMTP id d19mr502443wra.302.1504081275961; Wed, 30 Aug 2017 01:21:15 -0700 (PDT) Received: from localhost.localdomain ([105.133.189.215]) by smtp.gmail.com with ESMTPSA id h8sm3051642wma.46.2017.08.30.01.21.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Aug 2017 01:21:15 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 30 Aug 2017 09:21:02 +0100 Message-Id: <20170830082108.7470-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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. 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm