Message ID | 1337260441-8121-3-git-send-email-m.szyprowski@samsung.com |
---|---|
State | Accepted |
Commit | 47142f07eea32e9c108f548a4b06c28bec7df6e4 |
Headers | show
Return-Path: <patch+caf_=linaro-patchwork=canonical.com@linaro.org> 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 44C8D23F04 for <patchwork@peony.canonical.com>; Thu, 17 May 2012 13:16:09 +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 F1A19A18B71 for <linaro-patchwork@canonical.com>; Thu, 17 May 2012 13:16:08 +0000 (UTC) Received: by yenq6 with SMTP id q6so2107124yen.11 for <linaro-patchwork@canonical.com>; Thu, 17 May 2012 06:16:08 -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:date:from :in-reply-to:to:message-id:mime-version: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=ExwpQE3KzY6uj4gz6aa7XfmT0g3zsEbB8ifFbsuUPiY=; b=F+M9c7yZnRVw9HfcBKbyYbycYdpKIeMFzYY0SUJbN+PViVu5Gm7X1NZr9pt9sHx1YV cMnlDEwWUR7ub0GnXNXhkBa2jszzHc6/J9nrPMkIGAJDj4JBhXby1LEy4kSIHuNaIZr6 8loOMTN2bDmhEME6/yvQXA64U4mKDXzrQg7bgqM5rd3TFdTCbPqB/C6umbaKnqz+vdav ys0wKlKcjoV/gVDo7J4C19y3yExZctzjTrMrAW2FS/Bz9oATHzimFfvb9kr/yzX1vOgY lJbiIM6TJhOX3QBTMhqg4k/tVcCPZqrqK9BvHt1lu65+PUPAtyhR9xhLdf1/zjknsBR/ 6HAg== Received: by 10.50.203.39 with SMTP id kn7mr5178647igc.53.1337260567880; Thu, 17 May 2012 06:16:07 -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.35.72 with SMTP id o8csp27099ibd; Thu, 17 May 2012 06:16:07 -0700 (PDT) Received: by 10.180.81.234 with SMTP id d10mr18224255wiy.10.1337260565877; Thu, 17 May 2012 06:16:05 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id 16si1901467wet.60.2012.05.17.06.16.03; Thu, 17 May 2012 06:16:05 -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 <linaro-mm-sig-bounces@lists.linaro.org>) id 1SV0Yl-0000Yg-6l; Thu, 17 May 2012 13:16:03 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from <m.szyprowski@samsung.com>) id 1SV0Yi-0000X9-Su for linaro-mm-sig@lists.linaro.org; Thu, 17 May 2012 13:16:00 +0000 Received: from euspt2 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M4600JKS4R1GU@mailout1.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 17 May 2012 14:13:49 +0100 (BST) Received: from ubuntu.arm.acom ([106.210.236.191]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M46005864TPC2@spt2.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 17 May 2012 14:15:57 +0100 (BST) Date: Thu, 17 May 2012 15:13:52 +0200 From: Marek Szyprowski <m.szyprowski@samsung.com> In-reply-to: <1337260441-8121-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: <1337260441-8121-3-git-send-email-m.szyprowski@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.10.1 References: <1337260441-8121-1-git-send-email-m.szyprowski@samsung.com> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>, Arnd Bergmann <arnd@arndb.de>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Kyungmin Park <kyungmin.park@samsung.com>, Andrzej Pietrasiewicz <andrzej.p@samsung.com>, KyongHo Cho <pullip.cho@samsung.com>, Joerg Roedel <joro@8bytes.org> Subject: [Linaro-mm-sig] [PATCHv10 02/11] ARM: dma-mapping: use dma_mmap_from_coherent() X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." <linaro-mm-sig.lists.linaro.org> List-Unsubscribe: <http://lists.linaro.org/mailman/options/linaro-mm-sig>, <mailto:linaro-mm-sig-request@lists.linaro.org?subject=unsubscribe> List-Archive: <http://lists.linaro.org/pipermail/linaro-mm-sig> List-Post: <mailto:linaro-mm-sig@lists.linaro.org> List-Help: <mailto:linaro-mm-sig-request@lists.linaro.org?subject=help> List-Subscribe: <http://lists.linaro.org/mailman/listinfo/linaro-mm-sig>, <mailto:linaro-mm-sig-request@lists.linaro.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQmWXfwKNQ9EHQWPvbMJ40OmVRwIQGJsqCiJTjLWKTb+U9WFuS2eyMTHVykKgNGErumt+wGO |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index db23ae4..7ec0863 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -401,6 +401,9 @@ static int dma_mmap(struct device *dev, struct vm_area_struct *vma, unsigned long user_size, kern_size; struct arm_vmregion *c; + if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret)) + return ret; + user_size = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; c = arm_vmregion_find(&consistent_head, (unsigned long)cpu_addr);
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- arch/arm/mm/dma-mapping.c | 3 +++ 1 file changed, 3 insertions(+)