From patchwork Fri Nov 23 09:31:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 1794541 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 CEDB13FCDE for ; Fri, 23 Nov 2012 09:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759002Ab2KWJcl (ORCPT ); Fri, 23 Nov 2012 04:32:41 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:64968 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758669Ab2KWJck (ORCPT ); Fri, 23 Nov 2012 04:32:40 -0500 Received: by mail-wi0-f178.google.com with SMTP id hm6so1423350wib.1 for ; Fri, 23 Nov 2012 01:32:39 -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=Vph/9F/SfyMb7HYIWXT8BTNQ/wq+oboxGX5jZWxCqXk=; b=O0z7KjCIP+TGlsfJz4+WBoSZmVTaA/t7yhSFR86br6LTuAn1/Qk3SAbkPN/MIjaBcB nzS2TRqKC2MLtLbtBVlN574crtUXurHLkTE21lvLRWBiGdql4H4aO4rw94XL5fO4nWan LLwcersB6lXfSjBlXLgVhUUJlEiMEe2DCHimDY8xUf4kwRhMdjaMnBpD84VFiLcYjz4g onG7n8Oz+R5uJ/+53l/aKBE+gh55RnzVH3olamefYXRUJgIXY9/SvgLktfDoCd2jo5z2 4Y5x2iNI80WL5NY7gXrurKoWuXDnfnzGIvN7xeI6o2sH0b2SUIQ1qXdXFyvcX9QIQM7z rYLQ== Received: by 10.180.100.97 with SMTP id ex1mr5146337wib.1.1353663159672; Fri, 23 Nov 2012 01:32:39 -0800 (PST) Received: from localhost ([2a01:2029:1:1304:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id w5sm8678269wiz.10.2012.11.23.01.32.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 01:32:39 -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 v4 2/2] cpufreq: ondemand: use all CPUs in update_sampling_rate Date: Fri, 23 Nov 2012 10:31:57 +0100 Message-Id: <1353663117-10074-2-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1353663117-10074-1-git-send-email-fabio.baltieri@linaro.org> References: <1353663117-10074-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQnKckssNnrK1Lz9czYHyirsj9wCoS5sMUh9Te8vJTQ+EHAGyLQD2vucQITQNkZzDM24Gx1G 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 849788b..14339f6 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -286,7 +286,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->timer_mutex); @@ -306,7 +306,7 @@ static void update_sampling_rate(unsigned int new_rate) cancel_delayed_work_sync(&dbs_info->work); mutex_lock(&dbs_info->timer_mutex); - schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, + schedule_delayed_work_on(cpu, &dbs_info->work, usecs_to_jiffies(new_rate)); }