diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-03 08:55:13 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-09-04 11:13:19 +0200 |
commit | fe9041c245196c6c61091ccc2c74b73ab9a5fc50 (patch) | |
tree | 0af220ef01c93e8f1fc70e2681acdb7b204445df /mm/vmalloc.c | |
parent | 249baa54790171438524ba97e8e0485dd6aa2762 (diff) | |
download | linux-fe9041c245196c6c61091ccc2c74b73ab9a5fc50.tar.bz2 |
vmalloc: lift the arm flag for coherent mappings to common code
The arm architecture had a VM_ARM_DMA_CONSISTENT flag to mark DMA
coherent remapping for a while. Lift this flag to common code so
that we can use it generically. We also check it in the only place
VM_USERMAP is directly check so that we can entirely replace that
flag as well (although I'm not even sure why we'd want to allow
remapping DMA appings, but I'd rather not change behavior).
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7ba11e12a11f..c1246d77cf75 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2993,7 +2993,7 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr, if (!area) return -EINVAL; - if (!(area->flags & VM_USERMAP)) + if (!(area->flags & (VM_USERMAP | VM_DMA_COHERENT))) return -EINVAL; if (kaddr + size > area->addr + get_vm_area_size(area)) @@ -3496,6 +3496,9 @@ static int s_show(struct seq_file *m, void *p) if (v->flags & VM_USERMAP) seq_puts(m, " user"); + if (v->flags & VM_DMA_COHERENT) + seq_puts(m, " dma-coherent"); + if (is_vmalloc_addr(v->pages)) seq_puts(m, " vpages"); |