Message ID | 5fb078efce86924709ce4a1fbeccaf6edaad04bc.1371630975.git.viresh.kumar@linaro.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBIHDQWHAKGQEGNPHG4A@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2C602397B for <linaro@patches.linaro.org>; Wed, 19 Jun 2013 08:53:52 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf4002238ghr.1 for <linaro@patches.linaro.org>; Wed, 19 Jun 2013 01:53:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=HDVW8xK4J2oorA1vAYfW0rA5/DC2lh8oHa0hcSN7/44=; b=MMIvaVKeFl1ET/zGA0dd8uG8Xcn/wPdP7FBdnjc5cEFP2di+H7bzaKpDp7HQlR+NGV Ja1rUpM8miTMRqTaUpIbdL90oQuU57+JmgjHpTvoR2q3TayiOpqKJpfBs1DWBTfj5n5C I36ypkCkzls1tSRfEqgY8iA3Ao3dznY96NRJwgh1yT9ti2KRjAFaUBOK3CMochMpILGQ nuvJEueEnZCpJd0ftxh7r3C3zqHvLd/5d9fyYBbGwnAvSB7DVLXMVkqG0l4J4+zY+HGn v3ELS/rR02Ez2xIsx4vBSCBHXkxqfIEO1A0hPdSq9v2BXg5LXVyx587782TIgNv0dl3m BJWg== X-Received: by 10.236.78.198 with SMTP id g46mr1061477yhe.56.1371632032501; Wed, 19 Jun 2013 01:53:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.195 with SMTP id gw3ls212836qeb.64.gmail; Wed, 19 Jun 2013 01:53:52 -0700 (PDT) X-Received: by 10.220.252.66 with SMTP id mv2mr312387vcb.22.1371632032377; Wed, 19 Jun 2013 01:53:52 -0700 (PDT) Received: from mail-vb0-x236.google.com (mail-vb0-x236.google.com [2607:f8b0:400c:c02::236]) by mx.google.com with ESMTPS id b5si5258777vcl.70.2013.06.19.01.53.52 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:53:52 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::236 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::236; Received: by mail-vb0-f54.google.com with SMTP id q12so3538740vbe.27 for <patchwork-forward@linaro.org>; Wed, 19 Jun 2013 01:53:52 -0700 (PDT) X-Received: by 10.52.120.77 with SMTP id la13mr541515vdb.23.1371632032262; Wed, 19 Jun 2013 01:53:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp100248veb; Wed, 19 Jun 2013 01:53:51 -0700 (PDT) X-Received: by 10.69.2.228 with SMTP id br4mr1809812pbd.91.1371632031244; Wed, 19 Jun 2013 01:53:51 -0700 (PDT) Received: from mail-pb0-x234.google.com (mail-pb0-x234.google.com [2607:f8b0:400e:c01::234]) by mx.google.com with ESMTPS id ym5si10372688pac.282.2013.06.19.01.53.50 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:53:51 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::234 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=2607:f8b0:400e:c01::234; Received: by mail-pb0-f52.google.com with SMTP id xa12so4810470pbc.25 for <patches@linaro.org>; Wed, 19 Jun 2013 01:53:50 -0700 (PDT) X-Received: by 10.66.82.162 with SMTP id j2mr5805373pay.168.1371632030852; Wed, 19 Jun 2013 01:53:50 -0700 (PDT) Received: from localhost ([106.198.29.238]) by mx.google.com with ESMTPSA id xu10sm23899377pab.3.2013.06.19.01.53.43 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:53:50 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, dave.martin@arm.com, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH 02/13] cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases Date: Wed, 19 Jun 2013 14:22:56 +0530 Message-Id: <5fb078efce86924709ce4a1fbeccaf6edaad04bc.1371630975.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: <cover.1371630975.git.viresh.kumar@linaro.org> References: <cover.1371630975.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1371630975.git.viresh.kumar@linaro.org> References: <cover.1371630975.git.viresh.kumar@linaro.org> X-Gm-Message-State: ALoCoQl8olSzTnbzjif1N95Y7nk9gtxzw7FoXXEFhOP8170sEtbwXOkhjIFwxtdQbV/tpkVBkcpY X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::236 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 5d7f53f..3549f07 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -84,11 +84,9 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy, ret = clk_set_rate(clk[cur_cluster], freqs.new * 1000); if (ret) { pr_err("clk_set_rate failed: %d\n", ret); - return ret; + freqs.new = freqs.old; } - policy->cur = freqs.new; - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); return ret;
PRECHANGE and POSTCHANGE notifiers must be called in groups, i.e either both should be called or both shouldn't be. In case we have started PRECHANGE notifier and found an error, we must call POSTCHANGE notifier with freqs.new = freqs.old to guarantee that sequence of calling notifiers is complete. This patch fixes it. This also removes code setting policy->cur as this is also done by POSTCHANGE notifier. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/arm_big_little.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)