From patchwork Fri Apr 13 14:05:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 7787 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 0B7A523E23 for ; Fri, 13 Apr 2012 14:06:43 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id A944BA18384 for ; Fri, 13 Apr 2012 14:06:42 +0000 (UTC) Received: by iage36 with SMTP id e36so5856270iag.11 for ; Fri, 13 Apr 2012 07:06:42 -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=a87a5zgRBi3FnXc6/OnCXcfxFXLFKI8RvAZJL1QPaX8=; b=C3vF1YGm+r+t3bRl040wMKxv1CxR7OmOZDrTaKsMCft2kuhkL/KsikgT+GmDnGuAfQ OP9UAEE+0QR9VVXrJoT+WG+AFHTKt9pt+226vq6KDciFTqnRQXAwA05dnq3F1J+u2SRS H/q1MUcnTh7JcyuZnaacx0RbIlYs4m4zPrQspkWT1SeEI+pQLa6AlR5kh3cRq4mNv5tZ B1O56E534QVpH3tuyTXOqfqgIPMacoTDsY4l3fEHbIiUFp6Z1lyAr8re/diWfmLYrHRh Vv7TJs3kcm56s+wt+8Vxs4s3r/QZ0psOSdqrwpcvTmUQJDWPsDs7bK6Pj+5AqwaNIoO9 nJ+Q== Received: by 10.50.34.200 with SMTP id b8mr1661173igj.50.1334326001961; Fri, 13 Apr 2012 07:06:41 -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.70.69 with SMTP id c5csp30261ibj; Fri, 13 Apr 2012 07:06:41 -0700 (PDT) Received: by 10.180.106.9 with SMTP id gq9mr5005844wib.17.1334326000743; Fri, 13 Apr 2012 07:06:40 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id t2si2404841wiw.9.2012.04.13.07.06.09; Fri, 13 Apr 2012 07:06:40 -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 1SIh8Z-0005hh-Is; Fri, 13 Apr 2012 14:06:07 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SIh8X-00053x-II for linaro-mm-sig@lists.linaro.org; Fri, 13 Apr 2012 14:06:05 +0000 MIME-version: 1.0 Received: from euspt1 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M2F00JUK8I8QP10@mailout4.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Fri, 13 Apr 2012 15:06:08 +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 <0M2F00AJY8I1YO@spt1.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Fri, 13 Apr 2012 15:06:02 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id BD6E227007A; Fri, 13 Apr 2012 16:16:28 +0200 (CEST) Date: Fri, 13 Apr 2012 16:05:49 +0200 From: Marek Szyprowski In-reply-to: <1334325950-7881-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: <1334325950-7881-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.1 References: <1334325950-7881-1-git-send-email-m.szyprowski@samsung.com> Cc: Russell King - ARM Linux , Arnd Bergmann , Konrad Rzeszutek Wilk , Kyungmin Park Subject: [Linaro-mm-sig] [PATCH 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: ALoCoQn9+VsXRbIZ2rQ245wQDVWmbGkUGLm/9OLigU4ienDNG0e7tzsyDSUBPbOvlfK+Vr2i6ZeS 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(+), 0 deletions(-) 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");