All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 3/3] ACPI: fix 2.6.20 SMP boot regression
Date: Sat, 23 Jun 2007 11:04:48 -0400	[thread overview]
Message-ID: <11826110912721-git-send-email-len.brown@intel.com> (raw)
Message-ID: <d5a3d32a042126f65a008e0e5204ef92ad2ee55d.1182611002.git.len.brown@intel.com> (raw)
In-Reply-To: <11826110902815-git-send-email-len.brown@intel.com>
In-Reply-To: <e7c746ef098770f863ba294adac5b30d124ba469.1182611002.git.len.brown@intel.com>

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Always disable/enable interrupts in the acpi idle routine,
even in the error path.

This is required as the 2.6.20 change in git commit d331e739f5ad2aaa9...
"Fix interrupt race in idle callback" expects the idle handler
to enable interrupt before returning.

There was a case in acpi idle routine, in which interrupt was not being
enabled before return, which caused the system to hang at bootup, while
enabling C-states on an SMP system.

The signature of the hang was that "processor.nocst"
was required to enable boot.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/processor_idle.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index ee5759b..80ffc78 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -332,16 +332,18 @@ static void acpi_processor_idle(void)
 	int sleep_ticks = 0;
 	u32 t1, t2 = 0;
 
-	pr = processors[smp_processor_id()];
-	if (!pr)
-		return;
-
 	/*
 	 * Interrupts must be disabled during bus mastering calculations and
 	 * for C2/C3 transitions.
 	 */
 	local_irq_disable();
 
+	pr = processors[smp_processor_id()];
+	if (!pr) {
+		local_irq_enable();
+		return;
+	}
+
 	/*
 	 * Check whether we truly need to go idle, or should
 	 * reschedule:
-- 
1.5.2.1.255.gca6c0

  parent reply	other threads:[~2007-06-23 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-23 15:04 ACPI patches for 2.6.22-rc5 Len Brown
2007-06-23 15:04 ` [PATCH 1/3] ACPI: gracefully print null trip-point device Len Brown
2007-06-23 15:04   ` Len Brown
2007-06-23 15:04   ` [PATCH 2/3] ACPICA: fix error path in new external package objects as method arguments Len Brown
2007-06-23 15:04     ` Len Brown
2007-06-23 15:04   ` Len Brown [this message]
2007-06-23 15:04     ` [PATCH 3/3] ACPI: fix 2.6.20 SMP boot regression 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=11826110912721-git-send-email-len.brown@intel.com \
    --to=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=venkatesh.pallipadi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.