Re: [PATCH v4 1/6] arch: unify ioremap prototypes and macro aliases

From: Toshi Kani
Date: Wed Jun 17 2015 - 13:35:49 EST

On Thu, 2015-06-11 at 17:19 -0400, Dan Williams wrote:
> 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.
> diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
> index 80a7e34be009..8588ef767a44 100644
> --- a/arch/ia64/include/asm/io.h
> +++ b/arch/ia64/include/asm/io.h
> @@ -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)

This ia64 io.h also defines ioremap_cache(). Should this be also
changed to resource_size_t?

static inline void __iomem * ioremap_cache (unsigned long phys_addr,
unsigned long size)
return ioremap(phys_addr, size);


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at