Re: [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 Mar 2012, Arnd Bergmann wrote:

> On Monday 05 March 2012, Nicolas Pitre wrote:
> > Given that the majority of existing platforms don't need the 
> > indirection, should we make this indirection conditional on 
> > CONFIG_NEED_IOREMAP_HOOK and let those who need it select it?  Or maybe 
> > this isn't performance critical and we just don't care?  In any case I'd 
> > like to see such reasoning captured in the commit log.
> 
> It's certainly not performance critical, but there may be some space overhead
> in the .text section of the kernel that we could avoid by adding another
> indirection.

Of course the size issue can be mitigated significantly by replacing:

extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
extern void (*arch_iounmap)(volatile void __iomem *);

#define __arch_ioremap                 arch_ioremap
#define __arch_iounmap                 arch_iounmap

by:

extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
extern void (*arch_iounmap)(volatile void __iomem *);

extern void __iomem * __arch_ioremap(unsigned long, size_t, unsigned int);
extern void __arch_iounmap(volatile void __iomem *);

and out of line:

void __iomem *__arch_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
{
	return arch_ioremap(phys_addr, size, mtype);
}

void __arch_iounmap(volatile void __iomem *io_addr)
{
	arch_iounmap(io_addr);
}


Nicolas

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [CentOS ARM]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]

  Powered by Linux