lkml.org 
[lkml]   [2000]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: aaaah! complete lockup 2.4.0-test9 SPARC32
* Anton Blanchard <anton@linuxcare.com> [001004 21:31]:
> > I just had my box completely lock up under 2.4.0-test9. I had insmodded
> > the dbri.o audio driver, which for some reason was refusing to work, at
> > all. So I rmmodded it, and at that point, the screen flickered once and
> > wham, complete lockup, nothing responds at all, no network, no SysRQ,
> > anything...Not even an oops printed to the screen.
> >
> > Machine:
> > SPARCstation 20, 1xTMS390Z55 50MHz SuperSPARC II w/1MB SuperCACHE
> > 48MB RAM, about 9G total disk space spanned over 3 drives, TGX...
>
> Short answer: don't use the dbri module :)
>
> It is buggy and requires someone to fix it.

Well, while I had Pete Zaitcev over the other day, we looked into
the problem a bit. I captured the oopses and ran it through ksymoops
and got this stack trace...

Trace; f001c6ec <do_sparc_fault+308/3ac>
Trace; f0010c88 <srmmu_fault+58/68>
Trace; f001ed28 <srmmu_unmapioaddr+a4/b4>
Trace; f0016d5c <_sparc_free_io+2c/50>
Trace; f0016b18 <iounmap+34/78>
Trace; f0016b88 <sbus_iounmap+4/14>
Trace; fe311380 <[dbri]dbri_detach+1c/48>
Trace; fe313e8c <[dbri]cleanup_module+30/67>

Working our way up, Pete noticed that _sparc_free_io() wasn't aligning
plen properly... problem solved.

While we were there, we noticed a few more problems in the file (misuse
of a #define, and poor renaming of copied code).

At this point, the dbri driver is properly loadable and unloadable...
now it just needs to be fixed... the patch follows...

Index: arch/sparc/kernel/ioport.c
===================================================================
RCS file: /cvs/linux/arch/sparc/kernel/ioport.c,v
retrieving revision 1.39
diff -u -r1.39 ioport.c
--- arch/sparc/kernel/ioport.c 2000/06/20 01:10:00 1.39
+++ arch/sparc/kernel/ioport.c 2000/10/09 07:55:15
@@ -244,6 +244,7 @@
unsigned long plen;

plen = res->end - res->start + 1;
+ plen = (plen + PAGE_SIZE-1) & PAGE_MASK;
while (plen != 0) {
plen -= PAGE_SIZE;
(*_sparc_unmapioaddr)(res->start + plen);
@@ -323,7 +324,7 @@
return;
}

- if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
+ if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
printk("sbus_free_consistent: unaligned va %p\n", p);
return;
}
@@ -496,7 +497,7 @@

if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
free_pages(va, order);
- printk("sbus_alloc_consistent: no core\n");
+ printk("pci_alloc_consistent: no core\n");
return NULL;
}
memset((char*)res, 0, sizeof(struct resource));
@@ -546,18 +547,18 @@

if ((res = _sparc_find_resource(&_sparc_dvma,
(unsigned long)p)) == NULL) {
- printk("sbus_free_consistent: cannot free %p\n", p);
+ printk("pci_free_consistent: cannot free %p\n", p);
return;
}

- if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
- printk("sbus_free_consistent: unaligned va %p\n", p);
+ if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
+ printk("pci_free_consistent: unaligned va %p\n", p);
return;
}

n = (n + PAGE_SIZE-1) & PAGE_MASK;
if ((res->end-res->start)+1 != n) {
- printk("sbus_free_consistent: region 0x%lx asked 0x%lx\n",
+ printk("pci_free_consistent: region 0x%lx asked 0x%lx\n",
(long)((res->end-res->start)+1), (long)n);
return;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.043 / U:10.936 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site