Commit a1d75429 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove __io_virt_debug

From: Brian Gerst <bgerst@didntduck.org>

Drivers should all be converted to use ioremap() or isa_*() by now.
parent 48c26153
...@@ -1241,17 +1241,6 @@ config DEBUG_SLAB ...@@ -1241,17 +1241,6 @@ config DEBUG_SLAB
allocation as well as poisoning memory on free to catch use of freed allocation as well as poisoning memory on free to catch use of freed
memory. memory.
config DEBUG_IOVIRT
bool "Memory mapped I/O debugging"
depends on DEBUG_KERNEL
help
Say Y here to get warned whenever an attempt is made to do I/O on
obviously invalid addresses such as those generated when ioremap()
calls are forgotten. Memory mapped I/O will go through an extra
check to catch access to unmapped ISA addresses, an access method
that can still be used by old drivers that are being ported from
2.0/2.2.
config MAGIC_SYSRQ config MAGIC_SYSRQ
bool "Magic SysRq key" bool "Magic SysRq key"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
......
...@@ -88,10 +88,6 @@ EXPORT_SYMBOL(get_cmos_time); ...@@ -88,10 +88,6 @@ EXPORT_SYMBOL(get_cmos_time);
EXPORT_SYMBOL(cpu_khz); EXPORT_SYMBOL(cpu_khz);
EXPORT_SYMBOL(apm_info); EXPORT_SYMBOL(apm_info);
#ifdef CONFIG_DEBUG_IOVIRT
EXPORT_SYMBOL(__io_virt_debug);
#endif
EXPORT_SYMBOL_NOVERS(__down_failed); EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
EXPORT_SYMBOL_NOVERS(__down_failed_trylock); EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
......
...@@ -9,4 +9,3 @@ lib-y = checksum.o delay.o \ ...@@ -9,4 +9,3 @@ lib-y = checksum.o delay.o \
lib-$(CONFIG_X86_USE_3DNOW) += mmx.o lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
lib-$(CONFIG_DEBUG_IOVIRT) += iodebug.o
#include <asm/io.h>
void * __io_virt_debug(unsigned long x, const char *file, int line)
{
if (x < PAGE_OFFSET) {
printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line);
return __va(x);
}
return (void *)x;
}
...@@ -63,10 +63,6 @@ EXPORT_SYMBOL(pm_idle); ...@@ -63,10 +63,6 @@ EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off); EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(get_cmos_time); EXPORT_SYMBOL(get_cmos_time);
#ifdef CONFIG_IO_DEBUG
EXPORT_SYMBOL(__io_virt_debug);
#endif
EXPORT_SYMBOL_NOVERS(__down_failed); EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
EXPORT_SYMBOL_NOVERS(__down_failed_trylock); EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
......
...@@ -9,5 +9,4 @@ lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \ ...@@ -9,5 +9,4 @@ lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \
thunk.o io.o clear_page.o copy_page.o bitstr.o thunk.o io.o clear_page.o copy_page.o bitstr.o
lib-y += memcpy.o memmove.o memset.o copy_user.o lib-y += memcpy.o memmove.o memset.o copy_user.o
lib-$(CONFIG_IO_DEBUG) += iodebug.o
lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
void *memcpy_toio(void *dst,const void*src,unsigned len) void *memcpy_toio(void *dst,const void*src,unsigned len)
{ {
return __inline_memcpy(__io_virt(dst),src,len); return __inline_memcpy(dst,src,len);
} }
void *memcpy_fromio(void *dst,const void*src,unsigned len) void *memcpy_fromio(void *dst,const void*src,unsigned len)
{ {
return __inline_memcpy(dst,__io_virt(src),len); return __inline_memcpy(dst,src,len);
} }
#include <asm/io.h>
void * __io_virt_debug(unsigned long x, const char *file, int line)
{
if (x < PAGE_OFFSET) {
printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line);
return __va(x);
}
return (void *)x;
}
...@@ -45,17 +45,6 @@ ...@@ -45,17 +45,6 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
/*
* Temporary debugging check to catch old code using
* unmapped ISA addresses. Will be removed in 2.4.
*/
#ifdef CONFIG_DEBUG_IOVIRT
extern void *__io_virt_debug(unsigned long x, const char *file, int line);
#define __io_virt(x) __io_virt_debug((unsigned long)(x), __FILE__, __LINE__)
#else
#define __io_virt(x) ((void *)(x))
#endif
/** /**
* virt_to_phys - map virtual addresses to physical * virt_to_phys - map virtual addresses to physical
* @address: address to remap * @address: address to remap
...@@ -150,9 +139,9 @@ extern void bt_iounmap(void *addr, unsigned long size); ...@@ -150,9 +139,9 @@ extern void bt_iounmap(void *addr, unsigned long size);
* memory location directly. * memory location directly.
*/ */
#define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) #define readb(addr) (*(volatile unsigned char *) (addr))
#define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) #define readw(addr) (*(volatile unsigned short *) (addr))
#define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) #define readl(addr) (*(volatile unsigned int *) (addr))
#define readb_relaxed(addr) readb(addr) #define readb_relaxed(addr) readb(addr)
#define readw_relaxed(addr) readw(addr) #define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr) #define readl_relaxed(addr) readl(addr)
...@@ -160,16 +149,16 @@ extern void bt_iounmap(void *addr, unsigned long size); ...@@ -160,16 +149,16 @@ extern void bt_iounmap(void *addr, unsigned long size);
#define __raw_readw readw #define __raw_readw readw
#define __raw_readl readl #define __raw_readl readl
#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) #define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b))
#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) #define writew(b,addr) (*(volatile unsigned short *) (addr) = (b))
#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) #define writel(b,addr) (*(volatile unsigned int *) (addr) = (b))
#define __raw_writeb writeb #define __raw_writeb writeb
#define __raw_writew writew #define __raw_writew writew
#define __raw_writel writel #define __raw_writel writel
#define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) #define memset_io(a,b,c) memset((void *)(a),(b),(c))
#define memcpy_fromio(a,b,c) __memcpy((a),__io_virt(b),(c)) #define memcpy_fromio(a,b,c) __memcpy((a),(void *)(b),(c))
#define memcpy_toio(a,b,c) __memcpy(__io_virt(a),(b),(c)) #define memcpy_toio(a,b,c) __memcpy((void *)(a),(b),(c))
/* /*
* ISA space is 'always mapped' on a typical x86 system, no need to * ISA space is 'always mapped' on a typical x86 system, no need to
...@@ -196,8 +185,8 @@ extern void bt_iounmap(void *addr, unsigned long size); ...@@ -196,8 +185,8 @@ extern void bt_iounmap(void *addr, unsigned long size);
* Again, i386 does not require mem IO specific function. * Again, i386 does not require mem IO specific function.
*/ */
#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d)) #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d))
#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (b)),(c),(d)) #define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(__ISA_IO_base + (b)),(c),(d))
/** /**
* check_signature - find BIOS signatures * check_signature - find BIOS signatures
......
...@@ -109,17 +109,6 @@ __OUTS(l) ...@@ -109,17 +109,6 @@ __OUTS(l)
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
/*
* Temporary debugging check to catch old code using
* unmapped ISA addresses. Will be removed in 2.4.
*/
#ifdef CONFIG_IO_DEBUG
extern void *__io_virt_debug(unsigned long x, const char *file, int line);
#define __io_virt(x) __io_virt_debug((unsigned long)(x), __FILE__, __LINE__)
#else
#define __io_virt(x) ((void *)(x))
#endif
#ifndef __i386__ #ifndef __i386__
/* /*
* Change virtual addresses to physical addresses and vv. * Change virtual addresses to physical addresses and vv.
...@@ -184,10 +173,10 @@ extern void iounmap(void *addr); ...@@ -184,10 +173,10 @@ extern void iounmap(void *addr);
* memory location directly. * memory location directly.
*/ */
#define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) #define readb(addr) (*(volatile unsigned char *) (addr))
#define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) #define readw(addr) (*(volatile unsigned short *) (addr))
#define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) #define readl(addr) (*(volatile unsigned int *) (addr))
#define readq(addr) (*(volatile unsigned long *) __io_virt(addr)) #define readq(addr) (*(volatile unsigned long *) (addr))
#define readb_relaxed(a) readb(a) #define readb_relaxed(a) readb(a)
#define readw_relaxed(a) readw(a) #define readw_relaxed(a) readw(a)
#define readl_relaxed(a) readl(a) #define readl_relaxed(a) readl(a)
...@@ -197,10 +186,10 @@ extern void iounmap(void *addr); ...@@ -197,10 +186,10 @@ extern void iounmap(void *addr);
#define __raw_readl readl #define __raw_readl readl
#define __raw_readq readq #define __raw_readq readq
#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) #define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b))
#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) #define writew(b,addr) (*(volatile unsigned short *) (addr) = (b))
#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) #define writel(b,addr) (*(volatile unsigned int *) (addr) = (b))
#define writeq(b,addr) (*(volatile unsigned long *) __io_virt(addr) = (b)) #define writeq(b,addr) (*(volatile unsigned long *) (addr) = (b))
#define __raw_writeb writeb #define __raw_writeb writeb
#define __raw_writew writew #define __raw_writew writew
#define __raw_writel writel #define __raw_writel writel
...@@ -208,7 +197,7 @@ extern void iounmap(void *addr); ...@@ -208,7 +197,7 @@ extern void iounmap(void *addr);
void *memcpy_fromio(void*,const void*,unsigned); void *memcpy_fromio(void*,const void*,unsigned);
void *memcpy_toio(void*,const void*,unsigned); void *memcpy_toio(void*,const void*,unsigned);
#define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) #define memset_io(a,b,c) memset((void *)(a),(b),(c))
/* /*
* ISA space is 'always mapped' on a typical x86 system, no need to * ISA space is 'always mapped' on a typical x86 system, no need to
...@@ -235,8 +224,8 @@ void *memcpy_toio(void*,const void*,unsigned); ...@@ -235,8 +224,8 @@ void *memcpy_toio(void*,const void*,unsigned);
* Again, x86-64 does not require mem IO specific function. * Again, x86-64 does not require mem IO specific function.
*/ */
#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d)) #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d))
#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (b)),(c),(d)) #define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(__ISA_IO_base + (b)),(c),(d))
/** /**
* check_signature - find BIOS signatures * check_signature - find BIOS signatures
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment