From patchwork Thu Dec 27 14:55:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 1913261 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id DEA6E3FC66 for ; Thu, 27 Dec 2012 15:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995Ab2L0PCu (ORCPT ); Thu, 27 Dec 2012 10:02:50 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:58285 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956Ab2L0PCu (ORCPT ); Thu, 27 Dec 2012 10:02:50 -0500 X-Greylist: delayed 381 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 Dec 2012 10:02:49 EST Received: by mail-wg0-f52.google.com with SMTP id 12so4416147wgh.19 for ; Thu, 27 Dec 2012 07:02:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=jef4tLDJZZv73BPPRtRPM0/Ezl4d9A+mcRyGi4P9ffs=; b=ggt2cWdKb3X7SpkStTFCPyOnGLJWlHszbZ1dij33Ok5ip09tOV1yW0ISz4vDujnr0/ P17+QC1nzsBvGUD6DmfnlaVlp030S9RtQIZJ5kjvYeWnqUnOp7+N+lBwsSRdu3iur8I2 Ij2KZVYBWYG1ySK7PgI4IH7YE1tsy3tW0aJgxYtJVCWG/7iSWxq5Tp1wR8fqAtJwvTa1 aHA2vIUzjuvk+9lKDrrssq9mRAsI1smHOdPiB2HukYEV6GUtqwL1Hmb/NjWbyCFzDNHC SaS3B6vp1a/QoaqzaeSZKcm58zk+25PjLV78ALBzGz4ZYB5sHljBN1mk7ly7/sNKxzFF z0CA== X-Received: by 10.180.82.170 with SMTP id j10mr47810141wiy.2.1356620193377; Thu, 27 Dec 2012 06:56:33 -0800 (PST) Received: from localhost ([2a01:2029:1:11e3:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id df2sm48484453wib.0.2012.12.27.06.56.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Dec 2012 06:56:32 -0800 (PST) From: Fabio Baltieri To: "Rafael J. Wysocki" , cpufreq@vger.kernel.org, linux-pm@vger.kernel.org Cc: Linus Walleij , linux-kernel@vger.kernel.org, Fabio Baltieri Subject: [PATCH 5/5] cpufreq: ondemand: use all CPUs in update_sampling_rate Date: Thu, 27 Dec 2012 15:55:42 +0100 Message-Id: <1356620142-8680-6-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1356620142-8680-1-git-send-email-fabio.baltieri@linaro.org> References: <1356620142-8680-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQmj8n7UusL0M7FEHrp+8FMm+aQbr3H6s/UgQVgTlSxx7TpfT3z8ATwM0u6hpReriiGsW2UE Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Modify update_sampling_rate() to check, and eventually immediately schedule, all CPU's do_dbs_timer delayed work. This is required in case of software coordinated CPUs, as we now have a separate delayed work for each CPU. Signed-off-by: Fabio Baltieri --- drivers/cpufreq/cpufreq_ondemand.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 13ceb3c..1017b90 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -326,7 +326,7 @@ static void update_sampling_rate(unsigned int new_rate) cpufreq_cpu_put(policy); continue; } - dbs_info = &per_cpu(od_cpu_dbs_info, policy->cpu); + dbs_info = &per_cpu(od_cpu_dbs_info, cpu); cpufreq_cpu_put(policy); mutex_lock(&dbs_info->cdbs.timer_mutex); @@ -345,8 +345,7 @@ static void update_sampling_rate(unsigned int new_rate) cancel_delayed_work_sync(&dbs_info->cdbs.work); mutex_lock(&dbs_info->cdbs.timer_mutex); - schedule_delayed_work_on(dbs_info->cdbs.cpu, - &dbs_info->cdbs.work, + schedule_delayed_work_on(cpu, &dbs_info->cdbs.work, usecs_to_jiffies(new_rate)); }