hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arc/mm/ioremap.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * 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.
74 */
85
96 #include <linux/vmalloc.h>
....@@ -56,9 +53,10 @@
5653 void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
5754 unsigned long flags)
5855 {
56
+ unsigned int off;
5957 unsigned long vaddr;
6058 struct vm_struct *area;
61
- phys_addr_t off, end;
59
+ phys_addr_t end;
6260 pgprot_t prot = __pgprot(flags);
6361
6462 /* Don't allow wraparound, zero size */
....@@ -75,7 +73,7 @@
7573
7674 /* Mappings have to be page-aligned */
7775 off = paddr & ~PAGE_MASK;
78
- paddr &= PAGE_MASK;
76
+ paddr &= PAGE_MASK_PHYS;
7977 size = PAGE_ALIGN(end + 1) - paddr;
8078
8179 /*
....@@ -95,7 +93,7 @@
9593 EXPORT_SYMBOL(ioremap_prot);
9694
9795
98
-void iounmap(const void __iomem *addr)
96
+void iounmap(const volatile void __iomem *addr)
9997 {
10098 /* weird double cast to handle phys_addr_t > 32 bits */
10199 if (arc_uncached_addr_space((phys_addr_t)(u32)addr))