From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752835AbbE0IWW (ORCPT ); Wed, 27 May 2015 04:22:22 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:37169 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752613AbbE0IWS (ORCPT ); Wed, 27 May 2015 04:22:18 -0400 Message-ID: <55657EB9.7050905@linaro.org> Date: Wed, 27 May 2015 10:22:17 +0200 From: Daniel Lezcano User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "Rafael J. Wysocki" , Linux PM list CC: Linux Kernel Mailing List , Peter Zijlstra , Len Brown , Preeti U Murthy Subject: Re: [PATCH] cpuidle: Do not use CPUIDLE_DRIVER_STATE_START in cpuidle.c References: <5494512.JcUbNX5Mxs@vostro.rjw.lan> In-Reply-To: <5494512.JcUbNX5Mxs@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/27/2015 03:36 AM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The CPUIDLE_DRIVER_STATE_START symbol is defined as 1 only if > CONFIG_ARCH_HAS_CPU_RELAX is set, otherwise it is defined as 0. > However, if CONFIG_ARCH_HAS_CPU_RELAX is set, the first (index 0) > entry in the cpuidle driver's table of states is overwritten with > the default "poll" entry by the core. The "state" defined by the > "poll" entry doesn't provide ->enter_dead and ->enter_freeze > callbacks and its exit_latency is 0. > > For this reason, it is not necessary to use CPUIDLE_DRIVER_STATE_START > in cpuidle_play_dead() (->enter_dead is NULL, so the "poll state" > will be skipped by the loop) and in find_deepest_state() (since > exit_latency is 0, the "poll state" will become the default if the > "s->exit_latency <= latency_req" check is replaced with > "s->exit_latency < latency_req" which may only matter for drivers > providing different states with the same exit_latency). > > Signed-off-by: Rafael J. Wysocki I was about to send *exactly* the same patch :) Acked-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog