From: tip-bot for Weidong Han <weidong.han@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
suresh.b.siddha@intel.com, weidong.han@intel.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/apic] x86, intr-remap: fix x2apic/intr-remap resume
Date: Fri, 17 Apr 2009 14:49:38 GMT [thread overview]
Message-ID: <tip-752b065ceacda418a1f2c956353fd7b1d55020ea@git.kernel.org> (raw)
In-Reply-To: <1239957736-6161-6-git-send-email-weidong.han@intel.com>
Commit-ID: 752b065ceacda418a1f2c956353fd7b1d55020ea
Gitweb: http://git.kernel.org/tip/752b065ceacda418a1f2c956353fd7b1d55020ea
Author: Weidong Han <weidong.han@intel.com>
AuthorDate: Fri, 17 Apr 2009 16:42:16 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 17 Apr 2009 16:23:46 +0200
x86, intr-remap: fix x2apic/intr-remap resume
Interrupt remapping was decoupled from x2apic. Shouldn't check
x2apic before resume interrupt remapping. Otherwise, interrupt
remapping won't be resumed when x2apic is not enabled.
[ Impact: fix potential intr-remap resume hang on !x2apic ]
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Cc: iommu@lists.linux-foundation.org
Cc: dwmw2@infradead.org
Cc: allen.m.kay@intel.com
Cc: fenghua.yu@intel.com
LKML-Reference: <1239957736-6161-6-git-send-email-weidong.han@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/apic/apic.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 0cf1eea..7b41a32 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2032,7 +2032,7 @@ static int lapic_resume(struct sys_device *dev)
return 0;
local_irq_save(flags);
- if (x2apic) {
+ if (intr_remapping_enabled) {
ioapic_entries = alloc_ioapic_entries();
if (!ioapic_entries) {
WARN(1, "Alloc ioapic_entries in lapic resume failed.");
@@ -2048,8 +2048,10 @@ static int lapic_resume(struct sys_device *dev)
mask_IO_APIC_setup(ioapic_entries);
mask_8259A();
- enable_x2apic();
}
+
+ if (x2apic)
+ enable_x2apic();
#else
if (!apic_pm_state.active)
return 0;
@@ -2097,10 +2099,12 @@ static int lapic_resume(struct sys_device *dev)
apic_read(APIC_ESR);
#ifdef CONFIG_INTR_REMAP
- if (intr_remapping_enabled)
- reenable_intr_remapping(EIM_32BIT_APIC_ID);
+ if (intr_remapping_enabled) {
+ if (x2apic)
+ reenable_intr_remapping(EIM_32BIT_APIC_ID);
+ else
+ reenable_intr_remapping(EIM_8BIT_APIC_ID);
- if (x2apic) {
unmask_8259A();
restore_IO_APIC_setup(ioapic_entries);
free_ioapic_entries(ioapic_entries);
@@ -2109,7 +2113,6 @@ static int lapic_resume(struct sys_device *dev)
local_irq_restore(flags);
-
return 0;
}
next prev parent reply other threads:[~2009-04-17 14:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 8:42 [PATCH 0/5] fix bugs of x2apic/intr-remap Weidong Han
2009-04-17 8:42 ` [PATCH 1/5] docs: add nox2apic back to kernel-parameters.txt Weidong Han
2009-04-17 13:51 ` Ingo Molnar
2009-04-17 14:48 ` [tip:x86/apic] docs, x86: " tip-bot for Weidong Han
2009-04-18 7:31 ` [tip:x86/urgent] " tip-bot for Weidong Han
2009-04-19 8:24 ` [tip:x86/apic] " tip-bot for Weidong Han
2009-04-17 8:42 ` [PATCH 2/5] x86,intr-remap: fix ack for interrupt remapping Weidong Han
2009-04-17 14:49 ` [tip:x86/apic] x86, intr-remap: " tip-bot for Weidong Han
2009-04-19 8:25 ` tip-bot for Weidong Han
2009-04-17 8:42 ` [PATCH 3/5] x86, intr-remap: enable interrupt remapping early Weidong Han
2009-04-17 14:13 ` Ingo Molnar
2009-04-17 23:42 ` Suresh Siddha
2009-04-18 7:24 ` Ingo Molnar
2009-04-17 14:49 ` [tip:x86/apic] " tip-bot for Weidong Han
2009-04-19 8:25 ` tip-bot for Weidong Han
2009-04-17 8:42 ` [PATCH 4/5] x86, intr-remap: add option to disable interrupt remapping Weidong Han
2009-04-17 14:49 ` [tip:x86/apic] " tip-bot for Weidong Han
2009-04-19 8:25 ` tip-bot for Weidong Han
2009-04-17 8:42 ` [PATCH 5/5] x86: fix x2apic/intr-remap resume Weidong Han
2009-04-17 14:15 ` Ingo Molnar
2009-04-17 14:49 ` tip-bot for Weidong Han [this message]
2009-04-19 8:25 ` [tip:x86/apic] x86, intr-remap: " tip-bot for Weidong Han
2009-04-17 14:30 ` [PATCH 0/5] fix bugs of x2apic/intr-remap Ingo Molnar
2009-04-17 14:41 ` Ingo Molnar
2009-04-18 3:07 ` Han, Weidong
2009-04-18 6:41 ` Ingo Molnar
2009-04-19 6:32 ` David Woodhouse
2009-04-19 8:22 ` Ingo Molnar
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-752b065ceacda418a1f2c956353fd7b1d55020ea@git.kernel.org \
--to=weidong.han@intel.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=suresh.b.siddha@intel.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 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.