Skip to content

Commit

Permalink
[PARISC] Remove obsolete CONFIG_DEBUG_IOREMAP
Browse files Browse the repository at this point in the history
Remove CONFIG_DEBUG_IOREMAP, it's now obsolete and won't work anyway.
Remove it from lib/KConfig since it was only available on parisc.

Signed-off-by: Helge Deller <[email protected]>
Signed-off-by: Kyle McMartin <[email protected]>
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Mar 30, 2006
1 parent cb4ab59 commit a41d386
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 74 deletions.
4 changes: 0 additions & 4 deletions arch/parisc/lib/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,7 @@ static const struct iomap_ops iomem_ops = {

const struct iomap_ops *iomap_ops[8] = {
[0] = &ioport_ops,
#ifdef CONFIG_DEBUG_IOREMAP
[6] = &iomem_ops,
#else
[7] = &iomem_ops
#endif
};


Expand Down
24 changes: 0 additions & 24 deletions arch/parisc/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,30 +114,6 @@ remap_area_pages(unsigned long address, unsigned long phys_addr,
return error;
}

#ifdef CONFIG_DEBUG_IOREMAP
static unsigned long last = 0;

void gsc_bad_addr(unsigned long addr)
{
if (time_after(jiffies, last + HZ*10)) {
printk("gsc_foo() called with bad address 0x%lx\n", addr);
dump_stack();
last = jiffies;
}
}
EXPORT_SYMBOL(gsc_bad_addr);

void __raw_bad_addr(const volatile void __iomem *addr)
{
if (time_after(jiffies, last + HZ*10)) {
printk("__raw_foo() called with bad address 0x%p\n", addr);
dump_stack();
last = jiffies;
}
}
EXPORT_SYMBOL(__raw_bad_addr);
#endif

/*
* Generic mapping function (not visible outside):
*/
Expand Down
33 changes: 0 additions & 33 deletions include/asm-parisc/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,11 @@ extern unsigned long parisc_vmerge_max_size;
* eg dev->hpa or 0xfee00000.
*/

#ifdef CONFIG_DEBUG_IOREMAP
#define NYBBLE_SHIFT (BITS_PER_LONG - 4)
extern void gsc_bad_addr(unsigned long addr);
extern void __raw_bad_addr(const volatile void __iomem *addr);
#define gsc_check_addr(addr) \
if ((addr >> NYBBLE_SHIFT) != 0xf) { \
gsc_bad_addr(addr); \
addr |= 0xfUL << NYBBLE_SHIFT; \
}
#define __raw_check_addr(addr) \
if (((unsigned long)addr >> NYBBLE_SHIFT) != 0xe) \
__raw_bad_addr(addr); \
addr = (void __iomem *)((unsigned long)addr | (0xfUL << NYBBLE_SHIFT));
#else
#define gsc_check_addr(addr)
#define __raw_check_addr(addr)
#endif

static inline unsigned char gsc_readb(unsigned long addr)
{
long flags;
unsigned char ret;

gsc_check_addr(addr);

__asm__ __volatile__(
" rsm 2,%0\n"
" ldbx 0(%2),%1\n"
Expand All @@ -64,8 +44,6 @@ static inline unsigned short gsc_readw(unsigned long addr)
long flags;
unsigned short ret;

gsc_check_addr(addr);

__asm__ __volatile__(
" rsm 2,%0\n"
" ldhx 0(%2),%1\n"
Expand All @@ -79,8 +57,6 @@ static inline unsigned int gsc_readl(unsigned long addr)
{
u32 ret;

gsc_check_addr(addr);

__asm__ __volatile__(
" ldwax 0(%1),%0\n"
: "=r" (ret) : "r" (addr) );
Expand All @@ -91,7 +67,6 @@ static inline unsigned int gsc_readl(unsigned long addr)
static inline unsigned long long gsc_readq(unsigned long addr)
{
unsigned long long ret;
gsc_check_addr(addr);

#ifdef __LP64__
__asm__ __volatile__(
Expand All @@ -108,8 +83,6 @@ static inline unsigned long long gsc_readq(unsigned long addr)
static inline void gsc_writeb(unsigned char val, unsigned long addr)
{
long flags;
gsc_check_addr(addr);

__asm__ __volatile__(
" rsm 2,%0\n"
" stbs %1,0(%2)\n"
Expand All @@ -120,8 +93,6 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr)
static inline void gsc_writew(unsigned short val, unsigned long addr)
{
long flags;
gsc_check_addr(addr);

__asm__ __volatile__(
" rsm 2,%0\n"
" sths %1,0(%2)\n"
Expand All @@ -131,17 +102,13 @@ static inline void gsc_writew(unsigned short val, unsigned long addr)

static inline void gsc_writel(unsigned int val, unsigned long addr)
{
gsc_check_addr(addr);

__asm__ __volatile__(
" stwas %0,0(%1)\n"
: : "r" (val), "r" (addr) );
}

static inline void gsc_writeq(unsigned long long val, unsigned long addr)
{
gsc_check_addr(addr);

#ifdef __LP64__
__asm__ __volatile__(
" stda %0,0(%1)\n"
Expand Down
13 changes: 0 additions & 13 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,6 @@ config DEBUG_INFO

If unsure, say N.

config DEBUG_IOREMAP
bool "Enable ioremap() debugging"
depends on DEBUG_KERNEL && PARISC
help
Enabling this option will cause the kernel to distinguish between
ioremapped and physical addresses. It will print a backtrace (at
most one every 10 seconds), hopefully allowing you to see which
drivers need work. Fixing all these problems is a prerequisite
for turning on USE_HPPA_IOREMAP. The warnings are harmless;
the kernel has enough information to fix the broken drivers
automatically, but we'd like to make it more efficient by not
having to do that.

config DEBUG_FS
bool "Debug Filesystem"
depends on SYSFS
Expand Down

0 comments on commit a41d386

Please sign in to comment.