@@ -34,17 +34,17 @@ static inline void * phys_to_virt(unsigned long address)
return __va(address);
}
-extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
-extern void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot);
+extern void __iomem * __ioremap(resource_size_t offset, unsigned long size, unsigned long flags);
+extern void __iomem * __ioremap_prot(resource_size_t phys_addr, unsigned long size, pgprot_t prot);
-static inline void __iomem * ioremap (unsigned long offset, unsigned long size)
+static inline void __iomem * ioremap (resource_size_t offset, unsigned long size)
{
return __ioremap(offset, size, 0);
}
extern void iounmap(volatile void * __iomem addr);
-extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size);
+extern void __iomem * ioremap_nocache(resource_size_t offset, unsigned long size);
/*
* IO bus memory addresses are also 1:1 with the physical address
@@ -27,7 +27,7 @@
* have to convert them into an offset in a page-aligned mapping, but the
* caller shouldn't need to know that small detail.
*/
-void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot)
+void __iomem * __ioremap_prot(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
{
void __iomem * addr;
struct vm_struct * area;
@@ -60,7 +60,7 @@ void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgpro
return (void __iomem *) (offset + (char __iomem *)addr);
}
-void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
+void __iomem * __ioremap(resource_size_t phys_addr, unsigned long size, unsigned long flags)
{
return __ioremap_prot(phys_addr, size,
__pgprot(_PAGE_PRESENT | __READABLE |
@@ -76,7 +76,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
* Must be freed with iounmap.
*/
-void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size)
+void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size)
{
return __ioremap(phys_addr | MEM_NON_CACHEABLE, size, 0);
}
@@ -424,8 +424,8 @@ __writeq (unsigned long val, volatile void __iomem *addr)
# ifdef __KERNEL__
-extern void __iomem * ioremap(unsigned long offset, unsigned long size);
-extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
+extern void __iomem * ioremap(resource_size_t offset, unsigned long size);
+extern void __iomem * ioremap_nocache (resource_size_t offset, unsigned long size);
extern void iounmap (volatile void __iomem *addr);
extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size);
#define early_memremap(phys_addr, size) early_ioremap(phys_addr, size)
@@ -32,7 +32,7 @@ early_ioremap (unsigned long phys_addr, unsigned long size)
}
void __iomem *
-ioremap (unsigned long phys_addr, unsigned long size)
+ioremap (resource_size_t phys_addr, unsigned long size)
{
void __iomem *addr;
struct vm_struct *area;
@@ -102,7 +102,7 @@ ioremap (unsigned long phys_addr, unsigned long size)
EXPORT_SYMBOL(ioremap);
void __iomem *
-ioremap_nocache (unsigned long phys_addr, unsigned long size)
+ioremap_nocache (resource_size_t phys_addr, unsigned long size)
{
if (kern_mem_attribute(phys_addr, size) & EFI_MEMORY_WB)
return NULL;
@@ -720,7 +720,7 @@ extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size,
unsigned long flags);
extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size);
-#define ioremap_nocache(addr, size) ioremap((addr), (size))
+#define ioremap_nocache ioremap
extern void iounmap(volatile void __iomem *addr);
@@ -395,14 +395,14 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src,
/* On sparc64 we have the whole physical IO address space accessible
* using physically addressed loads and stores, so this does nothing.
*/
-static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
+static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
{
return (void __iomem *)offset;
}
-#define ioremap_nocache(X,Y) ioremap((X),(Y))
-#define ioremap_wc(X,Y) ioremap((X),(Y))
-#define ioremap_wt(X,Y) ioremap((X),(Y))
+#define ioremap_nocache ioremap
+#define ioremap_wc ioremap
+#define ioremap_wt ioremap
static inline void iounmap(volatile void __iomem *addr)
{
Some archs define the first parameter to ioremap() as unsigned long, while the balance define it as resource_size_t. Unify on resource_size_t to enable passing ioremap function pointers. Also, some archs use function-like macros for defining ioremap aliases, but asm-generic/iomap.h expects object-like macros, unify on the latter. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- arch/cris/include/asm/io.h | 8 ++++---- arch/cris/mm/ioremap.c | 6 +++--- arch/ia64/include/asm/io.h | 4 ++-- arch/ia64/mm/ioremap.c | 4 ++-- arch/powerpc/include/asm/io.h | 2 +- arch/sparc/include/asm/io_64.h | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-)