From patchwork Mon Nov 26 16:39:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 1803071 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 5472340E13 for ; Mon, 26 Nov 2012 16:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755561Ab2KZQlT (ORCPT ); Mon, 26 Nov 2012 11:41:19 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:54311 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755527Ab2KZQlQ (ORCPT ); Mon, 26 Nov 2012 11:41:16 -0500 Received: by mail-ee0-f46.google.com with SMTP id e53so4587622eek.19 for ; Mon, 26 Nov 2012 08:41:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ZePovtT0h7nRw1AMfgUlHOFOPohqFbGHlhCe78J9WdI=; b=EsTEVmSscw/VqteiaOfv6tHYSex6RVNA5skK8zdp98WHfGNYqohq50+VMSyO/TK3y5 q9076NiT/T7kLIFIPzsyAT7tvCBX8//Kkn0v5S0nm1oTfB7DEpoX39+t9NMbZdTlOBOV vYqDW+LanBJD/aMFRCAbaj+ykVI5nqyX28DRH+Ke59KSojlYzdaQvxALDEFfMz1dnz08 qMFsTIU97gw1LqZ8GLgw4lJbf79CKvLm2P/0IpV+MoWK8Z+B67LqRUdzoUBcSZnvPknf Qg4jlHem8OViCE0ADSsQWxOUJGzAKZZ7W5rw6nagl+EWUE9wxptOWh8XqyxlRxj/miyy C34w== Received: by 10.14.209.193 with SMTP id s41mr9904521eeo.9.1353948075805; Mon, 26 Nov 2012 08:41:15 -0800 (PST) Received: from localhost ([2a01:2029:1:1304:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id d44sm35054875eeo.10.2012.11.26.08.41.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 08:41:15 -0800 (PST) From: Fabio Baltieri To: "Rafael J. Wysocki" , cpufreq@vger.kernel.org, linux-pm@vger.kernel.org Cc: Rickard Andersson , Vincent Guittot , Linus Walleij , Lee Jones , linux-kernel@vger.kernel.org, Fabio Baltieri Subject: [PATCH 5/5] cpufreq: ondemand: use all CPUs in update_sampling_rate Date: Mon, 26 Nov 2012 17:39:56 +0100 Message-Id: <1353947996-26723-6-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1353947996-26723-1-git-send-email-fabio.baltieri@linaro.org> References: <1353947996-26723-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQkEEPKzT9msx/8EtMHLsfuYHL3+f5C6jurHNL434SLe05k0fbKaHODtw3S4uJb+bld909Gv 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 e07593e..e34bb2b 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -318,7 +318,7 @@ static void update_sampling_rate(unsigned int new_rate) policy = cpufreq_cpu_get(cpu); if (!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); @@ -337,8 +337,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)); }