.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #include <linux/vmalloc.h> |
---|
.. | .. |
---|
56 | 53 | void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size, |
---|
57 | 54 | unsigned long flags) |
---|
58 | 55 | { |
---|
| 56 | + unsigned int off; |
---|
59 | 57 | unsigned long vaddr; |
---|
60 | 58 | struct vm_struct *area; |
---|
61 | | - phys_addr_t off, end; |
---|
| 59 | + phys_addr_t end; |
---|
62 | 60 | pgprot_t prot = __pgprot(flags); |
---|
63 | 61 | |
---|
64 | 62 | /* Don't allow wraparound, zero size */ |
---|
.. | .. |
---|
75 | 73 | |
---|
76 | 74 | /* Mappings have to be page-aligned */ |
---|
77 | 75 | off = paddr & ~PAGE_MASK; |
---|
78 | | - paddr &= PAGE_MASK; |
---|
| 76 | + paddr &= PAGE_MASK_PHYS; |
---|
79 | 77 | size = PAGE_ALIGN(end + 1) - paddr; |
---|
80 | 78 | |
---|
81 | 79 | /* |
---|
.. | .. |
---|
95 | 93 | EXPORT_SYMBOL(ioremap_prot); |
---|
96 | 94 | |
---|
97 | 95 | |
---|
98 | | -void iounmap(const void __iomem *addr) |
---|
| 96 | +void iounmap(const volatile void __iomem *addr) |
---|
99 | 97 | { |
---|
100 | 98 | /* weird double cast to handle phys_addr_t > 32 bits */ |
---|
101 | 99 | if (arc_uncached_addr_space((phys_addr_t)(u32)addr)) |
---|