From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752850AbXJAKLs (ORCPT ); Mon, 1 Oct 2007 06:11:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751120AbXJAKLl (ORCPT ); Mon, 1 Oct 2007 06:11:41 -0400 Received: from ns2.suse.de ([195.135.220.15]:50470 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbXJAKLk (ORCPT ); Mon, 1 Oct 2007 06:11:40 -0400 To: Thomas Gleixner Cc: Andrew Morton , LKML , Linus Torvalds , Ingo Molnar , Len Brown , Venkatesh Pallipadi , "Rafael J. Wysocki" Subject: Re: [patch 1/2] ACPI: disable lower idle C-states across suspend/resume References: <20070922220347.586903979@linutronix.de> <20070922222118.882356049@linutronix.de> From: Andi Kleen Date: 01 Oct 2007 12:11:37 +0200 In-Reply-To: <20070922222118.882356049@linutronix.de> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner writes: > > +/* > + * Suspend / resume control > + */ > +static int acpi_idle_suspend; > + > +int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) > +{ > + acpi_idle_suspend = 1; > + return 0; > +} > + > +int acpi_processor_resume(struct acpi_device * device) > +{ > + acpi_idle_suspend = 0; > + return 0; > +} Instead of the ugly global variable you could you could just change pm_idle back to NULL (= default_idle) and then later restore it. -Andi