Skip to contentSkip to conversation

2.6.31-rc1: zaurus suspend regressing

DISCUSSION Pavel Machek 5 participants 9 messages Jul 8, 2009 – Aug 5, 2009 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi!

In 2.6.30, spitz suspended with PSPR fix + charging disabled.

In 2.6.31-rc1, PSPR fix is in, but suspend does not work, not even with charging disabled.

Any ideas?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 8 lines · Pavel Machek

Hi!

In 2.6.30, spitz suspended with PSPR fix + charging disabled.

In 2.6.31-rc1, PSPR fix is in, but suspend does not work, not even with charging disabled.

Any ideas?

Tried -rc2-git, still broken. Even pm-test=devices killed the machine, so I hope it is the IDE problem that should be fixed in -rc3.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · - Cortez -

Hi,

Just tried to test suspend/resume with 2.6.31-rc3 on spitz (with charging disabled). This results in following kernel panic:

I suspect this is caused by commit 15bce40cb3133bcc07d548013df97e4653d363c1

[MTD] Restore suspend/resume support for mtd devices

This is intended to suspend/resume the _chip_, while we leave board drivers to handle their own suspend/resume for the controller.

Cortez,

Could you please revert this and give another try?

Quoted 117 lines
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 0 [#1] PREEMPT
Modules linked in:
CPU: 0    Tainted: G        W   (2.6.31-rc3-omegamoon-spitz #1)
PC is at 0x0
LR is at 0xc39cad3c
pc : [<00000000>]    lr : [<c39cad3c>]    psr: 60000013

sp : c3195ff8 ip : c39c9f00 fp : c39c9efc
r10: c03ce9b8 r9 : 00000005 r8 : c39ca7b4
r7 : 00000000 r6 : 00000000 r5 : c39ca780 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000002 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a1168000 DAC: 00000017 Process kapmd (pid: 1426, stack limit = 0xc3194278)

Stack: (0xc3195ff8 to 0xc3196000)
5fe0:                                                       00000000
00000000
Backtrace:
[<c021f2fc>] (mtd_cls_suspend+0x0/0x30) from [<c02029e4>]
(dpm_suspend_start+0x2
ac/0x444)
[<c0202738>] (dpm_suspend_start+0x0/0x444) from [<c0067500>]
(suspend_devices_an
d_enter+0x48/0x198)
[<c00674b8>] (suspend_devices_and_enter+0x0/0x198) from [<c0067704>]
(enter_stat
e+0xb4/0xf4)
 r6:c040e608 r5:00000003 r4:00000000
[<c0067650>] (enter_state+0x0/0xf4) from [<c0067768>] (pm_suspend+0x24/0x28)
 r5:c39c8000 r4:0000000a
[<c0067744>] (pm_suspend+0x0/0x28) from [<c01f6858>] (kapmd+0x174/0x1d8)
[<c01f66e4>] (kapmd+0x0/0x1d8) from [<c0051284>] (kthread+0x80/0x84)
[<c0051204>] (kthread+0x0/0x84) from [<c003bedc>] (do_exit+0x0/0x6dc)
 r7:00000000 r6:00000000 r5:00000000 r4:00000000
Code: bad PC value.
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 0 [#2] PREEMPT
Modules linked in:
CPU: 0    Tainted: G      D W   (2.6.31-rc3-omegamoon-spitz #1)
PC is at 0x0
LR is at 0xc39cad3c
pc : [<00000000>]    lr : [<c39cad3c>]    psr: 60000013

sp : c39c9ef0 ip : c39c9f00 fp : c39c9efc
r10: c03ce9b8 r9 : 00000005 r8 : c39ca7b4
r7 : 00000002 r6 : 00000000 r5 : c39ca780 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000002 r0 : 00000592
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a1168000 DAC: 00000017 Process kapmd (pid: 307, stack limit = 0xc39c8278)

Stack: (0xc39c9ef0 to 0xc39ca000)

9ee0: c39c9f34 c39c9f00 c02029e4
c021f308
9f00: c3aa64ac c2e8335c c39c9f2c 00000000 c03e0ce8 00000003 c39c9f84 c040e5f8
9f20: 00000000 c39c9f90 c39c9f54 c39c9f38 c0067500 c0202744 00000000 00000000
9f40: 00000003 c040e608 c39c9f6c c39c9f58 c0067704 c00674c4 0000000a c39c8000
9f60: c39c9f7c c39c9f70 c0067768 c006765c c39c9fc4 c39c9f80 c01f6858 c0067750
9f80: c39c9fc4 00000000 c3ad4000 c005136c c39c9f90 c39c9f90 c39c9fc4 c39c9fcc
9fa0: c3825ef8 00000000 c01f66e4 00000000 00000000 00000000 c39c9ff4 c39c9fc8
9fc0: c0051284 c01f66f0 00000000 00000000 c39c9fd0 c39c9fd0 00000000 00000000
9fe0: 00000000 00000000 00000000 c39c9ff8 c003bedc c0051210 726f7373 74656420

Backtrace:
[<c021f2fc>] (mtd_cls_suspend+0x0/0x30) from [<c02029e4>]
(dpm_suspend_start+0x2
ac/0x444)
[<c0202738>] (dpm_suspend_start+0x0/0x444) from [<c0067500>]
(suspend_devices_an
d_enter+0x48/0x198)
[<c00674b8>] (suspend_devices_and_enter+0x0/0x198) from [<c0067704>]
(enter_stat
e+0xb4/0xf4)
 r6:c040e608 r5:00000003 r4:00000000
[<c0067650>] (enter_state+0x0/0xf4) from [<c0067768>] (pm_suspend+0x24/0x28)
 r5:c39c8000 r4:0000000a
[<c0067744>] (pm_suspend+0x0/0x28) from [<c01f6858>] (kapmd+0x174/0x1d8)
[<c01f66e4>] (kapmd+0x0/0x1d8) from [<c0051284>] (kthread+0x80/0x84)
[<c0051204>] (kthread+0x0/0x84) from [<c003bedc>] (do_exit+0x0/0x6dc)
 r7:00000000 r6:00000000 r5:00000000 r4:00000000
Code: bad PC value.
---[ end trace 1b75b31a2719ed1e ]---
---[ end trace 1b75b31a2719ed1f ]---
Quoted 8 lines · Pavel Machek
Quoted 7 lines · Pavel Machek

Hi!

In 2.6.30, spitz suspended with PSPR fix + charging disabled.

In 2.6.31-rc1, PSPR fix is in, but suspend does not work, not even with charging disabled.

Quoted 9 lines
Quoted 1 line

Any ideas?

Tried -rc2-git, still broken. Even pm-test=devices killed the machine, so I hope it is the IDE problem that should be fixed in -rc3.

--
(english) http://www.livejournal.com/~pavelmachek<http://www.livejournal.com/%7Epavelmachek>
(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html<http://atrey.karlin.mff.cuni.cz/%7Epavel/picture/horses/blog.html>

-------------------------------------------------------------------

List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 7 lines · - Cortez -

Eric,

Thanks a lot, that worked. I hereby confirm that suspend/resume for spitz (SL-C3100) works again in 2.6.31-rc3 when reverting commit 15bce40cb3133bcc07d548013df97e4653d363c1. Apart from disabling the offline charging, which is still needed, I applied following patch:

David,

Could you please have a look into commit 15bce40c, which seems to cause some trouble on spitz?

Quoted 240 lines

diff -Naur ori/drivers/mtd/mtdcore.c new/drivers/mtd/mtdcore.c

drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +9 -37
@@ -23,15 +23,7 @@
 
 #include "mtdcore.h"
 
-static int mtd_cls_suspend(struct device *dev, pm_message_t state);
-static int mtd_cls_resume(struct device *dev);
-
-static struct class mtd_class = {
-    .name = "mtd",
-    .owner = THIS_MODULE,
-    .suspend = mtd_cls_suspend,
-    .resume = mtd_cls_resume,
-};
+static struct class *mtd_class;
 
 /* These are exported solely for the purpose of mtd_blkdevs.c. You
    should not use them for _anything_ else */
@@ -59,26 +51,7 @@
 
     /* remove /dev/mtdXro node if needed */
     if (index)
-        device_destroy(&mtd_class, index + 1);
-}
-
-static int mtd_cls_suspend(struct device *dev, pm_message_t state)
-{
-    struct mtd_info *mtd = dev_to_mtd(dev);
-
-    if (mtd->suspend)
-        return mtd->suspend(mtd);
-    else
-        return 0;
-}
-
-static int mtd_cls_resume(struct device *dev)
-{
-    struct mtd_info *mtd = dev_to_mtd(dev);
-
-    if (mtd->resume)
-        mtd->resume(mtd);
-    return 0;
+        device_destroy(mtd_class, index + 1);
 }
 
 static ssize_t mtd_type_show(struct device *dev,
@@ -295,7 +268,7 @@
              * physical device.
              */
             mtd->dev.type = &mtd_devtype;
-            mtd->dev.class = &mtd_class;
+            mtd->dev.class = mtd_class;
             mtd->dev.devt = MTD_DEVT(i);
             dev_set_name(&mtd->dev, "mtd%d", i);
             if (device_register(&mtd->dev) != 0) {
@@ -304,7 +277,7 @@
             }
 
             if (MTD_DEVT(i))
-                device_create(&mtd_class, mtd->dev.parent,
+                device_create(mtd_class, mtd->dev.parent,
                         MTD_DEVT(i) + 1,
                         NULL, "mtd%dro", i);
 
@@ -630,12 +603,11 @@
 
 static int __init init_mtd(void)
 {
-    int ret;
-    ret = class_register(&mtd_class);
+    mtd_class = class_create(THIS_MODULE, "mtd");
 
-    if (ret) {
-        pr_err("Error registering mtd class: %d\n", ret);
-        return ret;
+    if (IS_ERR(mtd_class)) {
+        pr_err("Error creating mtd class.\n");
+        return PTR_ERR(mtd_class);
     }
 #ifdef CONFIG_PROC_FS
     if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
@@ -650,7 +622,7 @@
         if (proc_mtd)
         remove_proc_entry( "mtd", NULL);
 #endif /* CONFIG_PROC_FS */
-    class_unregister(&mtd_class);
+    class_destroy(mtd_class);
 }
 
 module_init(init_mtd);

Cheers,
cortez

Quoted 141 lines · Eric Miao
Quoted 5 lines · - Cortez -

Hi,

Just tried to test suspend/resume with 2.6.31-rc3 on spitz (with charging disabled). This results in following kernel panic:

I suspect this is caused by commit 15bce40cb3133bcc07d548013df97e4653d363c1

[MTD] Restore suspend/resume support for mtd devices

This is intended to suspend/resume the _chip_, while we leave board drivers to handle their own suspend/resume for the controller.

Cortez,

Could you please revert this and give another try?

Quoted 1 line
Unable to handle kernel NULL pointer dereference at virtual address

00000000

Quoted 15 lines

pgd = c0004000
[00000000] *pgd=00000000

Internal error: Oops: 0 [#1] PREEMPT
Modules linked in:
CPU: 0    Tainted: G        W   (2.6.31-rc3-omegamoon-spitz #1)
PC is at 0x0
LR is at 0xc39cad3c
pc : [<00000000>]    lr : [<c39cad3c>]    psr: 60000013

sp : c3195ff8 ip : c39c9f00 fp : c39c9efc
r10: c03ce9b8 r9 : 00000005 r8 : c39ca7b4
r7 : 00000000 r6 : 00000000 r5 : c39ca780 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000002 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a1168000 DAC: 00000017 Process kapmd (pid: 1426, stack limit = 0xc3194278)

Quoted 15 lines
Stack: (0xc3195ff8 to 0xc3196000)
5fe0:                                                       00000000
00000000
Backtrace:
[<c021f2fc>] (mtd_cls_suspend+0x0/0x30) from [<c02029e4>]
(dpm_suspend_start+0x2
ac/0x444)
[<c0202738>] (dpm_suspend_start+0x0/0x444) from [<c0067500>]
(suspend_devices_an
d_enter+0x48/0x198)
[<c00674b8>] (suspend_devices_and_enter+0x0/0x198) from [<c0067704>]
(enter_stat
e+0xb4/0xf4)
 r6:c040e608 r5:00000003 r4:00000000
[<c0067650>] (enter_state+0x0/0xf4) from [<c0067768>]

(pm_suspend+0x24/0x28)

Quoted 7 lines

r5:c39c8000 r4:0000000a
[<c0067744>] (pm_suspend+0x0/0x28) from [<c01f6858>] (kapmd+0x174/0x1d8) [<c01f66e4>] (kapmd+0x0/0x1d8) from [<c0051284>] (kthread+0x80/0x84) [<c0051204>] (kthread+0x0/0x84) from [<c003bedc>] (do_exit+0x0/0x6dc)
r7:00000000 r6:00000000 r5:00000000 r4:00000000

Code: bad PC value.
Unable to handle kernel NULL pointer dereference at virtual address

00000000

Quoted 34 lines

pgd = c0004000
[00000000] *pgd=00000000

Internal error: Oops: 0 [#2] PREEMPT
Modules linked in:
CPU: 0    Tainted: G      D W   (2.6.31-rc3-omegamoon-spitz #1)
PC is at 0x0
LR is at 0xc39cad3c
pc : [<00000000>]    lr : [<c39cad3c>]    psr: 60000013

sp : c39c9ef0 ip : c39c9f00 fp : c39c9efc
r10: c03ce9b8 r9 : 00000005 r8 : c39ca7b4
r7 : 00000002 r6 : 00000000 r5 : c39ca780 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000002 r0 : 00000592
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a1168000 DAC: 00000017 Process kapmd (pid: 307, stack limit = 0xc39c8278)

Stack: (0xc39c9ef0 to 0xc39ca000)

9ee0: c39c9f34 c39c9f00 c02029e4
c021f308
9f00: c3aa64ac c2e8335c c39c9f2c 00000000 c03e0ce8 00000003 c39c9f84 c040e5f8
9f20: 00000000 c39c9f90 c39c9f54 c39c9f38 c0067500 c0202744 00000000 00000000
9f40: 00000003 c040e608 c39c9f6c c39c9f58 c0067704 c00674c4 0000000a c39c8000
9f60: c39c9f7c c39c9f70 c0067768 c006765c c39c9fc4 c39c9f80 c01f6858 c0067750
9f80: c39c9fc4 00000000 c3ad4000 c005136c c39c9f90 c39c9f90 c39c9fc4 c39c9fcc
9fa0: c3825ef8 00000000 c01f66e4 00000000 00000000 00000000 c39c9ff4 c39c9fc8
9fc0: c0051284 c01f66f0 00000000 00000000 c39c9fd0 c39c9fd0 00000000 00000000
9fe0: 00000000 00000000 00000000 c39c9ff8 c003bedc c0051210 726f7373 74656420

Quoted 12 lines
Backtrace:
[<c021f2fc>] (mtd_cls_suspend+0x0/0x30) from [<c02029e4>]
(dpm_suspend_start+0x2
ac/0x444)
[<c0202738>] (dpm_suspend_start+0x0/0x444) from [<c0067500>]
(suspend_devices_an
d_enter+0x48/0x198)
[<c00674b8>] (suspend_devices_and_enter+0x0/0x198) from [<c0067704>]
(enter_stat
e+0xb4/0xf4)
 r6:c040e608 r5:00000003 r4:00000000
[<c0067650>] (enter_state+0x0/0xf4) from [<c0067768>]

(pm_suspend+0x24/0x28)

Quoted 5 lines

r5:c39c8000 r4:0000000a
[<c0067744>] (pm_suspend+0x0/0x28) from [<c01f6858>] (kapmd+0x174/0x1d8) [<c01f66e4>] (kapmd+0x0/0x1d8) from [<c0051284>] (kthread+0x80/0x84) [<c0051204>] (kthread+0x0/0x84) from [<c003bedc>] (do_exit+0x0/0x6dc)
r7:00000000 r6:00000000 r5:00000000 r4:00000000

Quoted 21 lines
Code: bad PC value.
---[ end trace 1b75b31a2719ed1e ]---
---[ end trace 1b75b31a2719ed1f ]---
Quoted 14 lines · Pavel Machek
Quoted 8 lines · Pavel Machek

Hi!

In 2.6.30, spitz suspended with PSPR fix + charging disabled.

In 2.6.31-rc1, PSPR fix is in, but suspend does not work, not even with charging disabled.

Any ideas?

Tried -rc2-git, still broken. Even pm-test=devices killed the machine, so I hope it is the IDE problem that should be fixed in -rc3.

--
(english) http://www.livejournal.com/~pavelmachek<http://www.livejournal.com/%7Epavelmachek>

<http://www.livejournal.com/%7Epavelmachek>

Quoted 2 lines
Quoted 2 lines

(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html<http://atrey.karlin.mff.cuni.cz/%7Epavel/picture/horses/blog.html>

<http://atrey.karlin.mff.cuni.cz/%7Epavel/picture/horses/blog.html>

Quoted 2 lines

-------------------------------------------------------------------
List admin:

http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel

Quoted 2 lines
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
#6 lore raw
Quoted 9 lines · Eric Miao
Quoted 7 lines · - Cortez -

Eric,

Thanks a lot, that worked. I hereby confirm that suspend/resume for spitz (SL-C3100) works again in 2.6.31-rc3 when reverting commit 15bce40cb3133bcc07d548013df97e4653d363c1. Apart from disabling the offline charging, which is still needed, I applied following patch:

Quoted 4 lines

David,

Could you please have a look into commit 15bce40c, which seems to cause some trouble on spitz?

That bug hit me as well, and as in Cortez' case, reverting 15bce40 fixed it for me on a PXA3xx platform.

Quoted 23 lines
Quoted 23 lines

diff -Naur ori/drivers/mtd/mtdcore.c new/drivers/mtd/mtdcore.c

drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +1 -9
@@ -23,15 +23,7 @@
 
 #include "mtdcore.h"
 
-static int mtd_cls_suspend(struct device *dev, pm_message_t state);
-static int mtd_cls_resume(struct device *dev);
-
-static struct class mtd_class = {
-    .name = "mtd",
-    .owner = THIS_MODULE,
-    .suspend = mtd_cls_suspend,
-    .resume = mtd_cls_resume,
-};
+static struct class *mtd_class;
 
 /* These are exported solely for the purpose of mtd_blkdevs.c. You
    should not use them for _anything_ else */
@@ -59,26 +51,7 @@
 
Quoted 14 lines
Quoted 4 lines
drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +0 -2
     /* remove /dev/mtdXro node if needed */
     if (index)
-        device_destroy(&mtd_class, index + 1);
-}

drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 line 73

Quoted 10 lines
drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +0 -10
-
-static int mtd_cls_suspend(struct device *dev, pm_message_t state)
-{
-    struct mtd_info *mtd = dev_to_mtd(dev);
-
-    if (mtd->suspend)
-        return mtd->suspend(mtd);
-    else
-        return 0;
-}

I debugged quite a while and it looks like the mtd->suspend callback is set to some bogus address, which makes the driver jump into the nirvana from mtd_cls_suspend().

Quoted 23 lines
Quoted 23 lines
drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +2 -8
-static int mtd_cls_resume(struct device *dev)
-{
-    struct mtd_info *mtd = dev_to_mtd(dev);
-
-    if (mtd->resume)
-        mtd->resume(mtd);
-    return 0;
+        device_destroy(mtd_class, index + 1);
 }
 
 static ssize_t mtd_type_show(struct device *dev,
@@ -295,7 +268,7 @@
              * physical device.
              */
             mtd->dev.type = &mtd_devtype;
-            mtd->dev.class = &mtd_class;
+            mtd->dev.class = mtd_class;
             mtd->dev.devt = MTD_DEVT(i);
             dev_set_name(&mtd->dev, "mtd%d", i);
             if (device_register(&mtd->dev) != 0) {
@@ -304,7 +277,7 @@
             }
 
Quoted 5 lines

drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 line 282

Quoted 5 lines
drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +1 -1
             if (MTD_DEVT(i))
-                device_create(&mtd_class, mtd->dev.parent,
+                device_create(mtd_class, mtd->dev.parent,
                         MTD_DEVT(i) + 1,
                         NULL, "mtd%dro", i);

It also seems only related to the 'ro' devices created here. With that device_create() call removed, I couldn't reproduce anymore. That smells like a strange memory corruption, but I couldn't find the root cause for it. Can anyone else, maybe?

Daniel

Quoted 183 lines
Quoted 28 lines
drivers/mtd/mtdcore.c 2009-07-20 21:38:51.000000000 +0200 renamed from drivers/mtd/mtdcore.c 2009-07-13 22:26:13.000000000 +0200 +5 -6
@@ -630,12 +603,11 @@
 
 static int __init init_mtd(void)
 {
-    int ret;
-    ret = class_register(&mtd_class);
+    mtd_class = class_create(THIS_MODULE, "mtd");
 
-    if (ret) {
-        pr_err("Error registering mtd class: %d\n", ret);
-        return ret;
+    if (IS_ERR(mtd_class)) {
+        pr_err("Error creating mtd class.\n");
+        return PTR_ERR(mtd_class);
     }
 #ifdef CONFIG_PROC_FS
     if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
@@ -650,7 +622,7 @@
         if (proc_mtd)
         remove_proc_entry( "mtd", NULL);
 #endif /* CONFIG_PROC_FS */
-    class_unregister(&mtd_class);
+    class_destroy(mtd_class);
 }
 
 module_init(init_mtd);
Quoted 147 lines

Cheers,
cortez

Quoted 141 lines · Eric Miao
Quoted 5 lines · - Cortez -

Hi,

Just tried to test suspend/resume with 2.6.31-rc3 on spitz (with charging disabled). This results in following kernel panic:

I suspect this is caused by commit 15bce40cb3133bcc07d548013df97e4653d363c1

[MTD] Restore suspend/resume support for mtd devices

This is intended to suspend/resume the _chip_, while we leave board drivers to handle their own suspend/resume for the controller.

Cortez,

Could you please revert this and give another try?

Quoted 1 line
Unable to handle kernel NULL pointer dereference at virtual address

00000000

Quoted 15 lines

pgd = c0004000
[00000000] *pgd=00000000

Internal error: Oops: 0 [#1] PREEMPT
Modules linked in:
CPU: 0    Tainted: G        W   (2.6.31-rc3-omegamoon-spitz #1)
PC is at 0x0
LR is at 0xc39cad3c
pc : [<00000000>]    lr : [<c39cad3c>]    psr: 60000013

sp : c3195ff8 ip : c39c9f00 fp : c39c9efc
r10: c03ce9b8 r9 : 00000005 r8 : c39ca7b4
r7 : 00000000 r6 : 00000000 r5 : c39ca780 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000002 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a1168000 DAC: 00000017 Process kapmd (pid: 1426, stack limit = 0xc3194278)

Quoted 15 lines
Stack: (0xc3195ff8 to 0xc3196000)
5fe0:                                                       00000000
00000000
Backtrace:
[<c021f2fc>] (mtd_cls_suspend+0x0/0x30) from [<c02029e4>]
(dpm_suspend_start+0x2
ac/0x444)
[<c0202738>] (dpm_suspend_start+0x0/0x444) from [<c0067500>]
(suspend_devices_an
d_enter+0x48/0x198)
[<c00674b8>] (suspend_devices_and_enter+0x0/0x198) from [<c0067704>]
(enter_stat
e+0xb4/0xf4)
 r6:c040e608 r5:00000003 r4:00000000
[<c0067650>] (enter_state+0x0/0xf4) from [<c0067768>]

(pm_suspend+0x24/0x28)

Quoted 7 lines

r5:c39c8000 r4:0000000a
[<c0067744>] (pm_suspend+0x0/0x28) from [<c01f6858>] (kapmd+0x174/0x1d8) [<c01f66e4>] (kapmd+0x0/0x1d8) from [<c0051284>] (kthread+0x80/0x84) [<c0051204>] (kthread+0x0/0x84) from [<c003bedc>] (do_exit+0x0/0x6dc)
r7:00000000 r6:00000000 r5:00000000 r4:00000000

Code: bad PC value.
Unable to handle kernel NULL pointer dereference at virtual address

00000000

Quoted 34 lines

pgd = c0004000
[00000000] *pgd=00000000

Internal error: Oops: 0 [#2] PREEMPT
Modules linked in:
CPU: 0    Tainted: G      D W   (2.6.31-rc3-omegamoon-spitz #1)
PC is at 0x0
LR is at 0xc39cad3c
pc : [<00000000>]    lr : [<c39cad3c>]    psr: 60000013

sp : c39c9ef0 ip : c39c9f00 fp : c39c9efc
r10: c03ce9b8 r9 : 00000005 r8 : c39ca7b4
r7 : 00000002 r6 : 00000000 r5 : c39ca780 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000002 r0 : 00000592
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a1168000 DAC: 00000017 Process kapmd (pid: 307, stack limit = 0xc39c8278)

Stack: (0xc39c9ef0 to 0xc39ca000)

9ee0: c39c9f34 c39c9f00 c02029e4
c021f308
9f00: c3aa64ac c2e8335c c39c9f2c 00000000 c03e0ce8 00000003 c39c9f84 c040e5f8
9f20: 00000000 c39c9f90 c39c9f54 c39c9f38 c0067500 c0202744 00000000 00000000
9f40: 00000003 c040e608 c39c9f6c c39c9f58 c0067704 c00674c4 0000000a c39c8000
9f60: c39c9f7c c39c9f70 c0067768 c006765c c39c9fc4 c39c9f80 c01f6858 c0067750
9f80: c39c9fc4 00000000 c3ad4000 c005136c c39c9f90 c39c9f90 c39c9fc4 c39c9fcc
9fa0: c3825ef8 00000000 c01f66e4 00000000 00000000 00000000 c39c9ff4 c39c9fc8
9fc0: c0051284 c01f66f0 00000000 00000000 c39c9fd0 c39c9fd0 00000000 00000000
9fe0: 00000000 00000000 00000000 c39c9ff8 c003bedc c0051210 726f7373 74656420

Quoted 12 lines
Backtrace:
[<c021f2fc>] (mtd_cls_suspend+0x0/0x30) from [<c02029e4>]
(dpm_suspend_start+0x2
ac/0x444)
[<c0202738>] (dpm_suspend_start+0x0/0x444) from [<c0067500>]
(suspend_devices_an
d_enter+0x48/0x198)
[<c00674b8>] (suspend_devices_and_enter+0x0/0x198) from [<c0067704>]
(enter_stat
e+0xb4/0xf4)
 r6:c040e608 r5:00000003 r4:00000000
[<c0067650>] (enter_state+0x0/0xf4) from [<c0067768>]

(pm_suspend+0x24/0x28)

Quoted 5 lines

r5:c39c8000 r4:0000000a
[<c0067744>] (pm_suspend+0x0/0x28) from [<c01f6858>] (kapmd+0x174/0x1d8) [<c01f66e4>] (kapmd+0x0/0x1d8) from [<c0051284>] (kthread+0x80/0x84) [<c0051204>] (kthread+0x0/0x84) from [<c003bedc>] (do_exit+0x0/0x6dc)
r7:00000000 r6:00000000 r5:00000000 r4:00000000

Quoted 21 lines
Code: bad PC value.
---[ end trace 1b75b31a2719ed1e ]---
---[ end trace 1b75b31a2719ed1f ]---
Quoted 14 lines · Pavel Machek
Quoted 8 lines · Pavel Machek

Hi!

In 2.6.30, spitz suspended with PSPR fix + charging disabled.

In 2.6.31-rc1, PSPR fix is in, but suspend does not work, not even with charging disabled.

Any ideas?

Tried -rc2-git, still broken. Even pm-test=devices killed the machine, so I hope it is the IDE problem that should be fixed in -rc3.

--
(english) http://www.livejournal.com/~pavelmachek<http://www.livejournal.com/%7Epavelmachek>

<http://www.livejournal.com/%7Epavelmachek>

Quoted 2 lines
Quoted 2 lines

(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html<http://atrey.karlin.mff.cuni.cz/%7Epavel/picture/horses/blog.html>

<http://atrey.karlin.mff.cuni.cz/%7Epavel/picture/horses/blog.html>

Quoted 2 lines

-------------------------------------------------------------------
List admin:

http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel

Quoted 2 lines
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#7 lore raw
Quoted 4 lines · Daniel Mack

That bug hit me as well, and as in Cortez' case, reverting 15bce40 fixed
it for me on a PXA3xx platform.

Can you confirm that the fix in the mtd-2.6.git tree is sufficient?

Signature · 2 lines
David Woodhouse                            Open Source Technology Centre
[email protected]                              Intel Corporation
#8 lore raw
Quoted 7 lines · David Woodhouse
Quoted 4 lines · Daniel Mack

That bug hit me as well, and as in Cortez' case, reverting 15bce40 fixed
it for me on a PXA3xx platform.

Can you confirm that the fix in the mtd-2.6.git tree is sufficient?

Yep, thanks!

#9 lore raw
Quoted 10 lines · Daniel Mack
Quoted 7 lines · David Woodhouse
Quoted 4 lines · Daniel Mack

That bug hit me as well, and as in Cortez' case, reverting 15bce40 fixed
it for me on a PXA3xx platform.

Can you confirm that the fix in the mtd-2.6.git tree is sufficient?

Yep, thanks!

Any pointer to the fix patch, please?

Rafael

#10 lore raw
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Daniel Mack
Quoted 6 lines · David Woodhouse
Quoted 4 lines · Daniel Mack

That bug hit me as well, and as in Cortez' case, reverting 15bce40 fixed
it for me on a PXA3xx platform.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Can you confirm that the fix in the mtd-2.6.git tree is sufficient?

Yep, thanks!

Any pointer to the fix patch, please?

I merged the whole tree from
http://git.infradead.org/?p=mtd-2.6.git;a=summary

Haven't exactly bisected which specific fix was necessary, but (6afc4f:
mtd: fix the conversion from dev to mtd_info) looks like it fixes a serious bug.

Maybe David can elaborate some more?

Daniel