From patchwork Fri Nov 21 09:29:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 5353641 X-Patchwork-Delegate: lenb@kernel.org Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A5E7D9F2F1 for ; Fri, 21 Nov 2014 09:30:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7D3D20176 for ; Fri, 21 Nov 2014 09:30:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08A392016C for ; Fri, 21 Nov 2014 09:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755073AbaKUJaE (ORCPT ); Fri, 21 Nov 2014 04:30:04 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:49020 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbaKUJaB (ORCPT ); Fri, 21 Nov 2014 04:30:01 -0500 Received: by mail-wg0-f44.google.com with SMTP id b13so6007112wgh.31 for ; Fri, 21 Nov 2014 01:29:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MCfoG/UeECUm9/khUEd2VW2T2ZB6h04OY5dndic89uM=; b=a5o1jlwOAFcjbcEyjnTMa0vKfDJGG26s9ubEbyEGJRe14+OpgTXMfPgpblXul5qgnu 8eTksRGaknkW3jqrtMzHXvrj1ORve2op4W5ayqu0YYtZnLucjYwH29+GwGV1FJ8zPLV/ rOXEujBCyYS7ukHo1mvS0Sg0Os6rWTCNQSdWg6CDzisyxnwA+sdqlbQnL4NfFepVB2QI qCPID84xn8TvSS5zrtR7iwS+PVA6OkwdHhe4Oj4F3xJy8kjw8XtJbYO2XlWUOSDOc9Pv NNEbIONL44geLZ2tAyPuuqEZRS0lvsmICnEX6a9l9krq3GErtXs3QQuKyvEkY2Xluawu JdPA== X-Gm-Message-State: ALoCoQlcy9XZfqz5MiEPoYys8LQ2zkdWFkHRp3LCCZRJau04choMqjq3X4LwK+0uqarD1BAsSr2A X-Received: by 10.180.228.37 with SMTP id sf5mr23845123wic.35.1416562197071; Fri, 21 Nov 2014 01:29:57 -0800 (PST) Received: from localhost.localdomain ([109.215.21.36]) by mx.google.com with ESMTPSA id pj4sm7259002wjb.16.2014.11.21.01.29.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Nov 2014 01:29:56 -0800 (PST) From: Daniel Lezcano To: rjw@rjwysocki.net Cc: linux-pm@vger.kernel.org, linaro-kernel@lists.linaro.org, linux-acpi@vger.kernel.org Subject: [PATCH 1/2] cpuidle: acpi: Remove TIME_INVALID flag from acpi Date: Fri, 21 Nov 2014 10:29:51 +0100 Message-Id: <1416562192-14114-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 The commit 8e92b6605d introduced the TIME_VALID flag for the C1 state if this one is a mwait state assuming the interrupt will be enabled before reading the end time of the idle state. The changelog of this commit mention a potential problem with the menu governor but not a real observation and I assume it described an old code as the commit is from 2008. I have been digging through the code and I didn't find any place where the interrupts are enabled before reading the time. Moreover with the changes in the meantime, we moved the time measurements in the cpuidle core as well as the interrupts enabling making sure the time is measured before the interrupt are enabled again in a single place. Remove this test as the time measurement is always valid for this state. Signed-off-by: Daniel Lezcano --- drivers/acpi/processor_idle.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 380b4b4..7afba40 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -985,8 +985,6 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) state->flags = 0; switch (cx->type) { case ACPI_STATE_C1: - if (cx->entry_method != ACPI_CSTATE_FFH) - state->flags |= CPUIDLE_FLAG_TIME_INVALID; state->enter = acpi_idle_enter_c1; state->enter_dead = acpi_idle_play_dead;