From: Alex Williamson Subject: [PATCH] Re: [Xen-staging] [linux-2.6.18-xen] linux/x86: fix powering off certain machines Date: Fri, 04 Apr 2008 10:30:24 -0600 Message-ID: <1207326624.7591.9.camel@lappy> References: <200804041229.m34CT3HK010024@latara.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200804041229.m34CT3HK010024@latara.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2008-04-04 at 13:29 +0100, Xen staging patchbot-linux-2.6.18-xen wrote: > # HG changeset patch > # User Keir Fraser > # Date 1207312068 -3600 > # Node ID 0d6c9c975eaee85e35d4007b1b84cafbfbb24378 > # Parent 51f1b31888b8173dc9a94e46280f83c9011c4f51 > linux/x86: fix powering off certain machines > > Dell's Precision490, for example, fails to properly power off without > going through the full sequence of operations in the hypervisor. Hence > acpi_notify_hypervisor_state() must be defined, and used for entry to > S5, regardless of CONFIG_ACPI_PV_SLEEP configuration. > > Also fix a compiler warning and the improper use of a hypervisor > return value as ACPI status. ia64 doesn't implement acpi_notify_hypervisor_state() and I'm not sure we want to let Xen own the acpi hardware. The patch below lets us continue to use the unmodified code. Thanks, Alex Signed-off-by: Alex Williamson -- diff -r 0d6c9c975eae drivers/acpi/hardware/hwsleep.c --- a/drivers/acpi/hardware/hwsleep.c Fri Apr 04 13:27:48 2008 +0100 +++ b/drivers/acpi/hardware/hwsleep.c Fri Apr 04 10:22:07 2008 -0600 @@ -227,7 +227,7 @@ acpi_status asmlinkage acpi_enter_sleep_ u32 PM1Bcontrol; struct acpi_bit_register_info *sleep_type_reg_info; struct acpi_bit_register_info *sleep_enable_reg_info; -#ifndef CONFIG_XEN +#if !(defined(CONFIG_XEN) && defined(CONFIG_X86)) u32 in_value; #else int err; @@ -331,7 +331,7 @@ acpi_status asmlinkage acpi_enter_sleep_ ACPI_FLUSH_CPU_CACHE(); -#ifndef CONFIG_XEN +#if !(defined(CONFIG_XEN) && defined(CONFIG_X86)) status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);