From: tip-bot for Jiri Slaby <jirislaby@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
gorcunov@openvz.org, jirislaby@gmail.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:irq/numa] x86, apic: Restore irqs on fail paths
Date: Tue, 2 Jun 2009 00:51:30 GMT [thread overview]
Message-ID: <tip-3d58829b0510244596079c1d2f1762c53aef2e97@git.kernel.org> (raw)
In-Reply-To: <1243497289-18591-1-git-send-email-jirislaby@gmail.com>
Commit-ID: 3d58829b0510244596079c1d2f1762c53aef2e97
Gitweb: http://git.kernel.org/tip/3d58829b0510244596079c1d2f1762c53aef2e97
Author: Jiri Slaby <jirislaby@gmail.com>
AuthorDate: Thu, 28 May 2009 09:54:47 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 2 Jun 2009 02:48:59 +0200
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>
---
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 b0fd264..e82488d 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)
unsigned int l, h;
unsigned long flags;
int maxlvt;
- int ret;
+ int ret = 0;
struct IO_APIC_route_entry **ioapic_entries = NULL;
if (!apic_pm_state.active)
@@ -2038,14 +2038,15 @@ static int lapic_resume(struct sys_device *dev)
ioapic_entries = alloc_ioapic_entries();
if (!ioapic_entries) {
WARN(1, "Alloc ioapic_entries in lapic resume failed.");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto restore;
}
ret = save_IO_APIC_setup(ioapic_entries);
if (ret) {
WARN(1, "Saving IO-APIC state failed: %d\n", ret);
free_ioapic_entries(ioapic_entries);
- return ret;
+ goto restore;
}
mask_IO_APIC_setup(ioapic_entries);
@@ -2097,10 +2098,10 @@ static int lapic_resume(struct sys_device *dev)
restore_IO_APIC_setup(ioapic_entries);
free_ioapic_entries(ioapic_entries);
}
-
+restore:
local_irq_restore(flags);
- return 0;
+ return ret;
}
/*
prev parent reply other threads:[~2009-06-02 0:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 7:54 [PATCH 1/3] x86: apic, restore irqs on fail paths Jiri Slaby
2009-05-28 7:54 ` [PATCH 2/3] x86: amd_iommu, fix lock imbalance Jiri Slaby
2009-06-03 8:36 ` Joerg Roedel
2009-05-28 7:54 ` [PATCH 3/3] trace: events_filter, fix lock imbalances Jiri Slaby
2009-05-29 1:14 ` Li Zefan
2009-05-29 15:57 ` Jiri Slaby
2009-05-29 17:21 ` [PATCH 1/3] x86: apic, restore irqs on fail paths Cyrill Gorcunov
2009-06-02 0:51 ` tip-bot for Jiri Slaby [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-3d58829b0510244596079c1d2f1762c53aef2e97@git.kernel.org \
--to=jirislaby@gmail.com \
--cc=gorcunov@openvz.org \
--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 \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox