From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: ACPI sleep: check error values and disable it on SMP Date: Sun, 8 Jun 2003 22:38:23 +0200 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <20030608203823.GA9415@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Rusty trivial patch monkey Russell , ACPI mailing list , Andrew Grover List-Id: linux-acpi@vger.kernel.org Hi! Wakeup is hard to do on SMP, and freezer_processes is just not ready to work on SMP machine. As I have no SMP (hint hint ;-), it is better to disable it. ACPI should really really check if freezing processes worked, and handle failure. Please apply, Pavel --- linux-cvs.clean/drivers/acpi/sleep/main.c 2003-02-28 10:23:47.000000000 -0800 +++ linux-cvs/drivers/acpi/sleep/main.c 2003-06-08 14:39:03.000000000 -0700 @@ -214,6 +214,11 @@ { acpi_status status; +#ifdef CONFIG_SMP + /* Suspend is hard to get right on SMP. */ + return AE_ERROR; +#endif + /* get out if state is invalid */ if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5) return AE_ERROR; @@ -226,7 +231,10 @@ * TBD: S1 can be done without device_suspend. Make a CONFIG_XX * to handle however when S1 failed without device_suspend. */ - freeze_processes(); /* device_suspend needs processes to be stopped */ + if (freeze_processes()) { + thaw_processes(); + return AE_ERROR; /* device_suspend needs processes to be stopped */ + } /* do we have a wakeup address for S2 and S3? */ /* Here, we support only S4BIOS, those we set the wakeup address */ -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.