lkml.org 
[lkml]   [2015]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 1/6] arch: unify ioremap prototypes and macro aliases
From
Date
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);
}

-Toshi



\
 
 \ /
  Last update: 2015-06-17 20:01    [W:0.095 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site