LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
To: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: "Carlos R. Mafra" <crmafra@gmail.com>,
	Calvin Walton <calvin.walton@gmail.com>,
	linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	rjw@sisk.pl
Subject: Re: [2.6.25-rc1 regression] Suspend to RAM (bisected)
Date: Mon, 11 Feb 2008 15:20:27 -0800	[thread overview]
Message-ID: <20080211232027.GA8206@linux-os.sc.intel.com> (raw)
In-Reply-To: <20080211200650.GA8287@linux-os.sc.intel.com>

On Mon, Feb 11, 2008 at 12:06:50PM -0800, Venki Pallipadi wrote:
> On Mon, Feb 11, 2008 at 05:37:04PM -0200, Carlos R. Mafra wrote:
> > Pallipadi, Venkatesh wrote:
> > > 
> > > Can you send me the output of acpidump and full dmesg to me. Looks like
> > > it is a platform issue due to which we cannot use C1 mwait idle during
> > > suspend resume, something similar to issue we had with using C2/C3 state
> > > during idle.
> > 
> > Full dmesg and acpidump outputs are attached.
> 
> Above acpidump doesnt have all info, as it is loading some SSDT at run time.
> Can you get the output of
> 
> # acpidump --addr 0x7F6D8709 --length 0x000004B7
> # acpidump --addr 0x7F6D8BC0 --length 0x00000092
> 

Thanks for sending the dumps Carlos.

The patch below (on top of rc1) should fix the problem. Can you please
check it.

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);
 

  reply	other threads:[~2008-02-11 23:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11  5:25 Carlos R. Mafra
2008-02-11  5:35 ` Arjan van de Ven
2008-02-11  6:08   ` Carlos R. Mafra
2008-02-11  5:47 ` Calvin Walton
2008-02-11 18:22   ` Pallipadi, Venkatesh
2008-02-11 19:37     ` Carlos R. Mafra
2008-02-11 20:06       ` Venki Pallipadi
2008-02-11 23:20         ` Venki Pallipadi [this message]
2008-02-12  0:08           ` Carlos R. Mafra
2008-02-14  5:00           ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080211232027.GA8206@linux-os.sc.intel.com \
    --to=venkatesh.pallipadi@intel.com \
    --cc=calvin.walton@gmail.com \
    --cc=crmafra@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    --subject='Re: [2.6.25-rc1 regression] Suspend to RAM (bisected)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).