diff mbox

OMAP3: enabling CPU idle leads to panic

Message ID 48239d390911270202s3f6fcdbchaa7053bace5c36@mail.gmail.com (mailing list archive)
State Not Applicable
Delegated to: Paul Walmsley
Headers show

Commit Message

Sergey Lapin Nov. 27, 2009, 10:02 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c
b/arch/arm/mach-omap2/cpuidle34xx.c
index 1cfa5a6..6a12e53 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -346,6 +346,7 @@  int __init omap3_idle_init(void)

       mpu_pd = pwrdm_lookup("mpu_pwrdm");
       core_pd = pwrdm_lookup("core_pwrdm");
+       BUG_ON(!core_pd);

       omap_init_power_states();
       cpuidle_register_driver(&omap3_idle_driver);

kernel dies right on BUG_ON.
Also, I patched pwrdm_lookup to print all perdms if returning NULL,
ant there was no core_pwrdm there :(

Is core_pwrdm used only with idle? When I disable cpu idle,
I have no panics.

Update: I continued my investigation.
I added the following patch to kernel:
diff --git a/arch/arm/mach-omap2/powerdomain.c
b/arch/arm/mach-omap2/powerdomain.c
index b6990e3..35a5bd0 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -185,7 +185,15 @@  void pwrdm_init(struct powerdomain **pwrdm_list)

        if (pwrdm_list) {
                for (p = pwrdm_list; *p; p++) {
-                       pwrdm_register(*p);
+#ifdef CONFIG_DEBUG_LL
+                       int i;
+                       extern void printascii(char *);
+                       printascii((*p)->name);
+                       printascii("\n");
+#endif
+                       i = pwrdm_register(*p);
+                       if (i < 0)
+                               printascii("Damn\n");
                        _pwrdm_setup(*p);
                }
        }