summaryrefslogtreecommitdiffstats
path: root/arch/ppc/xmon/xmon.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
commit529c593ece216e4aaffd36bd940cb94f1fa63129 (patch)
tree78f1c0b805f5656aa7b0417a043c5346f700a2cf /arch/ppc/xmon/xmon.c
parent0bd079751d25808d1972baee5c4eaa1db2227257 (diff)
Merge with 2.3.43. I did ignore all modifications to the qlogicisp.c
driver due to the Origin A64 hacks.
Diffstat (limited to 'arch/ppc/xmon/xmon.c')
-rw-r--r--arch/ppc/xmon/xmon.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c
index 1c6a812d2..a0da2f1b4 100644
--- a/arch/ppc/xmon/xmon.c
+++ b/arch/ppc/xmon/xmon.c
@@ -1344,3 +1344,31 @@ char *str;
{
lineptr = str;
}
+
+char last[64];
+char *
+lookup_addr(unsigned long addr)
+{
+ extern char *sysmap;
+ extern unsigned long sysmap_size;
+ char *c = sysmap;
+ unsigned long cmp;
+
+ if ( !sysmap || !sysmap_size )
+ return NULL;
+
+ /* adjust if addr is relative to kernelbase */
+ if ( addr < PAGE_OFFSET )
+ addr += PAGE_OFFSET;
+
+ cmp = simple_strtoul(c, &c, 8);
+ strcpy( last, strsep( &c, "\n"));
+ while ( c < (sysmap+sysmap_size) )
+ {
+ cmp = simple_strtoul(c, &c, 8);
+ if ( cmp < addr )
+ break;
+ strcpy( last, strsep( &c, "\n"));
+ }
+ return last;
+}