Skip to contentSkip to conversation

OOPS in APM 2.4.18-pre4 with i830MP agpgart

DISCUSSION Didier Moens 5 participants 8 messages Jan 18, 2002 – Jan 19, 2002 Agpgart driver

lore
Share & tools
lore
#0 lore raw

Dear all,

On november 27th, Nicolas Aspert was so kind as to post a modification to agpgart, which catters for detection of the Intel i830MP.

The patch was included in 2.4.18-pre2.

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

The APM oops log :

Oops: 0000
CPU:    0
EIP:    0010:[<00000000>]    Not tainted
EFLAGS: 00010246
eax: 00000000   ebx: dde76220   ecx: 00000000   edx: 00000000
esi: 00000003   edi: 00000000   ebp: 00000000   esp: c181bf4c
ds: 0018   es: 0018   ss: 0018
Process kapm-idled (pid: 3, stackpage=c181b000)
Stack: e29d0f06 c0121e00 dde76220 00000000 00000003 dde7623c 00000064 dde76220
       c0121eb6 dde76220 00000000 00000003 00000002 00000064 00000064 
0008e000
       c0110f0e 00000000 00000003 00000002 c0111183 00000002 c181a000 
c011131b
Call Trace: [<e29d0f06>] [<c0121e00>] [<c0121eb6>] [<c0110f0e>] [<c0111183>]
   [<c011131b>] [<c0111bfa>] [<c0140018>] [<c0105000>] [<c0105726>] 

[<c01119a0>]

Code:  Bad EIP value.
 Jan 18 10:06:01 localhost kernel: Unable to handle kernel NULL pointer 
dereference at virtual address 00000000
Jan 18 10:06:01 localhost kernel:  printing eip:
Jan 18 10:06:01 localhost kernel: 00000000
Jan 18 10:06:01 localhost kernel: *pde = 00000000
Jan 18 10:06:01 localhost kernel: Oops: 0000
Jan 18 10:06:01 localhost kernel: CPU:    0
Jan 18 10:06:01 localhost kernel: EIP:    0010:[<00000000>]    Not tainted
Jan 18 10:06:01 localhost kernel: EFLAGS: 00010246
Jan 18 10:06:01 localhost kernel: eax: 00000000   ebx: dde76220   ecx: 00000000   edx: 00000000
Jan 18 10:06:01 localhost kernel: esi: 00000003   edi: 00000000   ebp: 00000000   esp: c181bf4c
Jan 18 10:06:01 localhost kernel: ds: 0018   es: 0018   ss: 0018
Jan 18 10:06:01 localhost kernel: Process kapm-idled (pid: 3, stackpage=c181b000)
Jan 18 10:06:01 localhost kernel: Stack: e29d0f06 c0121e00 dde76220 00000000 00000003 dde7623c 00000064 dde76220
Jan 18 10:06:01 localhost kernel:        c0121eb6 dde76220 00000000 00000003 00000002 00000064 00000064 0008e000
Jan 18 10:06:01 localhost kernel:        c0110f0e 00000000 00000003 00000002 c0111183 00000002 c181a000 c011131b
Jan 18 10:06:01 localhost kernel: Call Trace: [<e29d0f06>] [pm_send+64/112] [pm_send_all+70/160] [send_event+30/112] [check_events+259/416]
Jan 18 10:06:01 localhost kernel: Call Trace: [<e29d0f06>] [<c0121e00>] [<c0121eb6>] [<c0110f0e>] [<c0111183>]
Jan 18 10:06:01 localhost kernel:    [apm_mainloop+123/176] [apm+602/624] [posix_lock_file+264/1376] [_stext+0/48] [kernel_thread+38/48] [apm+0/624]
Jan 18 10:06:01 localhost kernel:    [<c011131b>] [<c0111bfa>] [<c0140018>] [<c0105000>] [<c0105726>] [<c01119a0>]
Jan 18 10:06:01 localhost kernel:
Jan 18 10:06:01 localhost kernel: Code:  Bad EIP value.

Sincerely,

Didier Moens
-----
RUG/VIB - Dept. Molecular Biomedical Research - Core IT tel ++32(9)2645309 fax ++32(9)2645348
http://www.dmb.rug.ac.be

#1 lore raw
Quoted 3 lines

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

Looks like the author forgot to set the suspend/resume methods in the structure to the generic ones

#2 lore raw
Quoted 7 lines · Alan Cox
Quoted 4 lines

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

Looks like the author forgot to set the suspend/resume methods in the structure to the generic ones

Aargh... stupid me !! Well, I told Marcelo that I was not feeling too good the day I submitted the patch :-) And I just saw myself that the netry was missing in the intel_820 stuff also (duh !)
The origin of the problem is that I happen to have an old kernel at home (RH 7.1 2.4.2) that has no suspend/resume stuff, and this was where I wrote the original patch, and the rest propagated through the usual copy/paste way.
I correctly updated a part of the stuff but it's missing in other places, and since I don't use APM, the problem did not show up. However, I am out of fast connection, so I am unable to make a patch right now.
If nobody has made it by monday, I'll send the patch

Best regards, and thanks Didier for pointing the problem (and Alan for *very* quickly seeing what went wrong).

#3 lore raw
In reply to Didier Moens
Quoted 5 lines · Alan Cox
Quoted 3 lines

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

Looks like the author forgot to set the suspend/resume methods in the structure to the generic ones

1373 static int __init intel_i830_setup(struct pci_dev *i830_dev) 1374 {
1375 intel_i830_private.i830_dev = i830_dev;
1376
...
1404 agp_bridge.suspend = agp_generic_suspend;
1405 agp_bridge.resume = agp_generic_resume;

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#4 lore raw
In reply to Didier Moens
Quoted 5 lines · Dave Jones
Quoted 3 lines · Alan Cox
Quoted 1 line

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

Looks like the author forgot to set the suspend/resume methods in the structure to the generic ones

Quoted 8 lines

1373 static int __init intel_i830_setup(struct pci_dev *i830_dev) 1374 {
1375 intel_i830_private.i830_dev = i830_dev;
1376
...
1404 agp_bridge.suspend = agp_generic_suspend;
1405 agp_bridge.resume = agp_generic_resume;

I post an oops, 26'51" minutes later it gets diagnosed, and 3'26" after that a patch is submitted.

Quite speechless I am indeed.

Didier

#5 lore raw
In reply to Didier Moens

Hello again

Here is a small patch (against 2.4.18-pre2 since I don't have the latest 18-pre at hand) that should fix your the problem. It may not apply cleanly but that's all I can do at the moment.
Sorry again for my mistake.

Best regards

Nicolas.

agpgart_be.c_correct Fri Jan 18 21:39:02 2002 renamed from agpgart_be.c Fri Jan 18 21:37:43 2002 +7 -3
@@ -1400,7 +1400,6 @@
        agp_bridge.free_by_type = intel_i810_free_by_type;
        agp_bridge.agp_alloc_page = agp_generic_alloc_page;
        agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-
        agp_bridge.suspend = agp_generic_suspend;
        agp_bridge.resume = agp_generic_resume;
        agp_bridge.cant_use_aperture = 0;
@@ -1857,7 +1856,10 @@
        agp_bridge.free_by_type = agp_generic_free_by_type;
        agp_bridge.agp_alloc_page = agp_generic_alloc_page;
        agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-
+       agp_bridge.suspend = agp_generic_suspend;
+       agp_bridge.resume = agp_generic_resume;
+       agp_bridge.cant_use_aperture = 0;
+
        return 0;
 
        (void) pdev; /* unused */
@@ -1887,7 +1889,9 @@
        agp_bridge.free_by_type = agp_generic_free_by_type;
        agp_bridge.agp_alloc_page = agp_generic_alloc_page;
        agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-
+       agp_bridge.suspend = agp_generic_suspend;
+       agp_bridge.resume = agp_generic_resume;
+       agp_bridge.cant_use_aperture = 0;
        return 0;
 
        (void) pdev; /* unused */
#6 lore raw
In reply to Didier Moens
Quoted 10 lines · Didier Moens

Dear all,

On november 27th, Nicolas Aspert was so kind as to post a modification to agpgart, which catters for detection of the Intel i830MP.

The patch was included in 2.4.18-pre2.

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

Hello all

Here is a patch that fixes the APM/suspend/resume issues in agpgart (for 820 and 830MP chipsets). The patch is against 2.4.18-pre4

Have a nice week-end.

Nicolas

Signature · 2 lines
Nicolas Aspert      Signal Processing Laboratory (LTS)
Swiss Federal Institute of Technology (EPFL)
drivers/char/agp/agpgart_be.c +8 -2
diff -Nru linux-2.4.18-pre4.clean/drivers/char/agp/agpgart_be.c linux-2.4.18-pre4.dirty/drivers/char/agp/agpgart_be.c
@@ -1857,7 +1857,10 @@
        agp_bridge.free_by_type = agp_generic_free_by_type;
        agp_bridge.agp_alloc_page = agp_generic_alloc_page;
        agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-
+       agp_bridge.suspend = agp_generic_suspend;
+       agp_bridge.resume = agp_generic_resume;
+       agp_bridge.cant_use_aperture = 0;
+       
        return 0;
 
        (void) pdev; /* unused */
@@ -1887,7 +1890,10 @@
        agp_bridge.free_by_type = agp_generic_free_by_type;
        agp_bridge.agp_alloc_page = agp_generic_alloc_page;
        agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-
+       agp_bridge.suspend = agp_generic_suspend;
+       agp_bridge.resume = agp_generic_resume;
+       agp_bridge.cant_use_aperture = 0;
+       
        return 0;
 
        (void) pdev; /* unused */
#7 lore raw
In reply to Didier Moens
Quoted 13 lines · Nicolas Aspert
Quoted 10 lines · Didier Moens

Dear all,

On november 27th, Nicolas Aspert was so kind as to post a modification to agpgart, which catters for detection of the Intel i830MP.

The patch was included in 2.4.18-pre2.

Unfortunately, loading agpgart yields an oops when APM ("apm -s") is invoked, both in terminal and in X. APM functions perfectly when agpgart is absent.

Quoted 6 lines

Hello all

Here is a patch that fixes the APM/suspend/resume issues in agpgart (for 820 and 830MP chipsets). The patch is against 2.4.18-pre4

Have a nice week-end.

Patch functions OK for me (patch applied to 2.4.18-pre4) : I can enter and resume from APM with agpgart loaded.

Unfortunately, since moving from RedHat Rawhide 2.4.16-0.9 to vanilla 2.4.18-pre4, I'm regularly confronted with the "ide_dmaproc : chipset supported ide_dma_lostirq func only : 13"-error when resuming from APM (see lkml-thread "DMA woes", 2001-12-07, with interventions from Andre Hedrick), but I verified this is unrelated to the presence of the agpgart module.

Sincerely,

Didier