Message ID | bc9a1be9bacfe155f89989404b6eba916286b4c5.1420177186.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBBHCTCSQKGQEHQUNQKY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B40DF26CB5 for <linaro@patches.linaro.org>; Fri, 2 Jan 2015 05:47:49 +0000 (UTC) Received: by mail-we0-f199.google.com with SMTP id k11sf2012626wes.2 for <linaro@patches.linaro.org>; Thu, 01 Jan 2015 21:47:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=DSFh4/fL0tRbYa7VeiGeRdMWdEIdxSqrmKwn3ov98so=; b=S6vtfqi7uVIfEEF2J9a8aRjdIntICZKimwnkF7ZUSSTTYGTo1Jg/AXy4EzT51ff2vd oaxsDVZCH8JOeaH7x3JPMO4iQoo7rkc4RWPh3Cjuasp1CdrRm+QiIMOrWo2YgqQx10Dy jT5nYq444JoHOtpg64KwGNe+XxSrZ7coN+ShUHv1k3/yt4Grp5cTAL5OxQmCP2weXHeE zt9tZZC/1Ae/C36hsEXCkXlGRDmTzwenqP+Nx8AOG8jIalJI6wwyjqLPqojTLNNrEGDZ /Nh6WVPmpKxtSFJDhtycppgSdsnlWs4J2I4E04xYTmQa8Yekm9toxlXAtFgstkhGhgk9 JtoA== X-Gm-Message-State: ALoCoQlg4wX0JHIjSueBZj76t+H+s36NdGSbX7C48HuvzuMSyBiznyzruYft/4toz+R0+au+pm6e X-Received: by 10.112.54.165 with SMTP id k5mr1235164lbp.5.1420177668959; Thu, 01 Jan 2015 21:47:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.2 with SMTP id f2ls562511lah.60.gmail; Thu, 01 Jan 2015 21:47:48 -0800 (PST) X-Received: by 10.152.21.134 with SMTP id v6mr74369358lae.13.1420177668622; Thu, 01 Jan 2015 21:47:48 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id lt6si50306220lac.47.2015.01.01.21.47.48 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id z11so6713988lbi.20 for <patchwork-forward@linaro.org>; Thu, 01 Jan 2015 21:47:48 -0800 (PST) X-Received: by 10.152.23.38 with SMTP id j6mr74844717laf.81.1420177668534; Thu, 01 Jan 2015 21:47:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp114511lbb; Thu, 1 Jan 2015 21:47:47 -0800 (PST) X-Received: by 10.66.117.199 with SMTP id kg7mr80694254pab.92.1420177666640; Thu, 01 Jan 2015 21:47:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si68097479pdc.177.2015.01.01.21.47.45; Thu, 01 Jan 2015 21:47:46 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750745AbbABFrp (ORCPT <rfc822;amit.pundir@linaro.org> + 12 others); Fri, 2 Jan 2015 00:47:45 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:41708 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbbABFro (ORCPT <rfc822;linux-pm@vger.kernel.org>); Fri, 2 Jan 2015 00:47:44 -0500 Received: by mail-pa0-f45.google.com with SMTP id lf10so23609831pab.4 for <linux-pm@vger.kernel.org>; Thu, 01 Jan 2015 21:47:44 -0800 (PST) X-Received: by 10.70.96.162 with SMTP id dt2mr119751005pdb.57.1420177664072; Thu, 01 Jan 2015 21:47:44 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id nl14sm34728859pdb.81.2015.01.01.21.47.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:42 -0800 (PST) From: Viresh Kumar <viresh.kumar@linaro.org> To: Rafael Wysocki <rjw@rjwysocki.net> Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH V2 11/14] cpufreq: stats: don't update stats on false notifiers Date: Fri, 2 Jan 2015 11:16:48 +0530 Message-Id: <bc9a1be9bacfe155f89989404b6eba916286b4c5.1420177186.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: <cover.1420177186.git.viresh.kumar@linaro.org> References: <cover.1420177186.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1420177186.git.viresh.kumar@linaro.org> References: <cover.1420177186.git.viresh.kumar@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@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: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index c0c2ddece8fe..7701532b32c8 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -293,11 +293,11 @@ static int cpufreq_stat_notifier_trans(struct notifier_block *nb, if (old_index == -1 || new_index == -1) return 0; - cpufreq_stats_update(stat); - if (old_index == new_index) return 0; + cpufreq_stats_update(stat); + spin_lock(&cpufreq_stats_lock); stat->last_index = new_index; #ifdef CONFIG_CPU_FREQ_STAT_DETAILS