Message ID | 07d316c551e66b387254f0f544e18e415b9c181d.1371630975.git.viresh.kumar@linaro.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBFPEQWHAKGQEKWQV3MY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 452AE2397B for <linaro@patches.linaro.org>; Wed, 19 Jun 2013 08:55:49 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f73sf6995162yha.10 for <linaro@patches.linaro.org>; Wed, 19 Jun 2013 01:55:49 -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=L0xJ0bhG2SSj3h6H57u5+gj5aLXSBrvRPP65DR7ZqK0=; b=MjuMJ35iXn610AlS+vuxIKqc+6nQjXbjq7YMRdkEjl1CyApuDTWWXkGQi8aLmd7SUU TVtgaT8yJwuZG7Vg8KjXVlPA8739OJhbwSlzfj9VETgeMpix6Wo8v/GoSJNE/+5eZlNq aQksTpoNVEhP1a1W9v0q+8jjq6N4A+lm6/xTd8Eib9OqRAhOzVxOUQaYjrrdx74Ciw6v n2exFKHNHhtnrcQHAKNIRWGvHzcFe9gkzTL8OA37zX/EIQwm7g0lii9EAW2IJM0FRUiB BLCHzQeZQufL1C3FvOHDfRWEvLMKR8DpNd8ZpSQTbxwkiCv6V7MbJRjAMFkdhgT8uPOo 1SEg== X-Received: by 10.236.171.65 with SMTP id q41mr1031083yhl.53.1371632149049; Wed, 19 Jun 2013 01:55:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.41.7 with SMTP id b7ls179778qel.12.gmail; Wed, 19 Jun 2013 01:55:48 -0700 (PDT) X-Received: by 10.220.11.143 with SMTP id t15mr317295vct.68.1371632148856; Wed, 19 Jun 2013 01:55:48 -0700 (PDT) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [2607:f8b0:400c:c02::232]) by mx.google.com with ESMTPS id zp6si6334280vdb.2.2013.06.19.01.55.48 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:55:48 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::232 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::232; Received: by mail-vb0-f50.google.com with SMTP id w16so3526858vbb.37 for <patchwork-forward@linaro.org>; Wed, 19 Jun 2013 01:55:48 -0700 (PDT) X-Received: by 10.220.67.10 with SMTP id p10mr314647vci.85.1371632148770; Wed, 19 Jun 2013 01:55:48 -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 yu8csp100292veb; Wed, 19 Jun 2013 01:55:48 -0700 (PDT) X-Received: by 10.68.225.197 with SMTP id rm5mr1786871pbc.159.1371632147838; Wed, 19 Jun 2013 01:55:47 -0700 (PDT) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by mx.google.com with ESMTPS id tb9si7566920pbc.129.2013.06.19.01.55.47 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:55:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.175 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.175; Received: by mail-pd0-f175.google.com with SMTP id 4so4854454pdd.20 for <patches@linaro.org>; Wed, 19 Jun 2013 01:55:47 -0700 (PDT) X-Received: by 10.66.252.195 with SMTP id zu3mr5830829pac.185.1371632147466; Wed, 19 Jun 2013 01:55:47 -0700 (PDT) Received: from localhost ([106.198.29.238]) by mx.google.com with ESMTPSA id pm7sm22262087pbb.31.2013.06.19.01.55.40 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:55:46 -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 10/13] cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases Date: Wed, 19 Jun 2013 14:23:04 +0530 Message-Id: <07d316c551e66b387254f0f544e18e415b9c181d.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: ALoCoQncMdOQQdwBLgc5756aHTghAx/xseuC+CxhhBSL7YzwBZLFjFiDs2JFe98IMteap5H0Tuu2 X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::232 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/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index b828efe..c916320 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -967,9 +967,9 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, res = transition_fid_vid(data, fid, vid); if (res) - return res; - - freqs.new = find_khz_freq_from_fid(data->currfid); + freqs.new = freqs.old; + else + freqs.new = find_khz_freq_from_fid(data->currfid); cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); return res;
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. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/powernow-k8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)