From patchwork Wed Jun 13 11:01:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9260 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 0F1C523DEB for ; Wed, 13 Jun 2012 11:02:39 +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 B771BA18487 for ; Wed, 13 Jun 2012 11:02:38 +0000 (UTC) Received: by ggnf1 with SMTP id f1so279561ggn.11 for ; Wed, 13 Jun 2012 04:02:38 -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:x-auditid :from:to:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:x-tm-as-mml:cc:subject:x-beenthere :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=eGiQY39dmUNi4Mj58RGnWQ/7mM9/2OGESHT9FfxAjgo=; b=pmuzlkYOau3mVrz8m7xOpYWWB1548eyJ60cx+P4MN7z7tclt3SpppOCExOqy+sclSI hUgyD6HTKIt5TnaW+JjeAPMC/UY6IEqTKSOwI8ga9+1S4mQ4C3Awxb9A2p4Rzyjyiywu qSkgKieT8+U6Mav4MYvTRuzli+DcxXsxhi9fhSg6WwqCWNEtx6vjb5NigUaPZzPIDln/ 6+6kqu+0aA77tJdi8w+/LacWtWGCHBfRsprber/kUsRolejb7i08OLc5a69XR2XKkKtJ ltEKN8yl95rXACsUGXKZ0lqh8mQSIdFBaH6rSbE3vviXPE3//1ruCvoWZaEMt3I9ShDR YPvw== Received: by 10.50.160.198 with SMTP id xm6mr10239480igb.0.1339585357950; Wed, 13 Jun 2012 04:02:37 -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.24.148 with SMTP id v20csp15888ibb; Wed, 13 Jun 2012 04:02:36 -0700 (PDT) Received: by 10.204.155.139 with SMTP id s11mr13508884bkw.106.1339585354886; Wed, 13 Jun 2012 04:02:34 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id gk5si1279855bkc.125.2012.06.13.04.02.33; Wed, 13 Jun 2012 04:02:34 -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 1SelLH-0002T6-77; Wed, 13 Jun 2012 11:02:27 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SelLF-0002Sl-8T for linaro-mm-sig@lists.linaro.org; Wed, 13 Jun 2012 11:02:25 +0000 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M5J0008QYNZQ111@mailout4.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 13 Jun 2012 20:02:24 +0900 (KST) X-AuditID: cbfee61b-b7fcc6d000003a7a-cf-4fd8733fab27 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 9A.3D.14970.F3378DF4; Wed, 13 Jun 2012 20:02:24 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M5J00EDHYN9NO40@mmp2.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 13 Jun 2012 20:02:23 +0900 (KST) From: Marek Szyprowski To: linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Wed, 13 Jun 2012 13:01:45 +0200 Message-id: <1339585306-7147-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1339585306-7147-1-git-send-email-m.szyprowski@samsung.com> References: <1339585306-7147-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jQV2H4hv+Bo/4Lb5cecjkwOhx+99j 5gDGKC6blNSczLLUIn27BK6ME9t5CjZwVfxc0szawLiDo4uRk0NCwERi7rk2VghbTOLCvfVs XYxcHEIC0xklLj1/zAThrGWSaHl4ngWkik3AUKLrbRdQFQeHiECNxLwZjCA1zAJzmSXu7fzJ DlIjLJAq8WTzQrCpLAKqEldfnGUDsXkF3CWabl5khNgmL/H0fh9YnFPAQ+LDgRVg9UJANT+7 e5knMPIuYGRYxSiaWpBcUJyUnmukV5yYW1yal66XnJ+7iRHs8WfSOxhXNVgcYhTgYFTi4Y0o uOEvxJpYVlyZe4hRgoNZSYT3WTZQiDclsbIqtSg/vqg0J7X4EKM0B4uSOG+T9QV/IYH0xJLU 7NTUgtQimCwTB6dUA+OcaLV8/zKvylenu8LvXH3ilG2dvMnh1P7eeffjuC9vXnRwes0Mr7Dm vIb/M7/tSogR+bcqYHVSr6hs5KU/+b+2PT/4LfNcUOp8hQ2f8hUTVB6fePnIsOdkpOUxH81l 8UoqfbuEJjRGqUtLS3+ZFnviZcitaaxP15ZOn3pRq/67zvb2iMY14e1KLMUZiYZazEXFiQCb R6Sy9AEAAA== X-TM-AS-MML: No Cc: Russell King - ARM Linux , Arnd Bergmann , Konrad Rzeszutek Wilk , Kyungmin Park , Minchan Kim Subject: [Linaro-mm-sig] [PATCHv3 2/3] 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: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQl7CzHMSHge3ic0T6mpJMlSFVZRDXU9zzByaHOSPvG/IKrEXoPwomK+bpWrEs8ueMZRdZUi Add new type of vm_area intented to be used for 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(+), 0 deletions(-) diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 2e28f4d..e725b7b 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 11308f0..e04d59b 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2575,6 +2575,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");