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,
weidong.han@intel.com, suresh.b.siddha@intel.com,
tglx@linutronix.de, David.Woodhouse@intel.com, mingo@elte.hu
Subject: [tip:x86/apic] x86, intr-remap: fix ack for interrupt remapping
Date: Sun, 19 Apr 2009 08:25:05 GMT [thread overview]
Message-ID: <tip-5d0ae2db6deac4f15dac4f42f23bc56448fc8d4d@git.kernel.org> (raw)
In-Reply-To: <1239957736-6161-3-git-send-email-weidong.han@intel.com>
Commit-ID: 5d0ae2db6deac4f15dac4f42f23bc56448fc8d4d
Gitweb: http://git.kernel.org/tip/5d0ae2db6deac4f15dac4f42f23bc56448fc8d4d
Author: Weidong Han <weidong.han@intel.com>
AuthorDate: Fri, 17 Apr 2009 16:42:13 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 19 Apr 2009 10:21:33 +0200
x86, intr-remap: fix ack for interrupt remapping
Shouldn't call ack_apic_edge() in ir_ack_apic_edge(), because
ack_apic_edge() does more than just ack: it also does irq migration
in the non-interrupt-remapping case. But there is no such need for
interrupt-remapping case, as irq migration is done in the process
context.
Similarly, ir_ack_apic_level() shouldn't call ack_apic_level, and
instead should do the local cpu's EOI + directed EOI to the io-apic.
ack_x2APIC_irq() is not neccessary, because ack_APIC_irq() will use MSR
write for x2apic, and uncached write for non-x2apic.
[ Impact: simplify/standardize intr-remap IRQ acking, fix on !x2apic ]
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: iommu@lists.linux-foundation.org
Cc: allen.m.kay@intel.com
Cc: fenghua.yu@intel.com
LKML-Reference: <1239957736-6161-3-git-send-email-weidong.han@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/apic.h | 8 --------
arch/x86/kernel/apic/io_apic.c | 32 +++++---------------------------
2 files changed, 5 insertions(+), 35 deletions(-)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 2bd5a46..d4cb7e5 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -204,14 +204,6 @@ static inline int x2apic_enabled(void)
extern int get_physical_broadcast(void);
-#ifdef CONFIG_X86_X2APIC
-static inline void ack_x2APIC_irq(void)
-{
- /* Docs say use 0 for future compatibility */
- native_apic_msr_write(APIC_EOI, 0);
-}
-#endif
-
extern void apic_disable(void);
extern int lapic_get_maxlvt(void);
extern void clear_local_APIC(void);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8499000..ea22a86 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2552,20 +2552,6 @@ eoi_ioapic_irq(struct irq_desc *desc)
spin_unlock_irqrestore(&ioapic_lock, flags);
}
-#ifdef CONFIG_X86_X2APIC
-static void ack_x2apic_level(unsigned int irq)
-{
- struct irq_desc *desc = irq_to_desc(irq);
- ack_x2APIC_irq();
- eoi_ioapic_irq(desc);
-}
-
-static void ack_x2apic_edge(unsigned int irq)
-{
- ack_x2APIC_irq();
-}
-#endif
-
static void ack_apic_edge(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
@@ -2629,9 +2615,6 @@ static void ack_apic_level(unsigned int irq)
*/
ack_APIC_irq();
- if (irq_remapped(irq))
- eoi_ioapic_irq(desc);
-
/* Now we can move and renable the irq */
if (unlikely(do_unmask_irq)) {
/* Only migrate the irq if the ack has been received.
@@ -2680,20 +2663,15 @@ static void ack_apic_level(unsigned int irq)
#ifdef CONFIG_INTR_REMAP
static void ir_ack_apic_edge(unsigned int irq)
{
-#ifdef CONFIG_X86_X2APIC
- if (x2apic_enabled())
- return ack_x2apic_edge(irq);
-#endif
- return ack_apic_edge(irq);
+ ack_APIC_irq();
}
static void ir_ack_apic_level(unsigned int irq)
{
-#ifdef CONFIG_X86_X2APIC
- if (x2apic_enabled())
- return ack_x2apic_level(irq);
-#endif
- return ack_apic_level(irq);
+ struct irq_desc *desc = irq_to_desc(irq);
+
+ ack_APIC_irq();
+ eoi_ioapic_irq(desc);
}
#endif /* CONFIG_INTR_REMAP */
next prev parent reply other threads:[~2009-04-19 8:26 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 [this message]
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:x86/apic] x86, intr-remap: " tip-bot for Weidong Han
2009-04-19 8:25 ` 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-5d0ae2db6deac4f15dac4f42f23bc56448fc8d4d@git.kernel.org \
--to=weidong.han@intel.com \
--cc=David.Woodhouse@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.