From patchwork Tue May 3 09:40:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshay Adiga X-Patchwork-Id: 9001551 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DD572BF29F for ; Tue, 3 May 2016 09:41:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29D9A20225 for ; Tue, 3 May 2016 09:41:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E77F20123 for ; Tue, 3 May 2016 09:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932574AbcECJlJ (ORCPT ); Tue, 3 May 2016 05:41:09 -0400 Received: from e28smtp07.in.ibm.com ([125.16.236.7]:32946 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932664AbcECJlG (ORCPT ); Tue, 3 May 2016 05:41:06 -0400 Received: from localhost by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 May 2016 15:11:03 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp07.in.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 3 May 2016 15:10:59 +0530 X-IBM-Helo: d28dlp03.in.ibm.com X-IBM-MailFrom: akshay.adiga@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org;linux-pm@vger.kernel.org Received: from d28relay08.in.ibm.com (d28relay08.in.ibm.com [9.184.220.159]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 586AE125804F; Tue, 3 May 2016 15:13:00 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay08.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u439euxv29032528; Tue, 3 May 2016 15:10:57 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u439esCj028903; Tue, 3 May 2016 15:10:56 +0530 Received: from dhcp-9-109-222-70.in.ibm.com ([9.109.222.70]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u439eqt5028835; Tue, 3 May 2016 15:10:53 +0530 From: Akshay Adiga To: rjw@rjwysocki.net, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Akshay Adiga Subject: [PATCH -next 2/2] cpufreq: powernv: del_timer_sync when global and local pstate are equal Date: Tue, 3 May 2016 15:10:48 +0530 Message-Id: <1462268448-19954-3-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1462268448-19954-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> References: <1462268448-19954-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16050309-0025-0000-0000-00000BD9813A Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Deleting pending gpstates->timer for the policy when global and local pstate are equal while executing target_index(). This saves an unnecessary irq call. Signed-off-by: Akshay Adiga --- Patch is based on Rafael's linux-next drivers/cpufreq/powernv-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 1f0e20c..54c4536 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -647,6 +647,8 @@ static int powernv_cpufreq_target_index(struct cpufreq_policy *policy, */ if (gpstate_id != freq_data.pstate_id) queue_gpstate_timer(gpstates); + else + del_timer_sync(&gpstates->timer); gpstates_done: freq_data.gpstate_id = gpstate_id;