Skip to contentSkip to conversation

Don't save state in ACPI on shutdown/reboot]

PATCH In review Len Brown 3 participants 4 messages Nov 11, 2003 – Nov 12, 2003 3 messages not in the archive ACPI

lore
Share & tools
lore

Len Brown

author
#0 lore raw

PATCH 1/1 Don't save state in ACPI on shutdown/reboot]

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

drivers/acpi/system.c renamed from drivers/acpi/system.c-o +4 -2
diff -u linux-2.4.21/drivers/acpi/system.c-o linux-2.4.21/drivers/acpi/system.c
@@ -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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 1 line · Len Brown

Content-Description: Forwarded message - [PATCH] Don't save state in ACPI on shutdown/reboot

Quoted 5 lines

From: Andi Kleen <[email protected]>
To: marcelo.tosatti-3EexvZdKGZRWk0Htik3J/[email protected], [email protected]
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)

Quoted 8 lines
	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?)

Quoted 3 lines

-Andi

...

drivers/acpi/system.c line 132

Quoted 6 lines
drivers/acpi/system.c renamed from drivers/acpi/system.c-o +1 -0
@@ -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.

Signature · 11 lines
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/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 8 lines · Ducrot Bruno
Quoted 5 lines

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/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 6 lines · Dave Jones
Quoted 4 lines · Ducrot Bruno
Quoted 4 lines

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.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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,

Signature · 11 lines
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/