From patchwork Fri Aug 16 02:25:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2845453 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EF994BF546 for ; Fri, 16 Aug 2013 03:39:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 17ACF2022D for ; Fri, 16 Aug 2013 03:39:22 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA66520205 for ; Fri, 16 Aug 2013 03:39:20 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA9ng-0004mc-A2; Fri, 16 Aug 2013 02:30:04 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA9n3-0006t5-PC; Fri, 16 Aug 2013 02:29:26 +0000 Received: from mail-pa0-f53.google.com ([209.85.220.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA9lc-0006dL-Cl for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2013 02:27:57 +0000 Received: by mail-pa0-f53.google.com with SMTP id lb1so1331612pab.26 for ; Thu, 15 Aug 2013 19:27:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=IJcUwAm5zN6823/1G5y7CipwF0pmNU8ta0M55Ef3WNU=; b=QACQ2rkC1chEpgA4X/ZAgSxnuinMQ5UAJTKAbgWdv6PPBgzFEbN6L85GPvSYf7CKEP 0inFQtAX+2UnXJeZgKJa2WpcAwABGWTO8WO19RyvyhGbPtkw2s2SO27mcNgC8Q40dFET +b1HKFdTMaQAPwUKCEYgedpNWKYoZx+qsJw7w9KcZpoh3cI9eUt9XkOgzvdaEiXIlQl7 h5kYjjFgz6MqaFihpYsm2WyI+eS4DSq/3xRkYj5KiQUoF/xlvHhgmrL6YUuAV2Tt/DbJ tdRt/GTACoyeYMFv34uxV3nrTZSAU7a28Fb3mx4XU2eEmonAo7gRFgleX88wlbkqiFLC 1zfw== X-Gm-Message-State: ALoCoQkxxqsLvWX+hboZRkmAISUZwzNEzOlZEfbtTd4sD6V03G23wxeJ11JcKrzScvWg+zVf42vX X-Received: by 10.68.249.68 with SMTP id ys4mr10969820pbc.159.1376620054785; Thu, 15 Aug 2013 19:27:34 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id a5sm3111469pbw.4.2013.08.15.19.27.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:34 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 14/34] cpufreq: ia64-acpi: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:11 +0530 Message-Id: <84963d5452aa2178f43c96c6adc87c34cdb27403.1376619363.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130815_222756_566406_11B5DF08 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, Tony Luck , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most of the drivers do following in their ->target_index() routines: struct cpufreq_freqs freqs; freqs.old = old freq... freqs.new = new freq... cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Change rate here */ cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); This is replicated over all cpufreq drivers today and there doesn't exists a good enough reason why this shouldn't be moved to cpufreq core instead. Earlier patches have added support in cpufreq core to do cpufreq notification on frequency change, this one removes it from this driver. Some related minor cleanups are also done along with it. Cc: Tony Luck Signed-off-by: Viresh Kumar --- drivers/cpufreq/ia64-acpi-cpufreq.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index 4695fa2..53c6ac6 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -141,7 +141,6 @@ processor_set_freq ( { int ret = 0; u32 value = 0; - struct cpufreq_freqs cpufreq_freqs; cpumask_t saved_mask; int retval; @@ -168,13 +167,6 @@ processor_set_freq ( pr_debug("Transitioning from P%d to P%d\n", data->acpi_data.state, state); - /* cpufreq frequency struct */ - cpufreq_freqs.old = data->freq_table[data->acpi_data.state].frequency; - cpufreq_freqs.new = data->freq_table[state].frequency; - - /* notify cpufreq */ - cpufreq_notify_transition(policy, &cpufreq_freqs, CPUFREQ_PRECHANGE); - /* * First we write the target state's 'control' value to the * control_register. @@ -186,22 +178,11 @@ processor_set_freq ( ret = processor_set_pstate(value); if (ret) { - unsigned int tmp = cpufreq_freqs.new; - cpufreq_notify_transition(policy, &cpufreq_freqs, - CPUFREQ_POSTCHANGE); - cpufreq_freqs.new = cpufreq_freqs.old; - cpufreq_freqs.old = tmp; - cpufreq_notify_transition(policy, &cpufreq_freqs, - CPUFREQ_PRECHANGE); - cpufreq_notify_transition(policy, &cpufreq_freqs, - CPUFREQ_POSTCHANGE); printk(KERN_WARNING "Transition failed with error %d\n", ret); retval = -ENODEV; goto migrate_end; } - cpufreq_notify_transition(policy, &cpufreq_freqs, CPUFREQ_POSTCHANGE); - data->acpi_data.state = state; retval = 0;