login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
March
»
30
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Eric W. Biederman
Subject:
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
Date: Friday, March 30, 2007 - 12:04 pm
Mitch Williams <mitch.a.williams@intel.com> writes:
quoted text
> This patch fixes a kernel bug which is triggered when using the > irqbalance daemon with MSI-X hardware. > > Because both MSI-X interrupt messages and MSI-X table writes are posted, > it's possible for them to cross while in-flight. This results in > interrupts being received long after the kernel thinks they're disabled, > and in interrupts being sent to stale vectors after rebalancing. > > This patch performs a read flush after writes to the MSI-X table for > mask and unmask operations. Since the SMP affinity is set while > the interrupt is masked, and since it's unmasked immediately after, > no additional flushes are required in the various affinity setting > routines. > > This patch has been validated with (unreleased) network hardware which > uses MSI-X. > > Revised with input from Eric Biederman.
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
quoted text
> > Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> > > diff -urpN -X dontdiff linux-2.6.21-rc5-clean/drivers/pci/msi.c > linux-2.6.21-rc5/drivers/pci/msi.c > --- linux-2.6.21-rc5-clean/drivers/pci/msi.c 2007-03-28 10:05:24.000000000 -0700 > +++ linux-2.6.21-rc5/drivers/pci/msi.c 2007-03-28 09:21:34.000000000 -0700 > @@ -68,6 +68,29 @@ static void msix_set_enable(struct pci_d > } > } > > +static void msix_flush_writes(unsigned int irq) > +{ > + struct msi_desc *entry; > + > + entry = get_irq_msi(irq); > + BUG_ON(!entry || !entry->dev); > + switch (entry->msi_attrib.type) { > + case PCI_CAP_ID_MSI: > + /* nothing to do */ > + break; > + case PCI_CAP_ID_MSIX: > + { > + int offset = entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE + > + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET; > + readl(entry->mask_base + offset); > + break; > + } > + default: > + BUG(); > + break; > + } > +} > + > static void msi_set_mask_bit(unsigned int irq, int flag) > { > struct msi_desc *entry; > @@ -186,11 +209,13 @@ void write_msi_msg(unsigned int irq, str > void mask_msi_irq(unsigned int irq) > { > msi_set_mask_bit(irq, 1); > + msix_flush_writes(irq); > } > > void unmask_msi_irq(unsigned int irq) > { > msi_set_mask_bit(irq, 0); > + msix_flush_writes(irq); > } > > static int msi_free_irq(struct pci_dev* dev, int irq);
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Mitch Williams
, (Fri Mar 30, 11:54 am)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Eric W. Biederman
, (Fri Mar 30, 12:04 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Andrew Morton
, (Fri Mar 30, 12:47 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Greg KH
, (Fri Mar 30, 12:49 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Andrew Morton
, (Fri Mar 30, 1:00 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Greg KH
, (Fri Mar 30, 1:10 pm)
RE: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Williams, Mitch A
, (Fri Mar 30, 1:21 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Greg KH
, (Fri Mar 30, 1:24 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Eric W. Biederman
, (Fri Mar 30, 1:26 pm)
RE: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Williams, Mitch A
, (Fri Mar 30, 1:49 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Chuck Ebbert
, (Fri Mar 30, 1:56 pm)
Re: [PATCH 2.6.21-rc5] Flush MSI-X table writes (rev 3)
, Eric W. Biederman
, (Fri Mar 30, 2:05 pm)
[PATCH] msi: Immediately mask and unmask msi-x irqs.
, Eric W. Biederman
, (Tue Apr 3, 12:41 am)
RE: [PATCH] msi: Immediately mask and unmask msi-x irqs.
, Williams, Mitch A
, (Tue Apr 3, 10:24 am)
Re: [PATCH] msi: Immediately mask and unmask msi-x irqs.
, Siddha, Suresh B
, (Tue Apr 3, 11:52 am)
Re: [PATCH] msi: Immediately mask and unmask msi-x irqs.
, Eric W. Biederman
, (Tue Apr 3, 12:39 pm)
Re: [PATCH] msi: Immediately mask and unmask msi-x irqs.
, Siddha, Suresh B
, (Tue Apr 3, 1:57 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Andi Kleen
Re: - romsignature-checksum-cleanup-2.patch removed from -mm tree
Axel Lin
[PATCH] tc6393xb: fix wrong goto labels for error handling
Matthew Wilcox
Re: 2.6.22-rc3-mm1
git
:
Johannes Schindelin
Re: [PATCH 05/21] Make parse_tag_buffer_internal() handle item == NULL
Johannes Sixt
Re: [PATCH] Fix handle leak in builtin-pack-objects
Linus Torvalds
Re: [PATCH, take 1] Linear-time/space rename logic (exact renames only)
Alex Riesen
Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
Nicolas Pitre
Re: [PATCH 2/2] Implement a simple delta_base cache
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB (8018): Add em2860 chip ID
Linux Kernel Mailing List
PCI: fix kernel oops on bridge removal
Linux Kernel Mailing List
rtl8187: use DMA-aware buffers with usb_control_msg
Linux Kernel Mailing List
Blackfin: use KERN_ALERT in all kgdb_test output
Linux Kernel Mailing List
MIPS: Bonito64: Make Loongson independent from Bonito64 code.
linux-netdev
:
Richard Cochran
Re: [PATCH v3 3/3] ptp: Added a clock that uses the eTSEC found on the MPC85xx.
David Miller
Re: [RFC] bridge: STP timer management range checking
Herbert Xu
Re: [RFC PATCH 00/17] virtual-bus
Lennert Buytenhek
Re: [PATCH 3/6] [NET] dsa: add support for original DSA tagging format
Herbert Xu
Re: [2/2] igb: Replace LRO with GRO
freebsd-current
:
Boris Samorodov
Re: twa + dump = sbwait
Andrey
Re: RELENG_7 and HEAD: bge causes system hang
韓家標 Bill Hacker
Re: ZFS honesty
samira
sata atapi on ich9r
JoaoBR
Re: I like my rc.d boot messages :(
Colocation donated by:
Syndicate