From patchwork Mon Apr 22 05:09:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damian Hobson-Garcia X-Patchwork-Id: 2470011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 6F50E3FCA5 for ; Mon, 22 Apr 2013 05:09:57 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UU90W-000477-FL; Mon, 22 Apr 2013 05:09:40 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UU90R-00061e-Ah; Mon, 22 Apr 2013 05:09:35 +0000 Received: from mail-pd0-f178.google.com ([209.85.192.178]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UU90G-0005zr-4L for linux-arm-kernel@lists.infradead.org; Mon, 22 Apr 2013 05:09:25 +0000 Received: by mail-pd0-f178.google.com with SMTP id w11so3322172pde.37 for ; Sun, 21 Apr 2013 22:09:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=oe59MYAM76jOuhE6tdyaXWlPXUCanD8Fa7xYOn0J2do=; b=CqMREdgwV1ldtcbWRShL9zXivEGTwG++EZKpI/5aBv/xNwvRGflNGBh/iLvo56LkZA 7jMcX4TIXPtcgTwRyx+AjMq6KeH3oZGI26CJfS8hkeQmygrHoT9dVi98FSYMJboSJGPa quF4hcOnB7Ta9rXnLTuMc/3ygMB7Q72AdX3lbuukh0aKT358+n58pYhXAMg0KJ4w+5uh 4AKCaJC9JsOv34fXXiALsgTLLKpicr4tDW+rqEWgPZKwfVhIoVVqtlPfSum89rIGD6Ps MdMgqOGNonHTq3Ws5OMRihyHGrqomlD6sXunn/OBn9j5XpsZzrOXRaKZBnoprDKye0ct TXsg== X-Received: by 10.68.164.193 with SMTP id ys1mr30213361pbb.80.1366607361466; Sun, 21 Apr 2013 22:09:21 -0700 (PDT) Received: from localhost.localdomain ([219.106.231.132]) by mx.google.com with ESMTPS id fm2sm8652712pab.13.2013.04.21.22.09.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Apr 2013 22:09:20 -0700 (PDT) From: Damian Hobson-Garcia To: linux-kernel@vger.kernel.org Subject: [RFC/PATCH 1/4] arm64: Provide default implementation for dma_{alloc, free}_attrs Date: Mon, 22 Apr 2013 14:09:09 +0900 Message-Id: <1366607349-2992-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQlPJzbKp9/MpV1fLjWtdoyz6MJyDbswtnnK0HaK//9qHPo53Ld2Nv7Ye6qJlPLXlUZCC4sc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130422_010924_299259_2E0F8171 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.178 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: catalin.marinas@arm.com, will.deacon@arm.com, Damian Hobson-Garcia , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Most architectures that define CONFIG_HAVE_DMA, have implementations for both dma_alloc_attrs() and dma_free_attrs(). All achitectures that do not define CONFIG_HAVE_DMA also have both of these definitions provided by dma-mapping-broken.h. Add default implementations for these functions on arm64. Signed-off-by: Damian Hobson-Garcia --- arch/arm64/include/asm/dma-mapping.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index 9947768..65ab181 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h @@ -81,6 +81,9 @@ static inline void dma_mark_clean(void *addr, size_t size) { } +#define dma_alloc_attrs(d, s, h, f, a) dma_alloc_coherent(d, s, h, f) +#define dma_free_attrs(d, s, h, f, a) dma_free_coherent(d, s, h, f) + static inline void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags) {