From patchwork Wed Jul 23 17:02:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 34170 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FAF62061E for ; Wed, 23 Jul 2014 17:02:56 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id t60sf1157489wes.7 for ; Wed, 23 Jul 2014 10:02:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=GIHLUR9L9wT3gBuIYSbvoUlYSy5DUKqG9Zh0TmiKB0A=; b=UrHc6f9EmECj3NmugUz7CGUy9pSvaLcjkU+UW3EF0939pCOdCS1ye1pgy1jAmmTnmz 6WcN8PqxSuezVCXvKioCDSdmfs1ZNXQJ/hpo2qTvmZ/bezkBmAdMowhGTlwayhWubqvR yXauMNmflDC7EylYAG/9C19tzQA2pnasBBd0s1e2P0Mc6stxrdLfHYood8z5AVOfG0/o Z++56lRoxMQd9crH0HXL1eC4KYUdk89DLl+9F+CaCou9GGsFAfDUFVI/B7KjW95SAhNC C2LXQC7B6psK3+D2F9KEsqMXsvW3D/y8p2dE1ryUuexFa04eLzG+a5q1xFy9URfBJF+A UtOw== X-Gm-Message-State: ALoCoQn16QK97IFjzJAGn9SK5sgcEcKlokv8z4Ma/3tFux0X6r5GuFZAbWOsyqGuv3MDvaLG1CP9 X-Received: by 10.152.87.226 with SMTP id bb2mr322004lab.5.1406134975311; Wed, 23 Jul 2014 10:02:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.101 with SMTP id e92ls237644qge.37.gmail; Wed, 23 Jul 2014 10:02:55 -0700 (PDT) X-Received: by 10.220.144.10 with SMTP id x10mr4196797vcu.42.1406134975102; Wed, 23 Jul 2014 10:02:55 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id tj17si2739671vdb.100.2014.07.23.10.02.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 10:02:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so2711725vcb.4 for ; Wed, 23 Jul 2014 10:02:54 -0700 (PDT) X-Received: by 10.53.5.230 with SMTP id cp6mr3328417vdd.25.1406134974777; Wed, 23 Jul 2014 10:02:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp296565vcb; Wed, 23 Jul 2014 10:02:54 -0700 (PDT) X-Received: by 10.70.87.206 with SMTP id ba14mr3752299pdb.4.1406134973922; Wed, 23 Jul 2014 10:02:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tn6si3176333pab.73.2014.07.23.10.02.51 for ; Wed, 23 Jul 2014 10:02:53 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757655AbaGWRCu (ORCPT + 15 others); Wed, 23 Jul 2014 13:02:50 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:48120 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756793AbaGWRCu (ORCPT ); Wed, 23 Jul 2014 13:02:50 -0400 Received: by mail-wg0-f41.google.com with SMTP id z12so1495483wgg.12 for ; Wed, 23 Jul 2014 10:02:49 -0700 (PDT) X-Received: by 10.180.206.38 with SMTP id ll6mr3055548wic.40.1406134969159; Wed, 23 Jul 2014 10:02:49 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-316-208.w86-199.abo.wanadoo.fr. [86.199.203.208]) by mx.google.com with ESMTPSA id gq4sm11318045wib.8.2014.07.23.10.02.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 10:02:48 -0700 (PDT) From: Daniel Lezcano To: rjw@rjwysocki.net Cc: linux-pm@vger.kernel.org Subject: [PATCH 2/2] cpuidle: Remove time measurement in poll state Date: Wed, 23 Jul 2014 19:02:48 +0200 Message-Id: <1406134968-6483-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406134968-6483-1-git-send-email-daniel.lezcano@linaro.org> References: <1406134968-6483-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The time measurement is already done in the cpuidle framework in the 'cpuidle_enter_state' function. Signed-off-by: Daniel Lezcano --- drivers/cpuidle/driver.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 9634f20..e431d11 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c @@ -182,10 +182,6 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv) static int poll_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - ktime_t t1, t2; - s64 diff; - - t1 = ktime_get(); local_irq_enable(); if (!current_set_polling_and_test()) { while (!need_resched()) @@ -193,13 +189,6 @@ static int poll_idle(struct cpuidle_device *dev, } current_clr_polling(); - t2 = ktime_get(); - diff = ktime_to_us(ktime_sub(t2, t1)); - if (diff > INT_MAX) - diff = INT_MAX; - - dev->last_residency = (int) diff; - return index; }