mm: vmalloc: add VM_DMA flag to indicate areas used by dma-mapping framework
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 13 Jun 2012 11:01:45 +0000 (13:01 +0200)
committerSubash Patel <subash.rp@samsung.com>
Fri, 15 Jun 2012 19:26:08 +0000 (12:26 -0700)
Add new type of vm_area intented to be used for mappings created by
dma-mapping framework.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
include/linux/vmalloc.h
mm/vmalloc.c

index 2e28f4d..e725b7b 100644 (file)
@@ -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 */
 
 /*
index 8bc7f3e..4f4c093 100644 (file)
@@ -2574,6 +2574,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");