From patchwork Mon Mar 24 07:00:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 26918 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C7FA2202E7 for ; Mon, 24 Mar 2014 07:00:39 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id gq1sf21276793obb.7 for ; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) 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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=zdHouhjL96BePPxF7Y5Dr5NvaS21gVWXsviGRWAhI6o=; b=dQ4SeDQt8jn+APSR6Yl+ELw8LOx/nN2a7YGPyXLNqZEqeOJRJ1KWx+s3jY1iIFht50 76GRDCMvGXaUApirtLsbVJk+lGq4RyKx3qbkfiF5dXpBAfhr+lrxVzP/UR4x4vuMGCK9 2rE/VyCZB9vndqj8fayYlQ7G9JoEL5MDlM96iCfu75S0dMj4v3WxYqOe3JRaUCbUsESA Y8NFD2Wrb6C6sDOQngmoOK1Muzml4kImTZzU3jtfESBFLAJ2UreYYrqV8NWcyFnCjQ+b kMvQ4Otu/KV/+n+sqZqxJXVxecOE/P9pHMlV0KOuxh3M4g3j2GUmuwIchxX+ODw0fHVp gMLQ== X-Gm-Message-State: ALoCoQkDv8LujwcZOXY6uXCOnK6oFw4MI4NCNzFfpssk34WIrBJ6BgpLC+7b4/A5Qq6AGKAHh2E0 X-Received: by 10.43.161.202 with SMTP id mh10mr21006917icc.23.1395644438901; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.210 with SMTP id g76ls1002373qge.69.gmail; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr1134591vek.22.1395644438797; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id sq9si2927469vdc.17.2014.03.24.00.00.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 00:00:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id im17so5363688vcb.9 for ; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr1134586vek.22.1395644438716; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) 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.220.78.9 with SMTP id i9csp201388vck; Mon, 24 Mar 2014 00:00:38 -0700 (PDT) X-Received: by 10.66.155.133 with SMTP id vw5mr51428160pab.124.1395644437775; Mon, 24 Mar 2014 00:00:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sh5si8484882pbc.321.2014.03.24.00.00.37; Mon, 24 Mar 2014 00:00:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of cpufreq-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750900AbaCXHAg (ORCPT + 6 others); Mon, 24 Mar 2014 03:00:36 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:57385 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbaCXHAf (ORCPT ); Mon, 24 Mar 2014 03:00:35 -0400 Received: by mail-we0-f173.google.com with SMTP id w61so3171349wes.32 for ; Mon, 24 Mar 2014 00:00:34 -0700 (PDT) X-Received: by 10.180.20.176 with SMTP id o16mr13227550wie.7.1395644434652; Mon, 24 Mar 2014 00:00:34 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id di9sm34180466wid.6.2014.03.24.00.00.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Mar 2014 00:00:33 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH] cpufreq: resume drivers before enabling governors Date: Mon, 24 Mar 2014 12:30:29 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e Sender: cpufreq-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: cpufreq@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=neutral (google.com: 209.85.220.178 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , During suspend, we first stop governors and then suspend cpufreq drivers and resume must be exactly opposite of that. i.e. resume drivers first and then start governors. But the current code in resume enables governors first and then resume drivers. Fix it be changing code sequence there. Signed-off-by: Viresh Kumar --- For 3.15-rc2 .. drivers/cpufreq/cpufreq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3aa7a7a..d8d6bc9 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1652,14 +1652,13 @@ void cpufreq_resume(void) cpufreq_suspended = false; list_for_each_entry(policy, &cpufreq_policy_list, policy_list) { - if (__cpufreq_governor(policy, CPUFREQ_GOV_START) + if (cpufreq_driver->resume && cpufreq_driver->resume(policy)) + pr_err("%s: Failed to resume driver: %p\n", __func__, + policy); + else if (__cpufreq_governor(policy, CPUFREQ_GOV_START) || __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS)) pr_err("%s: Failed to start governor for policy: %p\n", __func__, policy); - else if (cpufreq_driver->resume - && cpufreq_driver->resume(policy)) - pr_err("%s: Failed to resume driver: %p\n", __func__, - policy); /* * schedule call cpufreq_update_policy() for boot CPU, i.e. last