aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/io_apic.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2011-05-24 13:45:31 -0400
committerIngo Molnar <mingo@elte.hu>2011-05-24 14:32:41 -0400
commit2f344d2e51888785be551a756d8a8aa58269aaa8 (patch)
treee594aed350730f13874967b2765d21a7f515ea18 /arch/x86/kernel/apic/io_apic.c
parent1b4ac2a935aaf194241a2f4165d6407ba9650e1a (diff)
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>
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r--arch/x86/kernel/apic/io_apic.c4
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 9488dcff7aec..e5293394b548 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)
676 int apic, pin; 676 int apic, pin;
677 677
678 for (apic = 0; apic < nr_ioapics; apic++) { 678 for (apic = 0; apic < nr_ioapics; apic++) {
679 if (ioapics[apic].saved_registers) 679 if (!ioapics[apic].saved_registers)
680 continue; 680 continue;
681 681
682 for (pin = 0; pin < ioapics[apic].nr_registers; pin++) { 682 for (pin = 0; pin < ioapics[apic].nr_registers; pin++) {
@@ -699,7 +699,7 @@ int restore_ioapic_entries(void)
699 int apic, pin; 699 int apic, pin;
700 700
701 for (apic = 0; apic < nr_ioapics; apic++) { 701 for (apic = 0; apic < nr_ioapics; apic++) {
702 if (ioapics[apic].saved_registers) 702 if (!ioapics[apic].saved_registers)
703 continue; 703 continue;
704 704
705 for (pin = 0; pin < ioapics[apic].nr_registers; pin++) 705 for (pin = 0; pin < ioapics[apic].nr_registers; pin++)