From patchwork Fri May 11 08:33:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 8530 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CA21D23E13 for ; Fri, 11 May 2012 08:33:51 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7D868A18410 for ; Fri, 11 May 2012 08:33:51 +0000 (UTC) Received: by yenq6 with SMTP id q6so2964498yen.11 for ; Fri, 11 May 2012 01:33:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :mime-version:date:from:in-reply-to:to:message-id:x-mailer :references:cc:subject:x-beenthere:x-mailman-version:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:sender :errors-to:x-gm-message-state; bh=czwco0Bf7sQtGpXy5XGedELBgfebkuUtaASrgNYIB4A=; b=IL4HwKgl7vz/ifBoaaOiW/Vq9FTNUN+ggnaZHPqlD95JW5RnRO31q8jOPX2bvQuinb uFu7JfB/mk1Os0kOFUwtTYdOl+RCOLB2j2fgKJ2oFxPVrDyAwFm6yNGQTYuzm84hCKxE 78rtA70IIbeTw8pzPuJzZY1+vlzgj6pLL6a9joTs29fF2TwbFwqjLjEpwJ3figV30K6u bCaR2ONXtbdGLPtopeb+BanqG6MZhu8tCy9mEj+Ir9on00e7O7AjogEhMFA3fNe2oMHt keo3URg/1P4h059y9kVNU3eKqgWbU72rLVavgCw7IjaLYML0FIh9QSXwu0mrD6kjtsSl 8WUA== Received: by 10.50.10.225 with SMTP id l1mr1185579igb.1.1336725230851; Fri, 11 May 2012 01:33:50 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.73.147 with SMTP id q19csp158218ibj; Fri, 11 May 2012 01:33:50 -0700 (PDT) Received: by 10.204.154.142 with SMTP id o14mr4221931bkw.116.1336725229453; Fri, 11 May 2012 01:33:49 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id ty10si7153600bkb.93.2012.05.11.01.33.47; Fri, 11 May 2012 01:33:49 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SSlIH-0005m7-VI; Fri, 11 May 2012 08:33:46 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SSlIH-0005lp-Ac for linaro-mm-sig@lists.linaro.org; Fri, 11 May 2012 08:33:45 +0000 MIME-version: 1.0 Received: from euspt1 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M3U00ACDNR1OA30@mailout3.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Fri, 11 May 2012 09:33:01 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M3U008GWNS7BE@spt1.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Fri, 11 May 2012 09:33:43 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id E7E2E270059; Fri, 11 May 2012 10:39:41 +0200 (CEST) Date: Fri, 11 May 2012 10:33:36 +0200 From: Marek Szyprowski In-reply-to: <1334756652-30830-1-git-send-email-m.szyprowski@samsung.com> To: linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, iommu@lists.linux-foundation.org Message-id: <1336725216-24434-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.10 References: <1334756652-30830-1-git-send-email-m.szyprowski@samsung.com> Cc: Russell King - ARM Linux , Arnd Bergmann , Konrad Rzeszutek Wilk , Benjamin Herrenschmidt , Paul Gortmaker , Kyungmin Park , Andrzej Pietrasiewicz , KyongHo Cho , Joerg Roedel Subject: [Linaro-mm-sig] [PATCH] ARM: dma-mapping: fix build break on no-MMU systems X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQk9OY/fv8wKrBNkLyLvJqXLoTN6MTrmfrX2janyOt8EbBILfJh0HYdkSEdkTNB6DK57QFCp Fix the following build issue: arch/arm/mm/dma-mapping.c:726:42: error: 'pgprot_kernel' undeclared (first use in this function) make[2]: *** [arch/arm/mm/dma-mapping.o] Error 1 Reported-by: Paul Gortmaker Signed-off-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 2d11aa0..686ef02 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -428,10 +428,19 @@ static void __dma_free_remap(void *cpu_addr, size_t size) arm_vmregion_free(&consistent_head, c); } +static inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot) +{ + prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ? + pgprot_writecombine(prot) : + pgprot_dmacoherent(prot); + return prot; +} + #else /* !CONFIG_MMU */ #define __dma_alloc_remap(page, size, gfp, prot, c) page_address(page) #define __dma_free_remap(addr, size) do { } while (0) +#define __get_dma_pgprot(attrs, prot) __pgprot(0) #endif /* CONFIG_MMU */ @@ -471,14 +480,6 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, return addr; } -static inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot) -{ - prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ? - pgprot_writecombine(prot) : - pgprot_dmacoherent(prot); - return prot; -} - /* * Allocate DMA-coherent memory space and return both the kernel remapped * virtual and bus address for that space.