diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-05-28 03:54:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-01 20:48:59 -0400 |
commit | 3d58829b0510244596079c1d2f1762c53aef2e97 (patch) | |
tree | ab80e980013ca517351abb3ee601d7d5ae66f124 /arch/x86/kernel/apic/apic.c | |
parent | 58f892e022e88438183c48661dcdc6a2997dab99 (diff) |
x86, apic: Restore irqs on fail paths
lapic_resume forgets to restore interrupts on fail paths.
Fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <1243497289-18591-1-git-send-email-jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index b0fd26442c41..e82488d3f0ba 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -2027,7 +2027,7 @@ static int lapic_resume(struct sys_device *dev) | |||
2027 | unsigned int l, h; | 2027 | unsigned int l, h; |
2028 | unsigned long flags; | 2028 | unsigned long flags; |
2029 | int maxlvt; | 2029 | int maxlvt; |
2030 | int ret; | 2030 | int ret = 0; |
2031 | struct IO_APIC_route_entry **ioapic_entries = NULL; | 2031 | struct IO_APIC_route_entry **ioapic_entries = NULL; |
2032 | 2032 | ||
2033 | if (!apic_pm_state.active) | 2033 | if (!apic_pm_state.active) |
@@ -2038,14 +2038,15 @@ static int lapic_resume(struct sys_device *dev) | |||
2038 | ioapic_entries = alloc_ioapic_entries(); | 2038 | ioapic_entries = alloc_ioapic_entries(); |
2039 | if (!ioapic_entries) { | 2039 | if (!ioapic_entries) { |
2040 | WARN(1, "Alloc ioapic_entries in lapic resume failed."); | 2040 | WARN(1, "Alloc ioapic_entries in lapic resume failed."); |
2041 | return -ENOMEM; | 2041 | ret = -ENOMEM; |
2042 | goto restore; | ||
2042 | } | 2043 | } |
2043 | 2044 | ||
2044 | ret = save_IO_APIC_setup(ioapic_entries); | 2045 | ret = save_IO_APIC_setup(ioapic_entries); |
2045 | if (ret) { | 2046 | if (ret) { |
2046 | WARN(1, "Saving IO-APIC state failed: %d\n", ret); | 2047 | WARN(1, "Saving IO-APIC state failed: %d\n", ret); |
2047 | free_ioapic_entries(ioapic_entries); | 2048 | free_ioapic_entries(ioapic_entries); |
2048 | return ret; | 2049 | goto restore; |
2049 | } | 2050 | } |
2050 | 2051 | ||
2051 | mask_IO_APIC_setup(ioapic_entries); | 2052 | mask_IO_APIC_setup(ioapic_entries); |
@@ -2097,10 +2098,10 @@ static int lapic_resume(struct sys_device *dev) | |||
2097 | restore_IO_APIC_setup(ioapic_entries); | 2098 | restore_IO_APIC_setup(ioapic_entries); |
2098 | free_ioapic_entries(ioapic_entries); | 2099 | free_ioapic_entries(ioapic_entries); |
2099 | } | 2100 | } |
2100 | 2101 | restore: | |
2101 | local_irq_restore(flags); | 2102 | local_irq_restore(flags); |
2102 | 2103 | ||
2103 | return 0; | 2104 | return ret; |
2104 | } | 2105 | } |
2105 | 2106 | ||
2106 | /* | 2107 | /* |