All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Suresh Siddha <suresh.b.siddha@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	torvalds@linux-foundation.org, daniel.blueman@gmail.com,
	suresh.b.siddha@intel.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/urgent] x86, ioapic: Restore ioapic entries during resume properly
Date: Tue, 24 May 2011 19:25:10 GMT	[thread overview]
Message-ID: <tip-2f344d2e51888785be551a756d8a8aa58269aaa8@git.kernel.org> (raw)
In-Reply-To: <1306259131.7171.7.camel@sbsiddha-MOBL3.sc.intel.com>

Commit-ID:  2f344d2e51888785be551a756d8a8aa58269aaa8
Gitweb:     http://git.kernel.org/tip/2f344d2e51888785be551a756d8a8aa58269aaa8
Author:     Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Tue, 24 May 2011 10:45:31 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 24 May 2011 20:32:41 +0200

x86, ioapic: Restore ioapic entries during resume properly

In mask/restore_ioapic_entries() we should be restoring ioapic
entries when ioapics[apic].saved_registers is not NULL.

Fix the typo and address the resume hang regression reported by
Linus.

This was not found sooner because the systems where these
changes were tested on kept the IO-APIC entries intact over
resume.

Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Daniel J Blueman <daniel.blueman@gmail.com>
Link: http://lkml.kernel.org/r/1306259131.7171.7.camel@sbsiddha-MOBL3.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/apic/io_apic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9488dcf..e529339 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -676,7 +676,7 @@ void mask_ioapic_entries(void)
 	int apic, pin;
 
 	for (apic = 0; apic < nr_ioapics; apic++) {
-		if (ioapics[apic].saved_registers)
+		if (!ioapics[apic].saved_registers)
 			continue;
 
 		for (pin = 0; pin < ioapics[apic].nr_registers; pin++) {
@@ -699,7 +699,7 @@ int restore_ioapic_entries(void)
 	int apic, pin;
 
 	for (apic = 0; apic < nr_ioapics; apic++) {
-		if (ioapics[apic].saved_registers)
+		if (!ioapics[apic].saved_registers)
 			continue;
 
 		for (pin = 0; pin < ioapics[apic].nr_registers; pin++)

      parent reply	other threads:[~2011-05-24 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 19:30 [GIT PULL] more x86/apic changes for v2.6.40 Ingo Molnar
2011-05-24  5:58 ` Linus Torvalds
2011-05-24  6:03   ` Ingo Molnar
2011-05-24  6:09     ` Linus Torvalds
2011-05-24  6:15     ` Ingo Molnar
2011-05-24 17:45       ` Suresh Siddha
2011-05-24 18:34         ` Linus Torvalds
2011-05-24 18:37           ` Ingo Molnar
2011-05-24 18:36         ` [conditional GIT PULL] x86 fixes Ingo Molnar
2011-05-24 18:50           ` Linus Torvalds
2011-05-24 19:25         ` tip-bot for Suresh Siddha [this message]

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=tip-2f344d2e51888785be551a756d8a8aa58269aaa8@git.kernel.org \
    --to=suresh.b.siddha@intel.com \
    --cc=daniel.blueman@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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.