Cleanup of mach/io.h
Subsystems (19)
cover Cleanup of mach/io.h
Some definitions can be made common, like IO_SPACE_LIMIT, some can be removed, e.g. __mem_isa(), and some can be made into a machine specific call, e.g. arch_adjust_zones()
Many mach/io.h can actually be safely removed, except for the following definitions:
__io()
and
__arch_ioremap(), __arch_iounmap() and so on
__io() in the end can be made generic into something like:
#define __io(x) ((x) - physical_address_of_IO_space +
virtual_base)
and __arch_ioremap(), __arch_iounmap() made into machine specific function (again?)
PATCH 1/6 Make common definition for IO_SPACE_LIMIT
--- arch/arm/include/asm/io.h | 2 ++ arch/arm/mach-aaec2000/include/mach/io.h | 2 -- arch/arm/mach-at91/include/mach/io.h | 2 -- arch/arm/mach-bcmring/include/mach/io.h | 2 -- arch/arm/mach-clps711x/include/mach/io.h | 2 -- arch/arm/mach-cns3xxx/include/mach/io.h | 2 -- arch/arm/mach-davinci/include/mach/io.h | 2 -- arch/arm/mach-dove/include/mach/io.h | 2 -- arch/arm/mach-ebsa110/include/mach/io.h | 2 -- arch/arm/mach-ep93xx/include/mach/io.h | 2 -- arch/arm/mach-footbridge/include/mach/io.h | 2 -- arch/arm/mach-gemini/include/mach/io.h | 2 -- arch/arm/mach-h720x/include/mach/io.h | 2 -- arch/arm/mach-integrator/include/mach/io.h | 2 -- arch/arm/mach-iop13xx/include/mach/io.h | 2 -- arch/arm/mach-iop32x/include/mach/io.h | 1 - arch/arm/mach-iop33x/include/mach/io.h | 1 - arch/arm/mach-ixp2000/include/mach/io.h | 1 - arch/arm/mach-ixp23xx/include/mach/io.h | 2 -- arch/arm/mach-ixp4xx/include/mach/io.h | 2 -- arch/arm/mach-kirkwood/include/mach/io.h | 2 -- arch/arm/mach-ks8695/include/mach/io.h | 2 -- arch/arm/mach-l7200/include/mach/io.h | 2 -- arch/arm/mach-lh7a40x/include/mach/io.h | 2 -- arch/arm/mach-loki/include/mach/io.h | 2 -- arch/arm/mach-mmp/include/mach/io.h | 2 -- arch/arm/mach-msm/include/mach/io.h | 2 -- arch/arm/mach-mv78xx0/include/mach/io.h | 2 -- arch/arm/mach-netx/include/mach/io.h | 2 -- arch/arm/mach-nomadik/include/mach/io.h | 2 -- arch/arm/mach-ns9xxx/include/mach/io.h | 2 -- arch/arm/mach-nuc93x/include/mach/io.h | 2 -- arch/arm/mach-orion5x/include/mach/io.h | 2 -- arch/arm/mach-pnx4008/include/mach/io.h | 2 -- arch/arm/mach-pxa/include/mach/io.h | 2 -- arch/arm/mach-realview/include/mach/io.h | 2 -- arch/arm/mach-rpc/include/mach/io.h | 2 -- arch/arm/mach-s3c2410/include/mach/io.h | 2 -- arch/arm/mach-s3c24a0/include/mach/io.h | 2 -- arch/arm/mach-s3c64xx/include/mach/io.h | 2 -- arch/arm/mach-s5p6440/include/mach/io.h | 2 -- arch/arm/mach-s5p6442/include/mach/io.h | 2 -- arch/arm/mach-s5pc100/include/mach/io.h | 2 -- arch/arm/mach-s5pv210/include/mach/io.h | 2 -- arch/arm/mach-sa1100/include/mach/io.h | 2 -- arch/arm/mach-shark/include/mach/io.h | 2 -- arch/arm/mach-shmobile/include/mach/io.h | 2 -- arch/arm/mach-u300/include/mach/io.h | 2 -- arch/arm/mach-ux500/include/mach/io.h | 2 -- arch/arm/mach-versatile/include/mach/io.h | 2 -- arch/arm/mach-vexpress/include/mach/io.h | 2 -- arch/arm/mach-w90x900/include/mach/io.h | 2 -- arch/arm/plat-mxc/include/mach/io.h | 2 -- arch/arm/plat-omap/include/plat/io.h | 2 -- arch/arm/plat-spear/include/plat/io.h | 2 -- arch/arm/plat-stmp3xxx/include/mach/io.h | 2 -- 56 files changed, 2 insertions(+), 107 deletions(-)
arch/arm/include/asm/io.h +2 -0
@@ -99,6 +99,8 @@ static inline void __iomem *__typesafe_io(unsigned long addr)*/ #include <mach/io.h> +#define IO_SPACE_LIMIT 0xffffffff +/* * IO port access primitives * -------------------------
arch/arm/mach-aaec2000/include/mach/io.h +0 -2
@@ -6,8 +6,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-at91/include/mach/io.h +0 -2
@@ -21,8 +21,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xFFFFFFFF -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-bcmring/include/mach/io.h +0 -2
@@ -21,8 +21,6 @@#include <mach/hardware.h> -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-clps711x/include/mach/io.h +0 -2
@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-cns3xxx/include/mach/io.h +0 -2
@@ -9,8 +9,6 @@#ifndef __MACH_IO_H#define __MACH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-davinci/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-dove/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#include "dove.h" -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_PHYS_BASE) +\ DOVE_PCIE0_IO_VIRT_BASE))#define __mem_pci (a) (a)
arch/arm/mach-ebsa110/include/mach/io.h +0 -2
@@ -13,8 +13,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffff -u8 __inb8 (unsigned int port);void __outb8 (u8 val,unsigned int port);
arch/arm/mach-ep93xx/include/mach/io.h +0 -2
@@ -5,8 +5,6 @@#ifndef __ASM_MACH_IO_H#define __ASM_MACH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (p) __typesafe_io(p)#define __mem_pci (p) (p)
arch/arm/mach-footbridge/include/mach/io.h +0 -2
@@ -17,8 +17,6 @@#define PCIO_SIZE 0x00100000#define PCIO_BASE 0xff000000 -#define IO_SPACE_LIMIT 0xffff -/* * Translation of various region addresses to virtual addresses */
arch/arm/mach-gemini/include/mach/io.h +0 -2
@@ -10,8 +10,6 @@#ifndef __MACH_IO_H#define __MACH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-h720x/include/mach/io.h +0 -2
@@ -14,8 +14,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-integrator/include/mach/io.h +0 -2
@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffff -/* * WARNING: this has to mirror definitions in platform.h */
arch/arm/mach-iop13xx/include/mach/io.h +0 -2
@@ -19,8 +19,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __iop13xx_io(a)#define __mem_pci (a) (a)#define __mem_isa (a) (a)
arch/arm/mach-iop32x/include/mach/io.h +0 -1
@@ -17,7 +17,6 @@ extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, unsigned int mtype);extern void __iop3xx_iounmap (void __iomem *addr); -#define IO_SPACE_LIMIT 0xffffffff#define __io (p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))#define __mem_pci (a) (a)
arch/arm/mach-iop33x/include/mach/io.h +0 -1
@@ -17,7 +17,6 @@ extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, unsigned int mtype);extern void __iop3xx_iounmap (void __iomem *addr); -#define IO_SPACE_LIMIT 0xffffffff#define __io (p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))#define __mem_pci (a) (a)
arch/arm/mach-ixp2000/include/mach/io.h +0 -1
@@ -17,7 +17,6 @@#include <mach/hardware.h> -#define IO_SPACE_LIMIT 0xffffffff#define __mem_pci (a) (a)/*
arch/arm/mach-ixp23xx/include/mach/io.h +0 -2
@@ -15,8 +15,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))#define __mem_pci (a) (a)
arch/arm/mach-ixp4xx/include/mach/io.h +0 -2
@@ -17,8 +17,6 @@#include <mach/hardware.h> -#define IO_SPACE_LIMIT 0x0000ffff -extern int (*ixp4xx_pci_read)(u32 addr,u32 cmd,u32 * data);extern int ixp4xx_pci_write (u32 addr,u32 cmd,u32 data);
arch/arm/mach-kirkwood/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#include "kirkwood.h" -#define IO_SPACE_LIMIT 0xffffffff -static inline void __iomem *__io (unsigned long addr) { return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_BUS_BASE)
arch/arm/mach-ks8695/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-l7200/include/mach/io.h +0 -2
@@ -10,8 +10,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * There are not real ISA nor PCI buses, so we fake it. */
arch/arm/mach-lh7a40x/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* No ISA or PCI bus on this machine. */ #define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-loki/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#include "loki.h" -#define IO_SPACE_LIMIT 0xffffffff -static inline void __iomem *__io (unsigned long addr) { return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
arch/arm/mach-mmp/include/mach/io.h +0 -2
@@ -9,8 +9,6 @@#ifndef __ASM_MACH_IO_H#define __ASM_MACH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-msm/include/mach/io.h +0 -2
@@ -16,8 +16,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __arch_ioremap __msm_ioremap#define __arch_iounmap __iounmap
arch/arm/mach-mv78xx0/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#include "mv78xx0.h" -#define IO_SPACE_LIMIT 0xffffffff -static inline void __iomem *__io (unsigned long addr) { return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0))
arch/arm/mach-netx/include/mach/io.h +0 -2
@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-nomadik/include/mach/io.h +0 -2
@@ -10,8 +10,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-ns9xxx/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff/* XXX */ -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)#define __mem_isa (a) (IO_BASE + (a))
arch/arm/mach-nuc93x/include/mach/io.h +0 -2
@@ -16,8 +16,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * 1:1 mapping for ioremapped regions. */
arch/arm/mach-orion5x/include/mach/io.h +0 -2
@@ -13,8 +13,6 @@#include "orion5x.h" -#define IO_SPACE_LIMIT 0xffffffff -static inline void __iomem *__arch_ioremap (unsigned long paddr,size_t size,unsigned int mtype) {
arch/arm/mach-pnx4008/include/mach/io.h +0 -2
@@ -13,8 +13,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-pxa/include/mach/io.h +0 -2
@@ -6,8 +6,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-realview/include/mach/io.h +0 -2
@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-rpc/include/mach/io.h +0 -2
@@ -15,8 +15,6 @@#include <mach/hardware.h> -#define IO_SPACE_LIMIT 0xffffffff -/* * We use two different types of addressing - PC style addresses, and ARM * addresses. PC style accesses the PC hardware with the normal PC IO
arch/arm/mach-s3c2410/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#include <mach/hardware.h> -#define IO_SPACE_LIMIT 0xffffffff -/* * We use two different types of addressing - PC style addresses, and ARM * addresses. PC style accesses the PC hardware with the normal PC IO
arch/arm/mach-s3c24a0/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a) -#define IO_SPACE_LIMIT (0xFFFFFFFF) -#endif
arch/arm/mach-s3c64xx/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a) -#define IO_SPACE_LIMIT (0xFFFFFFFF) -#endif
arch/arm/mach-s5p6440/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a) -#define IO_SPACE_LIMIT (0xFFFFFFFF) -#endif
arch/arm/mach-s5p6442/include/mach/io.h +0 -2
@@ -12,6 +12,4 @@#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a) -#define IO_SPACE_LIMIT (0xFFFFFFFF) -#endif
arch/arm/mach-s5pc100/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a) -#define IO_SPACE_LIMIT (0xFFFFFFFF) -#endif
arch/arm/mach-s5pv210/include/mach/io.h +0 -2
@@ -21,6 +21,4 @@#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a) -#define IO_SPACE_LIMIT (0xFFFFFFFF) -#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/mach-sa1100/include/mach/io.h +0 -2
@@ -10,8 +10,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-shark/include/mach/io.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) ((void __iomem *)(0xe0000000 + (a)))#define __mem_pci (addr) (addr)
arch/arm/mach-shmobile/include/mach/io.h +0 -2
@@ -1,8 +1,6 @@#ifndef __ASM_MACH_IO_H#define __ASM_MACH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) ((void __iomem *)(a))#define __mem_pci (a) (a)
arch/arm/mach-u300/include/mach/io.h +0 -2
@@ -12,8 +12,6 @@#ifndef __MACH_IO_H#define __MACH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-ux500/include/mach/io.h +0 -2
@@ -10,8 +10,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/mach-versatile/include/mach/io.h +0 -2
@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-vexpress/include/mach/io.h +0 -2
@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/mach-w90x900/include/mach/io.h +0 -2
@@ -18,8 +18,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -/* * 1:1 mapping for ioremapped regions. */
arch/arm/plat-mxc/include/mach/io.h +0 -2
@@ -12,8 +12,6 @@#define __ASM_ARCH_MXC_IO_H__/* Allow IO space to be anywhere in the memory */ -#define IO_SPACE_LIMIT 0xffffffff -#ifdef CONFIG_ARCH_MX3 #define __arch_ioremap __mx3_ioremap#define __arch_iounmap __iounmap
arch/arm/plat-omap/include/plat/io.h +0 -2
@@ -39,8 +39,6 @@#include <mach/hardware.h> -#define IO_SPACE_LIMIT 0xffffffff -/* * We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them...
arch/arm/plat-spear/include/plat/io.h +0 -2
@@ -14,8 +14,6 @@#ifndef __PLAT_IO_H#define __PLAT_IO_H -#define IO_SPACE_LIMIT 0xFFFFFFFF -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)
arch/arm/plat-stmp3xxx/include/mach/io.h +0 -2
@@ -16,8 +16,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffffffff -#define __io (a) __typesafe_io(a)#define __mem_pci (a) (a)#define __mem_isa (a) (a)
Signature · 1 line
1.7.1
PATCH 1/6 Make common definition for IO_SPACE_LIMIT
Quoted 31 lines · Eric Miao
arch/arm/mach-ebsa110/include/mach/io.h +0
-2@@ -13,8 +13,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffff -u8 __inb8 (unsigned int port);void __outb8 (u8 val,unsigned int port);arch/arm/mach-footbridge/include/mach/io.h +0
-2@@ -17,8 +17,6 @@#define PCIO_SIZE 0x00100000#define PCIO_BASE 0xff000000 -#define IO_SPACE_LIMIT 0xffff -/* * Translation of various region addresses to virtual addresses */ arch/arm/mach-integrator/include/mach/io.h +0
-0
arch/arm/mach-integrator/include/mach/io.h line 25
Quoted 8 lines
arch/arm/mach-integrator/include/mach/io.h +0
-2@@ -20,8 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define IO_SPACE_LIMIT 0xffff -/* * WARNING: this has to mirror definitions in platform.h */
These three are 0xffff because they are PCI, and the PCI IO window is 64K. Allowing reservations above this value could cause problems.
PATCH 2/6 footbridge: remove the useless definition of __mem_pci()
In reply to Eric Miao--- arch/arm/mach-footbridge/include/mach/io.h | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/mach-footbridge/include/mach/io.h +0 -12
@@ -21,18 +21,6 @@* Translation of various region addresses to virtual addresses */ #define __io (a) ((void __iomem *)(PCIO_BASE + (a))) -#if 1 #define __mem_pci (a) (a) -#else - -static inline void __iomem *___mem_pci (void __iomem *p) -{ -unsigned long a = (unsigned long )p; -BUG_ON (a <=0xc0000000 || a >=0xe0000000 ); -return p; -} - -#define __mem_pci (a) ___mem_pci(a) -#endif #endif
Signature · 1 line
1.7.1
PATCH 3/6 Make __mem_pci() common to all ARM sub-architectures
In reply to Eric MiaoOn all ARM sub-architectures, __mem_pci() is defined to be a 1:1 mapping, make it a common definition for all.
--- arch/arm/include/asm/io.h | 4 ++++ arch/arm/mach-aaec2000/include/mach/io.h | 2 -- arch/arm/mach-at91/include/mach/io.h | 2 -- arch/arm/mach-bcmring/include/mach/io.h | 2 -- arch/arm/mach-clps711x/include/mach/io.h | 2 -- arch/arm/mach-cns3xxx/include/mach/io.h | 2 -- arch/arm/mach-davinci/include/mach/io.h | 1 - arch/arm/mach-dove/include/mach/io.h | 2 -- arch/arm/mach-ep93xx/include/mach/io.h | 2 -- arch/arm/mach-footbridge/include/mach/io.h | 2 -- arch/arm/mach-gemini/include/mach/io.h | 2 -- arch/arm/mach-h720x/include/mach/io.h | 2 -- arch/arm/mach-integrator/include/mach/io.h | 2 -- arch/arm/mach-iop13xx/include/mach/io.h | 1 - arch/arm/mach-iop32x/include/mach/io.h | 2 -- arch/arm/mach-iop33x/include/mach/io.h | 2 -- arch/arm/mach-ixp2000/include/mach/io.h | 2 -- arch/arm/mach-ixp23xx/include/mach/io.h | 2 -- arch/arm/mach-ixp4xx/include/mach/io.h | 2 -- arch/arm/mach-kirkwood/include/mach/io.h | 2 -- arch/arm/mach-ks8695/include/mach/io.h | 2 -- arch/arm/mach-l7200/include/mach/io.h | 2 -- arch/arm/mach-lh7a40x/include/mach/io.h | 2 -- arch/arm/mach-loki/include/mach/io.h | 2 -- arch/arm/mach-mmp/include/mach/io.h | 2 -- arch/arm/mach-msm/include/mach/io.h | 2 -- arch/arm/mach-mv78xx0/include/mach/io.h | 2 -- arch/arm/mach-netx/include/mach/io.h | 2 -- arch/arm/mach-nomadik/include/mach/io.h | 2 -- arch/arm/mach-ns9xxx/include/mach/io.h | 1 - arch/arm/mach-nuc93x/include/mach/io.h | 1 - arch/arm/mach-orion5x/include/mach/io.h | 2 -- arch/arm/mach-pnx4008/include/mach/io.h | 2 -- arch/arm/mach-pxa/include/mach/io.h | 2 -- arch/arm/mach-realview/include/mach/io.h | 2 -- arch/arm/mach-rpc/include/mach/io.h | 2 -- arch/arm/mach-s3c2410/include/mach/io.h | 2 -- arch/arm/mach-s3c24a0/include/mach/io.h | 2 -- arch/arm/mach-s3c64xx/include/mach/io.h | 2 -- arch/arm/mach-s5p6440/include/mach/io.h | 2 -- arch/arm/mach-s5p6442/include/mach/io.h | 2 -- arch/arm/mach-s5pc100/include/mach/io.h | 2 -- arch/arm/mach-s5pv210/include/mach/io.h | 2 -- arch/arm/mach-sa1100/include/mach/io.h | 2 -- arch/arm/mach-shark/include/mach/io.h | 2 -- arch/arm/mach-shmobile/include/mach/io.h | 2 -- arch/arm/mach-u300/include/mach/io.h | 2 -- arch/arm/mach-ux500/include/mach/io.h | 2 -- arch/arm/mach-versatile/include/mach/io.h | 2 -- arch/arm/mach-vexpress/include/mach/io.h | 2 -- arch/arm/mach-w90x900/include/mach/io.h | 1 - arch/arm/plat-mxc/include/mach/io.h | 2 -- arch/arm/plat-omap/include/plat/io.h | 2 -- arch/arm/plat-spear/include/plat/io.h | 2 -- arch/arm/plat-stmp3xxx/include/mach/io.h | 1 - 55 files changed, 4 insertions(+), 102 deletions(-)
arch/arm/include/asm/io.h +4 -0
@@ -101,6 +101,10 @@ static inline void __iomem *__typesafe_io(unsigned long addr)#define IO_SPACE_LIMIT 0xffffffff +#ifndef __mem_pci +#define __mem_pci (a) (a) +#endif +/* * IO port access primitives * -------------------------
arch/arm/mach-aaec2000/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-at91/include/mach/io.h +0 -2
@@ -22,8 +22,6 @@#define __ASM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#ifndef __ASSEMBLY__
arch/arm/mach-bcmring/include/mach/io.h +0 -2
@@ -26,6 +26,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-clps711x/include/mach/io.h +0 -2
@@ -21,8 +21,6 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -/* * We don't support ins[lb]/outs[lb]. Make them fault. */
arch/arm/mach-cns3xxx/include/mach/io.h +0 -2
@@ -10,6 +10,4 @@#define __MACH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-davinci/include/mach/io.h +0 -1
@@ -16,7 +16,6 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a)#define __mem_isa (a) (a)#ifndef __ASSEMBLER__
arch/arm/mach-dove/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __io (a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_PHYS_BASE) +\ DOVE_PCIE0_IO_VIRT_BASE)) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-ep93xx/include/mach/io.h +0 -2
@@ -6,8 +6,6 @@#define __ASM_MACH_IO_H#define __io (p) __typesafe_io(p) -#define __mem_pci (p) (p) -/* * A typesafe __io() variation for variable initialisers */
arch/arm/mach-footbridge/include/mach/io.h +0 -2
@@ -21,6 +21,4 @@* Translation of various region addresses to virtual addresses */ #define __io (a) ((void __iomem *)(PCIO_BASE + (a))) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-gemini/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@#define __MACH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif /* __MACH_IO_H */
arch/arm/mach-h720x/include/mach/io.h +0 -2
@@ -15,6 +15,4 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-integrator/include/mach/io.h +0 -2
@@ -29,6 +29,4 @@#define PCI_IO_VADDR 0xee000000#define __io (a) ((void __iomem *)(PCI_IO_VADDR + (a))) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-iop13xx/include/mach/io.h +0 -1
@@ -20,7 +20,6 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __iop13xx_io(a) -#define __mem_pci (a) (a)#define __mem_isa (a) (a)extern void __iomem *__iop13xx_io (unsigned long io_addr);
arch/arm/mach-iop32x/include/mach/io.h +0 -2
@@ -18,8 +18,6 @@ extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,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)
arch/arm/mach-iop33x/include/mach/io.h +0 -2
@@ -18,8 +18,6 @@ extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,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)
arch/arm/mach-ixp2000/include/mach/io.h +0 -2
@@ -17,8 +17,6 @@#include <mach/hardware.h> -#define __mem_pci (a) (a) -/* * The A? revisions of the IXP2000s assert byte lanes for PCI I/O * transactions the other way round (MEM transactions don't have this
arch/arm/mach-ixp23xx/include/mach/io.h +0 -2
@@ -16,8 +16,6 @@#define __ASM_ARCH_IO_H#define __io (p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) -#define __mem_pci (a) (a) -static inline void __iomem *ixp23xx_ioremap (unsigned long addr,unsigned long size,unsigned int mtype) {
arch/arm/mach-ixp4xx/include/mach/io.h +0 -2
@@ -41,8 +41,6 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);*/ #ifndef CONFIG_IXP4XX_INDIRECT_PCI -#define __mem_pci (a) (a) -#else /*
arch/arm/mach-kirkwood/include/mach/io.h +0 -2
@@ -43,7 +43,5 @@ __arch_iounmap(void __iomem *addr)#define __arch_ioremap (p, s, m) __arch_ioremap(p, s, m)#define __arch_iounmap (a) __arch_iounmap(a)#define __io (a) __io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-ks8695/include/mach/io.h +0 -2
@@ -12,6 +12,4 @@#define __ASM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-l7200/include/mach/io.h +0 -2
@@ -14,6 +14,4 @@* There are not real ISA nor PCI buses, so we fake it. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-lh7a40x/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@/* No ISA or PCI bus on this machine. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif /* __ASM_ARCH_IO_H */
arch/arm/mach-loki/include/mach/io.h +0 -2
@@ -18,7 +18,5 @@ static inline void __iomem *__io(unsigned long addr) }#define __io (a) __io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-mmp/include/mach/io.h +0 -2
@@ -14,6 +14,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif /* __ASM_MACH_IO_H */
arch/arm/mach-msm/include/mach/io.h +0 -2
@@ -22,8 +22,6 @@void __iomem *__msm_ioremap (unsigned long phys_addr,size_t size,unsigned int mtype);#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -void msm_map_qsd8x50_io (void );void msm_map_msm7x30_io (void );
arch/arm/mach-mv78xx0/include/mach/io.h +0 -2
@@ -18,7 +18,5 @@ static inline void __iomem *__io(unsigned long addr) }#define __io (a) __io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-netx/include/mach/io.h +0 -2
@@ -21,6 +21,4 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-nomadik/include/mach/io.h +0 -2
@@ -15,6 +15,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-ns9xxx/include/mach/io.h +0 -1
@@ -12,7 +12,6 @@#define __ASM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a)#define __mem_isa (a) (IO_BASE + (a))#endif /* ifndef __ASM_ARCH_IO_H */
arch/arm/mach-nuc93x/include/mach/io.h +0 -1
@@ -20,7 +20,6 @@* 1:1 mapping for ioremapped regions. */ -#define __mem_pci (a) (a)#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-orion5x/include/mach/io.h +0 -2
@@ -39,8 +39,6 @@ __arch_iounmap(void __iomem *addr)#define __arch_ioremap (p, s, m) __arch_ioremap(p, s, m)#define __arch_iounmap (a) __arch_iounmap(a)#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -/***************************************************************************** * Helpers to access Orion registers
arch/arm/mach-pnx4008/include/mach/io.h +0 -2
@@ -14,6 +14,4 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-pxa/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-realview/include/mach/io.h +0 -2
@@ -21,6 +21,4 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-rpc/include/mach/io.h +0 -2
@@ -206,6 +206,4 @@ DECLARE_IO(int,l,"")/* * 1:1 mapping for ioremapped regions. */ -#define __mem_pci (x) (x) -#endif
arch/arm/mach-s3c2410/include/mach/io.h +0 -2
@@ -211,6 +211,4 @@ DECLARE_IO(int,l,"")/* * 1:1 mapping for ioremapped regions. */ -#define __mem_pci (x) (x) -#endif
arch/arm/mach-s3c24a0/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@/* No current ISA/PCI bus support. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-s3c64xx/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@/* No current ISA/PCI bus support. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-s5p6440/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@/* No current ISA/PCI bus support. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-s5p6442/include/mach/io.h +0 -2
@@ -10,6 +10,4 @@/* No current ISA/PCI bus support. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-s5pc100/include/mach/io.h +0 -2
@@ -11,6 +11,4 @@/* No current ISA/PCI bus support. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-s5pv210/include/mach/io.h +0 -2
@@ -19,6 +19,4 @@/* No current ISA/PCI bus support. */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/mach-sa1100/include/mach/io.h +0 -2
@@ -15,6 +15,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-shark/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __io (a) ((void __iomem *)(0xe0000000 + (a))) -#define __mem_pci (addr) (addr) -#endif
arch/arm/mach-shmobile/include/mach/io.h +0 -2
@@ -2,6 +2,4 @@#define __ASM_MACH_IO_H#define __io (a) ((void __iomem *)(a)) -#define __mem_pci (a) (a) -#endif /* __ASM_MACH_IO_H */
arch/arm/mach-u300/include/mach/io.h +0 -2
@@ -13,6 +13,4 @@#define __MACH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-ux500/include/mach/io.h +0 -2
@@ -15,6 +15,4 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-versatile/include/mach/io.h +0 -2
@@ -21,6 +21,4 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-vexpress/include/mach/io.h +0 -2
@@ -21,6 +21,4 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-w90x900/include/mach/io.h +0 -1
@@ -22,7 +22,6 @@* 1:1 mapping for ioremapped regions. */ -#define __mem_pci (a) (a)#define __io (a) __typesafe_io(a)#endif
arch/arm/plat-mxc/include/mach/io.h +0 -2
@@ -35,6 +35,4 @@ __mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)/* io address mapping macro */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/plat-omap/include/plat/io.h +0 -2
@@ -44,8 +44,6 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -/* * ---------------------------------------------------------------------------- * I/O mapping
arch/arm/plat-spear/include/plat/io.h +0 -2
@@ -15,6 +15,4 @@#define __PLAT_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a) -#endif /* __PLAT_IO_H */
arch/arm/plat-stmp3xxx/include/mach/io.h +0 -1
@@ -17,7 +17,6 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_pci (a) (a)#define __mem_isa (a) (a)#endif
Signature · 1 line
1.7.1
PATCH 3/6 Make __mem_pci() common to all ARM sub-architectures
Quoted 2 lines · Eric Miao
On all ARM sub-architectures,
__mem_pci()is defined to be a 1:1 mapping, make it a common definition for all.
This is not true for ebsa110, which you'll notice is missing from this diffstat.
PATCH 4/6 Remove useless __mem_isa() definitions
In reply to Eric Miao--- arch/arm/mach-davinci/include/mach/io.h | 1 - arch/arm/mach-iop13xx/include/mach/io.h | 1 - arch/arm/mach-ns9xxx/include/mach/io.h | 1 - arch/arm/plat-stmp3xxx/include/mach/io.h | 1 - 4 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-davinci/include/mach/io.h +0 -1
@@ -16,7 +16,6 @@* drivers out there that might just work if we fake them... */ #define __io (a) __typesafe_io(a) -#define __mem_isa (a) (a)#ifndef __ASSEMBLER__#define __arch_ioremap (p, s, t) davinci_ioremap(p, s, t)
arch/arm/mach-iop13xx/include/mach/io.h +0 -1
@@ -20,7 +20,6 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __iop13xx_io(a) -#define __mem_isa (a) (a)extern void __iomem *__iop13xx_io (unsigned long io_addr); extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
arch/arm/mach-ns9xxx/include/mach/io.h +0 -1
@@ -12,6 +12,5 @@#define __ASM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_isa (a) (IO_BASE + (a))#endif /* ifndef __ASM_ARCH_IO_H */
arch/arm/plat-stmp3xxx/include/mach/io.h +0 -1
@@ -17,6 +17,5 @@#define __ASM_ARM_ARCH_IO_H#define __io (a) __typesafe_io(a) -#define __mem_isa (a) (a)#endif
Signature · 1 line
1.7.1
PATCH 5/6 shmobile: change __io() definition to use __typesafe_io()
In reply to Eric Miao--- arch/arm/mach-shmobile/include/mach/io.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-shmobile/include/mach/io.h +1 -1
@@ -1,5 +1,5 @@#ifndef __ASM_MACH_IO_H#define __ASM_MACH_IO_H -#define __io (a) ((void __iomem *)(a)) +#define __io (a) __typesafe_io(a)#endif /* __ASM_MACH_IO_H */
Signature · 1 line
1.7.1
PATCH 5/6 shmobile: change __io() definition to use __typesafe_io()
Quoted 1 line · Eric Miao
Signed-off-by Eric Miao <[email protected]>
Sorry, forgot to CC Magnus.
Quoted 19 lines
---
?arch/arm/mach-shmobile/include/mach/io.h | ? ?2 +- ?1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-shmobile/include/mach/io.h +0
-0@@ -1,5 +1,5 @@?#ifndef
__ASM_MACH_IO_H
?#define__ASM_MACH_IO_Harch/arm/mach-shmobile/include/mach/io.h +1
-1-#define __io (a) ? ? ? ? ? ? ? ? ? ? ? ?((void __iomem *)(a)) +#define __io (a) ? ? ? ? ? ? ? ? ? ? ? ?__typesafe_io(a)?#endif /*
__ASM_MACH_IO_H*/
--
1.7.1
PATCH 6/6 Introduce common definition for __io()
In reply to Eric Miao--- arch/arm/include/asm/io.h | 4 ++++ arch/arm/mach-aaec2000/include/mach/io.h | 1 - arch/arm/mach-at91/include/mach/io.h | 1 - arch/arm/mach-bcmring/include/mach/io.h | 1 - arch/arm/mach-clps711x/include/mach/io.h | 1 - arch/arm/mach-cns3xxx/include/mach/io.h | 1 - arch/arm/mach-davinci/include/mach/io.h | 1 - arch/arm/mach-ep93xx/include/mach/io.h | 1 - arch/arm/mach-gemini/include/mach/io.h | 1 - arch/arm/mach-h720x/include/mach/io.h | 1 - arch/arm/mach-ixp4xx/include/mach/io.h | 1 - arch/arm/mach-ks8695/include/mach/io.h | 1 - arch/arm/mach-l7200/include/mach/io.h | 1 - arch/arm/mach-lh7a40x/include/mach/io.h | 1 - arch/arm/mach-mmp/include/mach/io.h | 1 - arch/arm/mach-msm/include/mach/io.h | 1 - arch/arm/mach-netx/include/mach/io.h | 1 - arch/arm/mach-nomadik/include/mach/io.h | 1 - arch/arm/mach-ns9xxx/include/mach/io.h | 1 - arch/arm/mach-nuc93x/include/mach/io.h | 1 - arch/arm/mach-orion5x/include/mach/io.h | 1 - arch/arm/mach-pnx4008/include/mach/io.h | 1 - arch/arm/mach-pxa/include/mach/io.h | 1 - arch/arm/mach-realview/include/mach/io.h | 1 - arch/arm/mach-s3c24a0/include/mach/io.h | 1 - arch/arm/mach-s3c64xx/include/mach/io.h | 1 - arch/arm/mach-s5p6440/include/mach/io.h | 1 - arch/arm/mach-s5p6442/include/mach/io.h | 1 - arch/arm/mach-s5pc100/include/mach/io.h | 1 - arch/arm/mach-s5pv210/include/mach/io.h | 1 - arch/arm/mach-sa1100/include/mach/io.h | 1 - arch/arm/mach-u300/include/mach/io.h | 1 - arch/arm/mach-ux500/include/mach/io.h | 1 - arch/arm/mach-versatile/include/mach/io.h | 1 - arch/arm/mach-vexpress/include/mach/io.h | 1 - arch/arm/mach-w90x900/include/mach/io.h | 1 - arch/arm/plat-mxc/include/mach/io.h | 1 - arch/arm/plat-omap/include/plat/io.h | 1 - arch/arm/plat-spear/include/plat/io.h | 1 - arch/arm/plat-stmp3xxx/include/mach/io.h | 1 - 40 files changed, 4 insertions(+), 39 deletions(-)
arch/arm/include/asm/io.h +4 -0
@@ -105,6 +105,10 @@ static inline void __iomem *__typesafe_io(unsigned long addr)#define __mem_pci (a) (a)#endif +#ifndef __io +#define __io (a) __typesafe_io(a) +#endif +/* * IO port access primitives * -------------------------
arch/arm/mach-aaec2000/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-at91/include/mach/io.h +0 -1
@@ -21,7 +21,6 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#ifndef __ASSEMBLY__
arch/arm/mach-bcmring/include/mach/io.h +0 -1
@@ -25,5 +25,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-clps711x/include/mach/io.h +0 -1
@@ -20,7 +20,6 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)/* * We don't support ins[lb]/outs[lb]. Make them fault. */
arch/arm/mach-cns3xxx/include/mach/io.h +0 -1
@@ -9,5 +9,4 @@#ifndef __MACH_IO_H#define __MACH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-davinci/include/mach/io.h +0 -1
@@ -15,7 +15,6 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#ifndef __ASSEMBLER__#define __arch_ioremap (p, s, t) davinci_ioremap(p, s, t)
arch/arm/mach-ep93xx/include/mach/io.h +0 -1
@@ -5,7 +5,6 @@#ifndef __ASM_MACH_IO_H#define __ASM_MACH_IO_H -#define __io (p) __typesafe_io(p)/* * A typesafe __io() variation for variable initialisers */
arch/arm/mach-gemini/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@#ifndef __MACH_IO_H#define __MACH_IO_H -#define __io (a) __typesafe_io(a)#endif /* __MACH_IO_H */
arch/arm/mach-h720x/include/mach/io.h +0 -1
@@ -14,5 +14,4 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-ixp4xx/include/mach/io.h +0 -1
@@ -233,7 +233,6 @@ static inline void __indirect_readsl(const volatile void __iomem *bus_addr,#ifndef CONFIG_PCI -#define __io (v) __typesafe_io(v)#else
arch/arm/mach-ks8695/include/mach/io.h +0 -1
@@ -11,5 +11,4 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-l7200/include/mach/io.h +0 -1
@@ -13,5 +13,4 @@/* * There are not real ISA nor PCI buses, so we fake it. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-lh7a40x/include/mach/io.h +0 -1
@@ -12,5 +12,4 @@#define __ASM_ARCH_IO_H/* No ISA or PCI bus on this machine. */ -#define __io (a) __typesafe_io(a)#endif /* __ASM_ARCH_IO_H */
arch/arm/mach-mmp/include/mach/io.h +0 -1
@@ -13,5 +13,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif /* __ASM_MACH_IO_H */
arch/arm/mach-msm/include/mach/io.h +0 -1
@@ -21,7 +21,6 @@void __iomem *__msm_ioremap (unsigned long phys_addr,size_t size,unsigned int mtype); -#define __io (a) __typesafe_io(a)void msm_map_qsd8x50_io (void );void msm_map_msm7x30_io (void );
arch/arm/mach-netx/include/mach/io.h +0 -1
@@ -20,5 +20,4 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-nomadik/include/mach/io.h +0 -1
@@ -14,5 +14,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-ns9xxx/include/mach/io.h +0 -1
@@ -11,6 +11,5 @@#ifndef __ASM_ARCH_IO_H#define __ASM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif /* ifndef __ASM_ARCH_IO_H */
arch/arm/mach-nuc93x/include/mach/io.h +0 -1
@@ -20,6 +20,5 @@* 1:1 mapping for ioremapped regions. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-orion5x/include/mach/io.h +0 -1
@@ -38,7 +38,6 @@ __arch_iounmap(void __iomem *addr)#define __arch_ioremap (p, s, m) __arch_ioremap(p, s, m)#define __arch_iounmap (a) __arch_iounmap(a) -#define __io (a) __typesafe_io(a)/***************************************************************************** * Helpers to access Orion registers
arch/arm/mach-pnx4008/include/mach/io.h +0 -1
@@ -13,5 +13,4 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-pxa/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-realview/include/mach/io.h +0 -1
@@ -20,5 +20,4 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-s3c24a0/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@#define __ASM_ARM_ARCH_IO_H/* No current ISA/PCI bus support. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-s3c64xx/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@#define __ASM_ARM_ARCH_IO_H/* No current ISA/PCI bus support. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-s5p6440/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@#define __ASM_ARM_ARCH_IO_H/* No current ISA/PCI bus support. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-s5p6442/include/mach/io.h +0 -1
@@ -9,5 +9,4 @@#define __ASM_ARM_ARCH_IO_H/* No current ISA/PCI bus support. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-s5pc100/include/mach/io.h +0 -1
@@ -10,5 +10,4 @@#define __ASM_ARM_ARCH_IO_H/* No current ISA/PCI bus support. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-s5pv210/include/mach/io.h +0 -1
@@ -18,5 +18,4 @@#define __ASM_ARM_ARCH_IO_H __FILE__/* No current ISA/PCI bus support. */ -#define __io (a) __typesafe_io(a)#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/mach-sa1100/include/mach/io.h +0 -1
@@ -14,5 +14,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-u300/include/mach/io.h +0 -1
@@ -12,5 +12,4 @@#ifndef __MACH_IO_H#define __MACH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-ux500/include/mach/io.h +0 -1
@@ -14,5 +14,4 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-versatile/include/mach/io.h +0 -1
@@ -20,5 +20,4 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-vexpress/include/mach/io.h +0 -1
@@ -20,5 +20,4 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
arch/arm/mach-w90x900/include/mach/io.h +0 -1
@@ -22,6 +22,5 @@* 1:1 mapping for ioremapped regions. */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/plat-mxc/include/mach/io.h +0 -1
@@ -33,6 +33,5 @@ __mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)#endif /* io address mapping macro */ -#define __io (a) __typesafe_io(a)#endif
arch/arm/plat-omap/include/plat/io.h +0 -1
@@ -43,7 +43,6 @@* We don't actually have real ISA nor PCI buses, but there is so many * drivers out there that might just work if we fake them... */ -#define __io (a) __typesafe_io(a)/* * ---------------------------------------------------------------------------- * I/O mapping
arch/arm/plat-spear/include/plat/io.h +0 -1
@@ -14,5 +14,4 @@#ifndef __PLAT_IO_H#define __PLAT_IO_H -#define __io (a) __typesafe_io(a)#endif /* __PLAT_IO_H */
arch/arm/plat-stmp3xxx/include/mach/io.h +0 -1
@@ -16,6 +16,5 @@#ifndef __ASM_ARM_ARCH_IO_H#define __ASM_ARM_ARCH_IO_H -#define __io (a) __typesafe_io(a)#endif
Signature · 1 line
1.7.1
PATCH 6/6 Introduce common definition for __io()
Quoted 10 lines · Eric Miao
Signed-off-by Eric Miao <[email protected]>--- arch/arm/include/asm/io.h | 4 ++++ arch/arm/mach-aaec2000/include/mach/io.h | 1 - arch/arm/mach-at91/include/mach/io.h | 1 - arch/arm/mach-bcmring/include/mach/io.h | 1 - arch/arm/mach-clps711x/include/mach/io.h | 1 - arch/arm/mach-cns3xxx/include/mach/io.h | 1 - arch/arm/mach-davinci/include/mach/io.h | 1 - arch/arm/mach-ep93xx/include/mach/io.h | 1 -
Again, ebsa110 is missing.
That's because __io() is a two-state definition. It means something if a platform does _not_ define it. It also means something _if_ a platform defines it.
You can't move it to asm/io.h because that precludes the first state from ever occuring. It's not a simple case that those platforms can provide some subsitute definition for __io() - they have to supply their own inb() et.al. accessors because they need to do something uniquely special there.
kprobe bug.
Hi Russell,
Thanks in advance for your kind to review my question.
I met a kprobe bug while I used it to debug my driver.
Here is the scenario:
I add a probe at function xxx(). And the assembly code of xxx() is as following,
=====================
c035ee48 <xxx >: c035ee48: e59f3008 ldr r3, [pc, #8] ; c035ee58 <xxx+0x10> c035ee4c: e3a02001 mov r2, #1 ; 0x1 c035ee50: e5032fff str r2, [r3, #-4095] c035ee54: e12fff1e bx lr c035ee58: fe03dfff .word 0xfe03dfff
=====================
The ldr emulate always load e12fff1e to r3 register.
After debugging, I found the pc register should be 8 after current instruction. So we should set pc to pc+8 before instruction emulation and set it back to the next instruction after singe step. Here is my patch:
=======================
arch/arm/kernel/kprobes.c +2 -1
@@ -132,8 +132,9 @@ static void __kprobes set_current_kprobe(struct kprobe *p)static void __kprobes singlestep (struct kprobe *p,struct pt_regs *regs,struct kprobe_ctlblk *kcb) { - regs->ARM_pc +=4 ; + regs->ARM_pc +=8 ; p->ainsn.insn_handler (p, regs); + regs->ARM_pc -=4 ; }/*
========================
Regards,
Bin
kprobe bug.
Quoted 33 lines · Bin Yang
Hi Russell,
Thanks in advance for your kind to review my question.
I met a kprobe bug while I used it to debug my driver.
Here is the scenario:
I add a probe at functionxxx(). And the assembly code ofxxx()is as following,
=====================c035ee48 <xxx >: c035ee48: e59f3008 ldr r3, [pc, #8] ; c035ee58 <xxx+0x10> c035ee4c: e3a02001 mov r2, #1 ; 0x1 c035ee50: e5032fff str r2, [r3, #-4095] c035ee54: e12fff1e bx lr c035ee58: fe03dfff .word 0xfe03dfff=====================
The ldr emulate always loade12fff1eto r3 register.
After debugging, I found the pc register should be 8 after current instruction. So we should set pc to pc+8 before instruction emulation and set it back to the next instruction after singe step. Here is my patch:
=======================arch/arm/kernel/kprobes.c +2
-1@@ -132,8 +132,9 @@ static void __kprobes set_current_kprobe(struct kprobe *p)static void __kprobes singlestep (struct kprobe *p,struct pt_regs *regs,struct kprobe_ctlblk *kcb) { - regs->ARM_pc +=4 ; + regs->ARM_pc +=8 ; p->ainsn.insn_handler (p, regs); + regs->ARM_pc -=4 ; }/*
Quoted 1 line
========================
This is wrong. You are breaking all the emulated instructions changing the pc value.
What needs to be done is to add a special case in emulate_ldr() to fixup rnv when rn is 15. The same fixup would be needed in emulate_str(). See emulate_alu_rflags() for example.
Nicolas
kprobe bug.
Thanks.
It looks "emulate_str" had considered PC register situation already. Only " emulate_ldr" has this problem.
Here is my new patch, thanks in advance to review it.
===============================
Quoted 1 line
From
554a86a94836d5f6c89c1253f2c2d85773cbe5ebMon Sep 17 00:00:00 2001
From: Bin Yang <[email protected]>
Date: Mon, 28 Jun 2010 10:40:56 +0800
Subject: [PATCH] ARM: fix kprobe ldr instr emulate bug
--- arch/arm/kernel/kprobes-decode.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/kernel/kprobes-decode.c +3 -2
@@ -583,13 +583,14 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs) {insn_llret_3arg_fn_t *i_fn = (insn_llret_3arg_fn_t *)&p->ainsn.insn[0 ];kprobe_opcode_t insn = p->opcode; +long ppc = (long )p->addr +8 ;union reg_pair fnr;int rd = (insn >>12 ) &0xf ;int rn = (insn >>16 ) &0xf ;int rm = insn &0xf ;long rdv; -long rnv = regs->uregs[rn]; -long rmv = regs->uregs[rm];/* rm/rmv may be invalid, don't care. */ +long rnv = (rn ==15 ) ? ppc : regs->uregs[rn]; +long rmv = (rm ==15 ) ? ppc : regs->uregs[rm];long cpsr = regs->ARM_cpsr;
Bin Yang
-----Original Message-----
From: Nicolas Pitre [mailto:nico at fluxnic.net]
Sent: 2010?6?26? 4:50
To: Bin Yang
Cc: Russell King - ARM Linux; Eric Miao; Haojian Zhuang; linux-arm-kernel
Subject: Re: kprobe bug.
Quoted 33 lines · Bin Yang
Hi Russell,
Thanks in advance for your kind to review my question.
I met a kprobe bug while I used it to debug my driver.
Here is the scenario:
I add a probe at functionxxx(). And the assembly code ofxxx()is as following,
=====================c035ee48 <xxx >: c035ee48: e59f3008 ldr r3, [pc, #8] ; c035ee58 <xxx+0x10> c035ee4c: e3a02001 mov r2, #1 ; 0x1 c035ee50: e5032fff str r2, [r3, #-4095] c035ee54: e12fff1e bx lr c035ee58: fe03dfff .word 0xfe03dfff=====================
The ldr emulate always loade12fff1eto r3 register.
After debugging, I found the pc register should be 8 after current instruction. So we should set pc to pc+8 before instruction emulation and set it back to the next instruction after singe step. Here is my patch:
=======================arch/arm/kernel/kprobes.c +2
-1@@ -132,8 +132,9 @@ static void __kprobes set_current_kprobe(struct kprobe *p)static void __kprobes singlestep (struct kprobe *p,struct pt_regs *regs,struct kprobe_ctlblk *kcb) { - regs->ARM_pc +=4 ; + regs->ARM_pc +=8 ; p->ainsn.insn_handler (p, regs); + regs->ARM_pc -=4 ; }/*
Quoted 1 line
========================
This is wrong. You are breaking all the emulated instructions changing the pc value.
What needs to be done is to add a special case in emulate_ldr() to fixup rnv when rn is 15. The same fixup would be needed in emulate_str(). See emulate_alu_rflags() for example.
Nicolas
Nicolas Pitre
Acked-bykprobe bug.
Quoted 5 lines · Bin Yang
Thanks.
It looks "emulate_str" had considered PC register situation already. Only "emulate_ldr" has this problem.Here is my new patch, thanks in advance to review it.
Quoted 7 lines
===============================
From554a86a94836d5f6c89c1253f2c2d85773cbe5ebMon Sep 17 00:00:00 2001
From: Bin Yang <[email protected]>
Date: Mon, 28 Jun 2010 10:40:56 +0800
Subject: [PATCH] ARM: fix kprobe ldr instr emulate bugSigned-off-by Bin Yang <[email protected]>
Please send to RMK's p?tch system.
Quoted 85 lines
--- arch/arm/kernel/kprobes-decode.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)arch/arm/kernel/kprobes-decode.c +3
-2@@ -583,13 +583,14 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs) {insn_llret_3arg_fn_t *i_fn = (insn_llret_3arg_fn_t *)&p->ainsn.insn[0 ];kprobe_opcode_t insn = p->opcode; +long ppc = (long )p->addr +8 ;union reg_pair fnr;int rd = (insn >>12 ) &0xf ;int rn = (insn >>16 ) &0xf ;int rm = insn &0xf ;long rdv; -long rnv = regs->uregs[rn]; -long rmv = regs->uregs[rm];/* rm/rmv may be invalid, don't care. */ +long rnv = (rn ==15 ) ? ppc : regs->uregs[rn]; +long rmv = (rm ==15 ) ? ppc : regs->uregs[rm];long cpsr = regs->ARM_cpsr;Bin Yang
-----Original Message-----
From: Nicolas Pitre [mailto:nico at fluxnic.net]
Sent: 2010?6?26? 4:50
To: Bin Yang
Cc: Russell King - ARM Linux; Eric Miao; Haojian Zhuang; linux-arm-kernel
Subject: Re: kprobe bug.Quoted 33 lines · Bin Yang
Hi Russell,
Thanks in advance for your kind to review my question.
I met a kprobe bug while I used it to debug my driver.
Here is the scenario:
I add a probe at functionxxx(). And the assembly code ofxxx()is as following,
=====================c035ee48 <xxx >: c035ee48: e59f3008 ldr r3, [pc, #8] ; c035ee58 <xxx+0x10> c035ee4c: e3a02001 mov r2, #1 ; 0x1 c035ee50: e5032fff str r2, [r3, #-4095] c035ee54: e12fff1e bx lr c035ee58: fe03dfff .word 0xfe03dfff=====================
The ldr emulate always loade12fff1eto r3 register.
After debugging, I found the pc register should be 8 after current instruction. So we should set pc to pc+8 before instruction emulation and set it back to the next instruction after singe step. Here is my patch:
=======================arch/arm/kernel/kprobes.c +2
-1@@ -132,8 +132,9 @@ static void __kprobes set_current_kprobe(struct kprobe *p)static void __kprobes singlestep (struct kprobe *p,struct pt_regs *regs,struct kprobe_ctlblk *kcb) { - regs->ARM_pc +=4 ; + regs->ARM_pc +=8 ; p->ainsn.insn_handler (p, regs); + regs->ARM_pc -=4 ; }/* Quoted 1 line
========================
This is wrong. You are breaking all the emulated instructions changing the pc value.
What needs to be done is to add a special case in
emulate_ldr()to fixup rnv when rn is 15. The same fixup would be needed inemulate_str(). Seeemulate_alu_rflags()for example.Nicolas
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel