From patchwork Thu May 17 10:54:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 8713 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 B3DA523E63 for ; Thu, 17 May 2012 10:55:16 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6D6D6A186B2 for ; Thu, 17 May 2012 10:55:16 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1990124ggn.11 for ; Thu, 17 May 2012 03:55:16 -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=BluWXIOVN8j+5GQtsk9e0ChVV6AMWE+/SkbjQVRE+RE=; b=Wo+gS9k71XkWOOrrAK1MpGgvAeL4XV6RKPW6lE/673oesC5uDURIpKbtByRVwTmOs9 r+y+/ke8JmVlq2Zj5Dandg7X+DibvmDhA1cLH5O/g2CGabG4ROU7ao7Ia2NAkayr9SUn Fhv8oBBKY6jzuVn71Awle6IGgu66NsIXmAKdeNpGik/xM98wHkeEQWrP65Ug4dlkgXCP 0zjaIeV8cyqaVdzy+HCSLqzVIn9uN+QNCxRnQYTa5J4GZeTwIC+lTUHtpQc8sWGn/J/4 p9sX6nfroWBmdNu8z3fDPb5tmQ3/Brl/KVrIJ4he71dhkFQUwCOV5HX9LVbeRWQ3cuDG /mwg== Received: by 10.50.85.163 with SMTP id i3mr4684125igz.57.1337252115649; Thu, 17 May 2012 03:55:15 -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 o8csp19639ibd; Thu, 17 May 2012 03:55:13 -0700 (PDT) Received: by 10.180.106.7 with SMTP id gq7mr2635223wib.4.1337252113018; Thu, 17 May 2012 03:55:13 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id m21si6864765wee.8.2012.05.17.03.55.08; Thu, 17 May 2012 03:55:12 -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 1SUyMN-0004xI-HO; Thu, 17 May 2012 10:55:07 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SUyML-0004vy-8W for linaro-mm-sig@lists.linaro.org; Thu, 17 May 2012 10:55:05 +0000 Received: from euspt1 (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 <0M4500JKGY87EW@mailout1.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 17 May 2012 11:52:55 +0100 (BST) Received: from ubuntu.arm.acom ([106.210.236.191]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M4500MKCYBFX2@spt1.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 17 May 2012 11:55:04 +0100 (BST) Date: Thu, 17 May 2012 12:54:44 +0200 From: Marek Szyprowski In-reply-to: <1337252085-22039-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-kernel@vger.kernel.org Message-id: <1337252085-22039-4-git-send-email-m.szyprowski@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.10.1 References: <1337252085-22039-1-git-send-email-m.szyprowski@samsung.com> Cc: Russell King - ARM Linux , Arnd Bergmann , Konrad Rzeszutek Wilk , Kyungmin Park Subject: [Linaro-mm-sig] [PATCHv2 3/4] mm: vmalloc: add VM_DMA flag to indicate areas used by dma-mapping framework 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: ALoCoQnc3mdhUMftX67KCFTtH8egavKLuC/wWCufP2N5VEzJTN+X+Jb1ngyYbaeq2/42gOcs2bZa Add new type of vm_area intented to be used for consisten mappings created by dma-mapping framework. Signed-off-by: Marek Szyprowski Reviewed-by: Kyungmin Park --- include/linux/vmalloc.h | 1 + mm/vmalloc.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6071e91..8a9555a 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -14,6 +14,7 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */ #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ #define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */ +#define VM_DMA 0x00000040 /* used by dma-mapping framework */ /* bits [20..32] reserved for arch specific ioremap internals */ /* diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 8cb7f22..9c13bab 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2582,6 +2582,9 @@ static int s_show(struct seq_file *m, void *p) if (v->flags & VM_IOREMAP) seq_printf(m, " ioremap"); + if (v->flags & VM_DMA) + seq_printf(m, " dma"); + if (v->flags & VM_ALLOC) seq_printf(m, " vmalloc");