public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [Fwd: [PATCH] Don't save state in ACPI on shutdown/reboot]
@ 2003-11-11 16:23 Len Brown
       [not found] ` <1068567824.24982.21.camel-D2Zvc0uNKG8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Len Brown @ 2003-11-11 16:23 UTC (permalink / raw)
  To: ACPI Developers

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: Forwarded message - [PATCH] Don't save state in ACPI on shutdown/reboot --]
[-- Type: message/rfc822, Size: 3739 bytes --]

From: Andi Kleen <ak-h9bWGtP8wOw@public.gmane.org>
To: marcelo.tosatti-3EexvZdKGZRWk0Htik3J/w@public.gmane.org, len.brown@intel.com
Subject: [PATCH] Don't save state in ACPI on shutdown/reboot
Date: Tue, 11 Nov 2003 14:14:43 +0100
Message-ID: <20031111131443.GA23874-/48724CwFAA@public.gmane.org>


The ACPI code in 2.4 currently saves the machine state as for a 
suspend when doing an reboot or shutdown. This fails on x86-64
on some boxes.

Don't save/restore state in ACPI when entering S5.

-Andi

diff -u linux-2.4.21/drivers/acpi/system.c-o linux-2.4.21/drivers/acpi/system.c
--- linux-2.4.21/drivers/acpi/system.c-o	2003-09-23 00:40:19.000000000 +0200
+++ linux-2.4.21/drivers/acpi/system.c	2003-09-23 01:05:05.000000000 +0200
@@ -118,7 +118,8 @@
 	 * been loaded from disk.
 	 */
 	if (state > ACPI_STATE_S1) {
-		acpi_restore_state_mem();
+		if (state != ACPI_STATE_S5) 
+			acpi_restore_state_mem();
 
 		/* Do _early_ resume for irqs.  Required by
 		 * ACPI specs.
@@ -127,6 +128,7 @@
 		 * interrupts.
 		 */
 #ifdef CONFIG_X86
+		/* AK: this looks rather broken in APIC mode */
 		init_8259A(0);
 #endif
 		/* wait for power to come back */
@@ -200,7 +202,7 @@
 		ACPI_FLUSH_CPU_CACHE();
 
 		/* Do arch specific saving of state. */
-		if (state > ACPI_STATE_S1) {
+		if (state > ACPI_STATE_S1 && state < ACPI_STATE_S5) {
 			error = acpi_save_state_mem();
 
 			/* TBD: if no s4bios, write codes for


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fwd: [PATCH] Don't save state in ACPI on shutdown/reboot]
       [not found] ` <1068567824.24982.21.camel-D2Zvc0uNKG8@public.gmane.org>
@ 2003-11-11 17:00   ` Ducrot Bruno
       [not found]     ` <20031111170035.GD29175-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Ducrot Bruno @ 2003-11-11 17:00 UTC (permalink / raw)
  To: Len Brown; +Cc: ACPI Developers

On Tue, Nov 11, 2003 at 11:23:44AM -0500, Len Brown wrote:
> 

Content-Description: Forwarded message - [PATCH] Don't save state in ACPI on shutdown/reboot
> From: Andi Kleen <ak-h9bWGtP8wOw@public.gmane.org>
> To: marcelo.tosatti-3EexvZdKGZRWk0Htik3J/w@public.gmane.org, len.brown@intel.com
> Subject: [PATCH] Don't save state in ACPI on shutdown/reboot
> X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang)
> X-OriginalArrivalTime: 11 Nov 2003 13:15:03.0923 (UTC)
> 	FILETIME=[D1A1BC30:01C3A855]
> 
> 
> The ACPI code in 2.4 currently saves the machine state as for a 
> suspend when doing an reboot or shutdown. This fails on x86-64
> on some boxes.
> 
> Don't save/restore state in ACPI when entering S5.

That break also some i386 boxes.  That why I submitted another patch (do
I have to post it again?)

> 
> -Andi
> 

...

> @@ -127,6 +128,7 @@
>  		 * interrupts.
>  		 */
>  #ifdef CONFIG_X86
> +		/* AK: this looks rather broken in APIC mode */
>  		init_8259A(0);

I know.  In fact, this may be not sufficiant for PIC mode
as well.


-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fwd: [PATCH] Don't save state in ACPI on shutdown/reboot]
       [not found]     ` <20031111170035.GD29175-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
@ 2003-11-12 22:05       ` Dave Jones
       [not found]         ` <20031112220559.GR31026-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2003-11-12 22:05 UTC (permalink / raw)
  To: Ducrot Bruno; +Cc: Len Brown, ak-h9bWGtP8wOw, ACPI Developers

On Tue, Nov 11, 2003 at 06:00:35PM +0100, Ducrot Bruno wrote:

 > > The ACPI code in 2.4 currently saves the machine state as for a 
 > > suspend when doing an reboot or shutdown. This fails on x86-64
 > > on some boxes.
 > > 
 > > Don't save/restore state in ACPI when entering S5.
 > 
 > That break also some i386 boxes.  That why I submitted another patch (do
 > I have to post it again?)

Do you mean Andi's patch breaks i386 boxes, or this bug also appears
on i386 ? The former seems unlikely from the look of Andi's patch.

What does your patch do?

		Dave


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fwd: [PATCH] Don't save state in ACPI on shutdown/reboot]
       [not found]         ` <20031112220559.GR31026-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2003-11-12 23:07           ` Ducrot Bruno
  0 siblings, 0 replies; 4+ messages in thread
From: Ducrot Bruno @ 2003-11-12 23:07 UTC (permalink / raw)
  To: Dave Jones; +Cc: Len Brown, ak-h9bWGtP8wOw, ACPI Developers

On Wed, Nov 12, 2003 at 10:05:59PM +0000, Dave Jones wrote:
> On Tue, Nov 11, 2003 at 06:00:35PM +0100, Ducrot Bruno wrote:
> 
>  > > The ACPI code in 2.4 currently saves the machine state as for a 
>  > > suspend when doing an reboot or shutdown. This fails on x86-64
>  > > on some boxes.
>  > > 
>  > > Don't save/restore state in ACPI when entering S5.
>  > 
>  > That break also some i386 boxes.  That why I submitted another patch (do
>  > I have to post it again?)
> 
> Do you mean Andi's patch breaks i386 boxes, or this bug also appears
> on i386 ? The former seems unlikely from the look of Andi's patch.
> 

I wanted to point that some i386 boxes are broken as well, and
then a patch is needed.  And yes, when I read again my email, that
a bit confusing.

The patch I send actually implement the exact same
behaviour of 2.6 (minus S5 via the proc file, disabled on 2.6).

Also, it is much likely a design fix.  'power off' shall not
be dependant of CONFIG_ACPI_SLEEP (even though than one is always
yes for 2.4 if CONFIG_ACPI, at least on i386).

Cheers,

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-12 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 16:23 [Fwd: [PATCH] Don't save state in ACPI on shutdown/reboot] Len Brown
     [not found] ` <1068567824.24982.21.camel-D2Zvc0uNKG8@public.gmane.org>
2003-11-11 17:00   ` Ducrot Bruno
     [not found]     ` <20031111170035.GD29175-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2003-11-12 22:05       ` Dave Jones
     [not found]         ` <20031112220559.GR31026-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2003-11-12 23:07           ` Ducrot Bruno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox