Re: 2.6.25-rc1 regression - suspend to ram

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: R. J. Wysocki <Rafal.Wysocki@...>
Cc: Lukas Hejtmanek <xhejtman@...>, <linux-kernel@...>, ACPI Devel Maling List <linux-acpi@...>, Len Brown <lenb@...>, <venkatesh.pallipadi@...>
Date: Monday, February 11, 2008 - 7:22 pm

On Tue, Feb 12, 2008 at 12:10:54AM +0100, R. J. Wysocki wrote:

Just sent this patch to fix a regression in acpi processor_idle.c on another
thread. Can you try the patch below and check whether that helps.

Thanks,
Venki


Earlier patch (bc71bec91f9875ef825d12104acf3bf4ca215fa4) broke
suspend resume on many laptops. The problem was reported by
Carlos R. Mafra and Calvin Walton, who bisected the issue to above patch.

The problem was because, C2 and C3 code were calling acpi_idle_enter_c1
directly, with C2 or C3 as state parameter, while suspend/resume was in
progress. The patch bc71bec started making use of that state information,
assuming that it would always be referring to C1 state. This caused the
problem with suspend-resume as we ended up using C2/C3 state indirectly.

Fix this by adding acpi_idle_suspend check in enter_c1.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: linux-2.6.25-rc1/drivers/acpi/processor_idle.c
===================================================================
--- linux-2.6.25-rc1.orig/drivers/acpi/processor_idle.c
+++ linux-2.6.25-rc1/drivers/acpi/processor_idle.c
@@ -1420,6 +1420,14 @@ static int acpi_idle_enter_c1(struct cpu
 		return 0;
 
 	local_irq_disable();
+
+	/* Do not access any ACPI IO ports in suspend path */
+	if (acpi_idle_suspend) {
+		acpi_safe_halt();
+		local_irq_enable();
+		return 0;
+	}
+
 	if (pr->flags.bm_check)
 		acpi_idle_update_bm_rld(pr, cx);
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-rc1 regression - suspend to ram, Lukas Hejtmanek, (Mon Feb 11, 6:58 pm)
Re: 2.6.25-rc1 regression - suspend to ram, Jesse Barnes, (Mon Feb 11, 7:16 pm)
Re: 2.6.25-rc1 regression - suspend to ram, R. J. Wysocki, (Mon Feb 11, 7:10 pm)
Re: 2.6.25-rc1 regression - suspend to ram, Venki Pallipadi, (Mon Feb 11, 7:22 pm)
Re: 2.6.25-rc1 regression - suspend to ram, Lukas Hejtmanek, (Tue Feb 12, 1:14 pm)
Re: 2.6.25-rc1 regression - suspend to ram, Jesse Barnes, (Mon Feb 11, 7:32 pm)