diff options
Diffstat (limited to 'arch/csky/mm/ioremap.c')
-rw-r--r-- | arch/csky/mm/ioremap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/csky/mm/ioremap.c b/arch/csky/mm/ioremap.c index cb7c03e5cd21..8473b6bdf512 100644 --- a/arch/csky/mm/ioremap.c +++ b/arch/csky/mm/ioremap.c | |||
@@ -46,3 +46,17 @@ void iounmap(void __iomem *addr) | |||
46 | vunmap((void *)((unsigned long)addr & PAGE_MASK)); | 46 | vunmap((void *)((unsigned long)addr & PAGE_MASK)); |
47 | } | 47 | } |
48 | EXPORT_SYMBOL(iounmap); | 48 | EXPORT_SYMBOL(iounmap); |
49 | |||
50 | pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | ||
51 | unsigned long size, pgprot_t vma_prot) | ||
52 | { | ||
53 | if (!pfn_valid(pfn)) { | ||
54 | vma_prot.pgprot |= _PAGE_SO; | ||
55 | return pgprot_noncached(vma_prot); | ||
56 | } else if (file->f_flags & O_SYNC) { | ||
57 | return pgprot_noncached(vma_prot); | ||
58 | } | ||
59 | |||
60 | return vma_prot; | ||
61 | } | ||
62 | EXPORT_SYMBOL(phys_mem_access_prot); | ||