Skip to content

Commit

Permalink
x86, ioapic: Restore ioapic entries during resume properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed May 24, 2011
1 parent 1b4ac2a commit 2f344d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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++)
Expand Down

0 comments on commit 2f344d2

Please sign in to comment.