From patchwork Fri Nov 27 10:02:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Lapin X-Patchwork-Id: 63303 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nARA2MU4008687 for ; Fri, 27 Nov 2009 10:02:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754259AbZK0KCO (ORCPT ); Fri, 27 Nov 2009 05:02:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754254AbZK0KCO (ORCPT ); Fri, 27 Nov 2009 05:02:14 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:39715 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218AbZK0KCM (ORCPT ); Fri, 27 Nov 2009 05:02:12 -0500 Received: by ewy19 with SMTP id 19so1240110ewy.21 for ; Fri, 27 Nov 2009 02:02:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=k6eJn/8Q7eSohVt7+mxv+ZvDGikjrQqNxMWasy3WVH0=; b=rcl1zYDMTvJ6XKw2FZTbuVpCZe/9R0wu7hr4yJ1+GcLr99g+P9srUaoVvWowxwfv53 78eY2QQJSd478ju0CI2vL3gckV4Y8xAOpZL3rcIp6MLkyJInoTgMHCLiIBc/95tpQsgV 7mupWI20hLgGkcRqWP1Q6ahiOgqlh45EF29yU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=eNlIkbypYE/q6gm2g6ZLtsZPe5U0gaKw6iheZJwWbrFkIbtYvx52K1Mwd/yEQHztbU p4KYhj8bwygiJfSVfw7Q77e/PczCI3iHkR9RBxUzdRwxsLvFrKc6N9zrmKIVKD2FLoUT JHiqB2qPYhaTnHlQ2N1nvUIjDHwjNiyNJ4JOI= MIME-Version: 1.0 Received: by 10.213.23.201 with SMTP id s9mr657148ebb.15.1259316135838; Fri, 27 Nov 2009 02:02:15 -0800 (PST) In-Reply-To: <87iqcyh5p5.fsf@deeprootsystems.com> References: <48239d390911240713v50bcae9ek855fb1e07c081486@mail.gmail.com> <873a43wzfm.fsf@deeprootsystems.com> <48239d390911250737q35fc602fu9bce0b0f96f6970d@mail.gmail.com> <87iqcyh5p5.fsf@deeprootsystems.com> Date: Fri, 27 Nov 2009 13:02:15 +0300 Message-ID: <48239d390911270202s3f6fcdbchaa7053bace5c36@mail.gmail.com> Subject: Re: OMAP3: enabling CPU idle leads to panic From: Sergey Lapin To: Kevin Hilman Cc: "Premi, Sanjeev" , "linux-omap@vger.kernel.org" Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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); } }