From patchwork Sat May 1 15:32:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 96279 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o41FWq3L031406 for ; Sat, 1 May 2010 15:32:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753351Ab0EAPcu (ORCPT ); Sat, 1 May 2010 11:32:50 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:38888 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977Ab0EAPct (ORCPT ); Sat, 1 May 2010 11:32:49 -0400 Received: by gyg13 with SMTP id 13so560561gyg.19 for ; Sat, 01 May 2010 08:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=7bkXsjgJCT7uQeKgGThUWfz+v35AdZSF7PAo8ZPx+hI=; b=h+W6JHNyoYte1Rlm10qwy7POqvOciJob09uJza0gLx5VQFGf4aqFMQ1iebxkFKS3dL MU+rQAPNEHWIlKxckYTf2yLI8X6Ng5Yy0gn2DJFiytQIN1DarvQ6X2n0rcwHfHH1riN4 O8gt9pFfF+fJXwMVOWxT1DkTm+SusaRrW7PTI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=xDPPBM6/hBYGFuLelOKOZjBAjaZFr5kALQQ73sz4ATIVtjTjs6LwkKQLlboFi+XEFz AahV9M22IVVOqp6FCubRYcx0q7umalXz7vUvnyalXS94y8U9GNHKFwLLhALSH2pUxgNJ zUXcsyUVwnpCsO/7dmoQAhCUUbNGheJCfi/no= Received: by 10.150.243.18 with SMTP id q18mr5091647ybh.253.1272727968038; Sat, 01 May 2010 08:32:48 -0700 (PDT) Received: from [192.168.1.3] (cpe-76-184-240-29.tx.res.rr.com [76.184.240.29]) by mx.google.com with ESMTPS id 30sm31413111anp.11.2010.05.01.08.32.46 (version=SSLv3 cipher=RC4-MD5); Sat, 01 May 2010 08:32:46 -0700 (PDT) Message-ID: <4BDC4999.4050003@gmail.com> Date: Sat, 01 May 2010 10:32:41 -0500 From: Nishanth Menon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Peter Tseng CC: Kevin Hilman , linux-omap@vger.kernel.org Subject: Re: omap-pm: omap3_pm_defconfig no longer booting on Overo References: <4BD93413.6000409@gmail.com> <8739yckbyy.fsf@deeprootsystems.com> <4BDB9C05.5050307@gmail.com> In-Reply-To: <4BDB9C05.5050307@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 01 May 2010 15:32:52 +0000 (UTC) From 54d5b1b47560fc4d790834c760dc5140d48e25ab Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Sat, 1 May 2010 10:25:25 -0500 Subject: [RFC] [PATCH] OMAP3: PM: quickly hack fix up init_opp init_opp is seen to crash, in resource34xx.c BUG() causes a kernel oops when OPP layer is not registered! Original Report: http://marc.info/?l=linux-omap&m=127268352116119&w=2 Cc: Peter Tseng Cc: Kevin Hilman Reported-by: Peter Tseng Signed-off-by: Nishanth Menon --- Completely untested!! just for a dry-run and srf is going to go off in a month, so this is more or less a curio.. arch/arm/mach-omap2/resource34xx.c | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index c6cce8b..2297385 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -226,14 +226,36 @@ void init_opp(struct shared_resource *resp) dpll1_clk = clk_get(NULL, "dpll1_ck"); dpll2_clk = clk_get(NULL, "dpll2_ck"); ret = freq_to_opp(&opp_id, OPP_MPU, dpll1_clk->rate); - BUG_ON(ret); /* TBD Cleanup handling */ + if (ret) { + pr_err("%s: initializing %s failed! !match for %ld\n", + __func__, resp->name, dpll1_clk->rate); + if (dpll1_clk) + clk_put(dpll1_clk); + if (dpll2_clk) + clk_put(dpll2_clk); + dpll1_clk = NULL; + dpll2_clk = NULL; + vdd1_resp = NULL; + return; + } curr_vdd1_opp = opp_id; } else if (strcmp(resp->name, "vdd2_opp") == 0) { vdd2_resp = resp; dpll3_clk = clk_get(NULL, "dpll3_m2_ck"); l3_clk = clk_get(NULL, "l3_ick"); ret = freq_to_opp(&opp_id, OPP_L3, l3_clk->rate); - BUG_ON(ret); /* TBD Cleanup handling */ + if (ret) { + pr_err("%s: initializing %s failed! !match for %ld\n", + __func__, resp->name, l3_clk->rate); + if (l3_clk) + clk_put(l3_clk); + if (dpll3_clk) + clk_put(dpll3_clk); + l3_clk = NULL; + dpll3_clk = NULL; + vdd1_resp = NULL; + return; + } curr_vdd2_opp = opp_id; } resp->curr_level = opp_id; -- 1.7.0.4