From patchwork Thu Jan 29 02:13:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 5734101 Return-Path: X-Original-To: patchwork-linux-acpi@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 92CC2BF440 for ; Thu, 29 Jan 2015 01:51:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDF8020218 for ; Thu, 29 Jan 2015 01:51:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3C60201DD for ; Thu, 29 Jan 2015 01:51:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755177AbbA2BuQ (ORCPT ); Wed, 28 Jan 2015 20:50:16 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:59281 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754082AbbA2BuP (ORCPT ); Wed, 28 Jan 2015 20:50:15 -0500 Received: from aerl224.neoplus.adsl.tpnet.pl (79.191.193.224) (HELO vostro.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer v0.80) id 2716ab84ecb97bc2; Thu, 29 Jan 2015 02:50:13 +0100 From: "Rafael J. Wysocki" To: Linux PM list Cc: ACPI Devel Maling List , Linux Kernel Mailing List , Len Brown , Peter Zijlstra Subject: [PATCH] ACPI / cpuidle: Drop unnecessary calls from acpi_idle_do_entry() Date: Thu, 29 Jan 2015 03:13:01 +0100 Message-ID: <1891290.rcp9NuuoxH@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 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=ham 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 From: Rafael J. Wysocki Since the cpuidle core calls stop_critical_timings() and start_critical_timings() around the execution of ->enter callbacks, acpi_idle_do_entry() doesn't need to do that (and really shouldn't). Also using "inline" on it is pointless and the kerneldoc entry does not reflect the actual situation any more. Fix all of the above. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_idle.c | 7 ++----- drivers/cpuidle/cpuidle.c | 7 ++++--- 2 files changed, 6 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/acpi/processor_idle.c =================================================================== --- linux-pm.orig/drivers/acpi/processor_idle.c +++ linux-pm/drivers/acpi/processor_idle.c @@ -681,15 +681,13 @@ static int acpi_idle_bm_check(void) } /** - * acpi_idle_do_entry - a helper function that does C2 and C3 type entry + * acpi_idle_do_entry - enter idle state using the appropriate method * @cx: cstate data * * Caller disables interrupt before call and enables interrupt after return. */ -static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx) +static void acpi_idle_do_entry(struct acpi_processor_cx *cx) { - /* Don't trace irqs off for idle */ - stop_critical_timings(); if (cx->entry_method == ACPI_CSTATE_FFH) { /* Call into architectural FFH based C-state */ acpi_processor_ffh_cstate_enter(cx); @@ -703,7 +701,6 @@ static inline void acpi_idle_do_entry(st gets asserted in time to freeze execution properly. */ inl(acpi_gbl_FADT.xpm_timer_block.address); } - start_critical_timings(); } /**