linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Octavio Alvarez <alvarezp@alvarezp.com>
Cc: Bob Moore <robert.moore@intel.com>,
	680707@bugs.debian.org, linux-acpi@vger.kernel.org
Subject: Re: [3.4-rc5 -> 3.4-rc6 regression] Asus P5NSLI: lockup on resume from suspend
Date: Sun, 8 Jul 2012 04:04:32 -0500	[thread overview]
Message-ID: <20120708090432.GF4625@burratino> (raw)
In-Reply-To: <op.wg30yabp6g6bxc@localhost.localdomain>

Octavio Alvarez wrote:

> The problem is a full system lock-up on resume.
[...]
> I bisected the problem as requested by Alan Stern, and tracked it
> down to the following commit:
>
> commit 2feec47d4c5f80b05f1650f5a24865718978eea4
[...]
>     ACPICA: ACPI 5: Support for new FADT SleepStatus, SleepControl registers

Parsing that commit:

 * new ACPICA-internal functions:
   acpi_hw_execute_SST, acpi_hw_extended_sleep, acpi_hw_legacy_sleep,
   acpi_hw_extended_wake_prep, acpi_hw_extended_wake,
   acpi_hw_legacy_wake_prep, acpi_hw_legacy_wake.

 * Various functions moved to hwxfsleep.c.

 * acpi_enter_sleep_state_s4bios was moved to before
   acpi_enter_sleep_state and acpi_enter_sleep_state_prep for no
   apparent reason.  Unchanged.

 * acpi_enter_sleep_state_prep: factored out execution of _SST
   (which sets System Status) into a helper.  No functional change.

 * acpi_enter_sleep_state: in the !(ACPI 5) case, just checks that
   the sleep types are not out of bounds and calls
   acpi_hw_legacy_sleep().  Functional change:

   - disable bus master arbitration when entering sleep states other
     than S5

   No other functional change.  _GTS ("Going To Sleep" hook) call
   factored out into a helper.

 * acpi_leave_sleep_state_prep: in the !(ACPI 5) case, just calls
   acpi_hw_legacy_wake_prep().  _BFS ("Back From Sleep" method) call
   factored out into a helper.  No functional change.

 * acpi_leave_sleep_state: in the !(ACPI 5) case, just calls
   acpi_hw_legacy_wake().  _SST calls factored out.  _WAK call
   factored out.  Functional change:

   - enable bus master arbitaration

   No other functional change.

So presumably it's the new writes to the ACPI_BITREG_ARB_DISABLE
register that cause trouble.  The patch below tests that guess.

Now for a complaint.  This would have been a lot easier if cleanups
that do not change behavior were split into separate commits --- one
commit per change.  That makes it easy to verify that each patch
correctly does what it promises with no unintended side effects.

Though I understand that hacking ACPICA is hard, and there is probably
a lot to the story of its development I don't know.

Thanks,
Jonathan

diff --git i/drivers/acpi/acpica/hwsleep.c w/drivers/acpi/acpica/hwsleep.c
index 0ed85cac3231..615996a36bed 100644
--- i/drivers/acpi/acpica/hwsleep.c
+++ w/drivers/acpi/acpica/hwsleep.c
@@ -95,18 +95,6 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags)
 		return_ACPI_STATUS(status);
 	}
 
-	if (sleep_state != ACPI_STATE_S5) {
-		/*
-		 * Disable BM arbitration. This feature is contained within an
-		 * optional register (PM2 Control), so ignore a BAD_ADDRESS
-		 * exception.
-		 */
-		status = acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1);
-		if (ACPI_FAILURE(status) && (status != AE_BAD_ADDRESS)) {
-			return_ACPI_STATUS(status);
-		}
-	}
-
 	/*
 	 * 1) Disable/Clear all GPEs
 	 * 2) Enable all wakeup GPEs
@@ -364,16 +352,6 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags)
 				    [ACPI_EVENT_POWER_BUTTON].
 				    status_register_id, ACPI_CLEAR_STATUS);
 
-	/*
-	 * Enable BM arbitration. This feature is contained within an
-	 * optional register (PM2 Control), so ignore a BAD_ADDRESS
-	 * exception.
-	 */
-	status = acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0);
-	if (ACPI_FAILURE(status) && (status != AE_BAD_ADDRESS)) {
-		return_ACPI_STATUS(status);
-	}
-
 	acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING);
 	return_ACPI_STATUS(status);
 }

  parent reply	other threads:[~2012-07-08  9:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <op.wg3en6ij6g6bxc@localhost.localdomain>
     [not found] ` <Pine.LNX.4.44L0.1207072208270.508-100000@netrider.rowland.org>
     [not found]   ` <20120708025730.GE2961@burratino>
2012-07-08  4:19     ` [3.4-rc5 -> 3.4-rc6 regression] Asus P5NSLI: lockup on resume from suspend Octavio Alvarez
2012-07-08  4:30       ` Jonathan Nieder
2012-07-08  6:39         ` Bug#680707: " Octavio Alvarez
2012-07-08  7:37       ` Jonathan Nieder
2012-07-08  9:04       ` Jonathan Nieder [this message]
2012-07-08  9:46         ` Bug#680707: " Octavio Alvarez
2012-07-08 19:04           ` [PATCH] ACPI: Leave Bus Master Arbitration enabled for suspend/resume Jonathan Nieder
2012-07-08 19:32             ` Jonathan Nieder
2012-07-08 19:43               ` Rafael J. Wysocki
2012-07-08 19:45                 ` [PATCH v2] " Jonathan Nieder
2012-07-08 20:08                   ` Rafael J. Wysocki
2012-07-08 20:33                     ` Moore, Robert
2012-07-08 20:48                       ` Rafael J. Wysocki
2012-07-08 20:43                     ` Octavio Alvarez
2012-07-08 20:53                       ` Rafael J. Wysocki

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=20120708090432.GF4625@burratino \
    --to=jrnieder@gmail.com \
    --cc=680707@bugs.debian.org \
    --cc=alvarezp@alvarezp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=robert.moore@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).