forked from luck/tmp_suning_uos_patched
ARM: io: make iounmap() a simple macro
Defining iounmap() with arguments prevents it from being used as a function pointer, causing platforms to work around this. Instead, define it to be a simple macro. Do the same for __arch_io(re|un)map too. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
cf7d7e5a19
commit
a0b7bd0829
|
@ -245,13 +245,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
|
|||
#define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE)
|
||||
#define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED)
|
||||
#define ioremap_wc(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_WC)
|
||||
#define iounmap(cookie) __iounmap(cookie)
|
||||
#define iounmap __iounmap
|
||||
#else
|
||||
#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
|
||||
#define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
|
||||
#define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
|
||||
#define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC)
|
||||
#define iounmap(cookie) __arch_iounmap(cookie)
|
||||
#define iounmap __arch_iounmap
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#define __mem_isa(a) (a)
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#define __arch_ioremap(p, s, t) davinci_ioremap(p, s, t)
|
||||
#define __arch_iounmap(v) davinci_iounmap(v)
|
||||
#define __arch_ioremap davinci_ioremap
|
||||
#define __arch_iounmap davinci_iounmap
|
||||
|
||||
void __iomem *davinci_ioremap(unsigned long phys, size_t size,
|
||||
unsigned int type);
|
||||
|
|
|
@ -35,7 +35,7 @@ extern u32 iop13xx_atux_mem_base;
|
|||
extern size_t iop13xx_atue_mem_size;
|
||||
extern size_t iop13xx_atux_mem_size;
|
||||
|
||||
#define __arch_ioremap(a, s, f) __iop13xx_ioremap(a, s, f)
|
||||
#define __arch_iounmap(a) __iop13xx_iounmap(a)
|
||||
#define __arch_ioremap __iop13xx_ioremap
|
||||
#define __arch_iounmap __iop13xx_iounmap
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,7 @@ extern void __iop3xx_iounmap(void __iomem *addr);
|
|||
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
|
||||
#define __mem_pci(a) (a)
|
||||
|
||||
#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f)
|
||||
#define __arch_iounmap(a) __iop3xx_iounmap(a)
|
||||
#define __arch_ioremap __iop3xx_ioremap
|
||||
#define __arch_iounmap __iop3xx_iounmap
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,7 @@ extern void __iop3xx_iounmap(void __iomem *addr);
|
|||
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
|
||||
#define __mem_pci(a) (a)
|
||||
|
||||
#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f)
|
||||
#define __arch_iounmap(a) __iop3xx_iounmap(a)
|
||||
#define __arch_ioremap __iop3xx_ioremap
|
||||
#define __arch_iounmap __iop3xx_iounmap
|
||||
|
||||
#endif
|
||||
|
|
|
@ -45,8 +45,8 @@ ixp23xx_iounmap(void __iomem *addr)
|
|||
__iounmap(addr);
|
||||
}
|
||||
|
||||
#define __arch_ioremap(a,s,f) ixp23xx_ioremap(a,s,f)
|
||||
#define __arch_iounmap(a) ixp23xx_iounmap(a)
|
||||
#define __arch_ioremap ixp23xx_ioremap
|
||||
#define __arch_iounmap ixp23xx_iounmap
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -74,8 +74,8 @@ static inline void __indirect_iounmap(void __iomem *addr)
|
|||
__iounmap(addr);
|
||||
}
|
||||
|
||||
#define __arch_ioremap(a, s, f) __indirect_ioremap(a, s, f)
|
||||
#define __arch_iounmap(a) __indirect_iounmap(a)
|
||||
#define __arch_ioremap __indirect_ioremap
|
||||
#define __arch_iounmap __indirect_iounmap
|
||||
|
||||
#define writeb(v, p) __indirect_writeb(v, p)
|
||||
#define writew(v, p) __indirect_writew(v, p)
|
||||
|
|
|
@ -42,8 +42,8 @@ __arch_iounmap(void __iomem *addr)
|
|||
__iounmap(addr);
|
||||
}
|
||||
|
||||
#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m)
|
||||
#define __arch_iounmap(a) __arch_iounmap(a)
|
||||
#define __arch_ioremap __arch_ioremap
|
||||
#define __arch_iounmap __arch_iounmap
|
||||
#define __io(a) __io(a)
|
||||
#define __mem_pci(a) (a)
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ __arch_iounmap(void __iomem *addr)
|
|||
__iounmap(addr);
|
||||
}
|
||||
|
||||
#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m)
|
||||
#define __arch_iounmap(a) __arch_iounmap(a)
|
||||
#define __arch_ioremap __arch_ioremap
|
||||
#define __arch_iounmap __arch_iounmap
|
||||
#define __io(a) __typesafe_io(a)
|
||||
#define __mem_pci(a) (a)
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@
|
|||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#define __arch_ioremap(p, s, t) tegra_ioremap(p, s, t)
|
||||
#define __arch_iounmap(v) tegra_iounmap(v)
|
||||
#define __arch_ioremap tegra_ioremap
|
||||
#define __arch_iounmap tegra_iounmap
|
||||
|
||||
void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type);
|
||||
void tegra_iounmap(volatile void __iomem *addr);
|
||||
|
|
|
@ -294,8 +294,8 @@ static inline void omap44xx_map_common_io(void)
|
|||
extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
|
||||
struct omap_sdrc_params *sdrc_cs1);
|
||||
|
||||
#define __arch_ioremap(p,s,t) omap_ioremap(p,s,t)
|
||||
#define __arch_iounmap(v) omap_iounmap(v)
|
||||
#define __arch_ioremap omap_ioremap
|
||||
#define __arch_iounmap omap_iounmap
|
||||
|
||||
void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type);
|
||||
void omap_iounmap(volatile void __iomem *addr);
|
||||
|
|
Loading…
Reference in New Issue
Block a user