Subject: Today's OSS doesn't work on Malta

From: "H. J. Lu" <[email-masked]>
Date: Fri, 2 Aug 2002 10:07:14 -0700

The 2.4 kernel from today's OSS doesn't work on Malta. I got

hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=77545/16/63, (U)DMA
Partition check:
 hda:<1>Unable to handle kernel paging request at virtual address 611c2000,
epc4
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000fc00 00000001 00001000 00001000 00001000 81191000 00000001
$8 : 811c0000 81199000 00000001 00008000 00010000 802d1358 00000000 00000080
$16: 611c2000 00000001 802d1338 00000000 00000000 00000008 00000000 00000000
$24: 0000000a 811ddd91                   8027a000 8027bd10 8009e0d0 801eaa24
Hi : 0000004f
Lo : df328000
epc  : 801eaa98    Not tainted
Status: 1000fc03
Cause : 0080000c
Process swapper (pid: 0, stackpage=8027a000)
Stack: 8027bd08 8027bd08 802b5c20 00000000 00001240 802d12c8 802d1338 801eb170
       0000000e 00000001 b8000000 802d1338 81198320 802d1338 81198320 802d12c8
       0000000e 00000001 801efc14 1000fc00 811dde48 802d1338 811dddd0 802d12c8
       0000000e 00000001 801e3ca8 802d12c8 8027bd88 1000fc00 8027bde0 1000fc00
       00000000 802d1338 81198320 801e406c 1000fc00 802d12c8 801e93e4 00000000
       00000003 ...
Call Trace: [<801eb170>] [<801efc14>] [<801e3ca8>] [<801e406c>] [<801e93e4>]
[<]
 [<801db1b4>] [<801e44ec>] [<801e3008>] [<8012ea04>] [<801e9290>] [<801e4be8>]
 [<80109690>] [<80109970>] [<8010ae3c>] [<80254554>] [<80254d10>] [<80254860>]
 [<801089a4>] [<80102e40>] [<80102e9c>] [<80102e44>] [<8010042c>] [<80255800>]

Code: 54e00001  00a02021  3083ffff <ae060000> 00a42823  14600008  26100004  263 
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing

---

From: Ryan Martindale <[email-masked]>
Date: Fri, 02 Aug 2002 11:21:17 -0700

>        00000000 802d1338 81198320 801e406c 1000fc00 802d12c8 801e93e4 00000000

Looks like what I was dealing with - check process.c patch I submitted a
couple of days ago (gp doesn't get set to the appropriate type of
structure).

Ryan

---

From: "H. J. Lu" <[email-masked]>
Date: Fri, 2 Aug 2002 10:30:34 -0700

> couple of days ago (gp doesn't get set to the appropriate type of

I couldn't find your process.c patch for 2.4 kernel. The only one I
saw is for 2.5.

H.J.

---

From: Carsten Langgaard <[email-masked]>
Date: Fri, 02 Aug 2002 20:57:13 +0200

I thing it's the pci stuff that is broken, I have send Ralf a patch, but
unfortunately he hasn't checked it in yet.
Try the patch below and see if it help.

/Carsten

Index: arch/mips/kernel/pci-dma.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/pci-dma.c,v
retrieving revision 1.7.2.1
diff -u -r1.7.2.1 pci-dma.c
--- arch/mips/kernel/pci-dma.c  2002/08/01 12:40:14     1.7.2.1
+++ arch/mips/kernel/pci-dma.c  2002/08/02 18:46:46
@@ -30,11 +30,11 @@

        if (ret != NULL) {
                memset(ret, 0, size);
+               *dma_handle = virt_to_bus(ret);
 #ifdef CONFIG_NONCOHERENT_IO
                dma_cache_wback_inv((unsigned long) ret, size);
                ret = UNCAC_ADDR(ret);
 #endif
-               *dma_handle = virt_to_bus(ret);
        }

        return ret;

Index: include/asm-mips/page.h
===================================================================
RCS file: /cvs/linux/include/asm-mips/page.h,v
retrieving revision 1.14.2.9
diff -u -r1.14.2.9 page.h
--- include/asm-mips/page.h     2002/08/01 12:40:14     1.14.2.9
+++ include/asm-mips/page.h     2002/08/02 18:49:26
@@ -125,8 +125,8 @@
 #define VM_DATA_DEFAULT_FLAGS  (VM_READ | VM_WRITE | VM_EXEC | \
                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

-#define UNCAC_ADDR(addr)       ((addr) - (PAGE_OFFSET + UNCAC_BASE))
-#define CAC_ADDR(addr)         ((addr) - (UNCAC_BASE + PAGE_OFFSET))
+#define UNCAC_ADDR(addr)       ((addr) - PAGE_OFFSET + UNCAC_BASE)
+#define CAC_ADDR(addr)         ((addr) - UNCAC_BASE + PAGE_OFFSET)

 /*
  * Memory above this physical address will be considered highmem.