From: "Jan Beulich" Subject: [PATCH] x86: kill msix_flush_writes() Date: Thu, 21 Jan 2010 14:47:27 +0000 Message-ID: <4B58770F020000780002B52F@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartFCD6E2EF.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartFCD6E2EF.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The (only) two callers of it don't need it, as the MSI-X case of msi_set_mask_bit() already does the necessary readl(). Signed-off-by: Jan Beulich --- 2010-01-06.orig/xen/arch/x86/msi.c 2009-11-30 10:02:39.000000000 = +0100 +++ 2010-01-06/xen/arch/x86/msi.c 2010-01-21 13:25:14.000000000 = +0100 @@ -327,27 +327,6 @@ static void msix_set_enable(struct pci_d } } =20 -static void msix_flush_writes(unsigned int irq) -{ - struct msi_desc *entry =3D irq_desc[irq].msi_desc; - - 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 =3D PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET; - readl(entry->mask_base + offset); - break; - } - default: - BUG(); - break; - } -} - int msi_maskable_irq(const struct msi_desc *entry) { BUG_ON(!entry); @@ -394,13 +373,11 @@ static void msi_set_mask_bit(unsigned in void mask_msi_irq(unsigned int irq) { msi_set_mask_bit(irq, 1); - msix_flush_writes(irq); } =20 void unmask_msi_irq(unsigned int irq) { msi_set_mask_bit(irq, 0); - msix_flush_writes(irq); } =20 static struct msi_desc* alloc_msi_entry(void) --=__PartFCD6E2EF.0__= Content-Type: text/plain; name="x86-kill-msix_flush_writes.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-kill-msix_flush_writes.patch" The (only) two callers of it don't need it, as the MSI-X case of=0Amsi_set_= mask_bit() already does the necessary readl().=0A=0ASigned-off-by: Jan = Beulich =0A=0A--- 2010-01-06.orig/xen/arch/x86/msi.c = 2009-11-30 10:02:39.000000000 +0100=0A+++ 2010-01-06/xen/arch/x86/msi.c = 2010-01-21 13:25:14.000000000 +0100=0A@@ -327,27 +327,6 @@ static void = msix_set_enable(struct pci_d=0A }=0A }=0A =0A-static void msix_flush_wr= ites(unsigned int irq)=0A-{=0A- struct msi_desc *entry =3D irq_desc[irq]= .msi_desc;=0A-=0A- BUG_ON(!entry || !entry->dev);=0A- switch = (entry->msi_attrib.type) {=0A- case PCI_CAP_ID_MSI:=0A- /* = nothing to do */=0A- break;=0A- case PCI_CAP_ID_MSIX:=0A- = {=0A- int offset =3D PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET;=0A- = readl(entry->mask_base + offset);=0A- break;=0A- }=0A- = default:=0A- BUG();=0A- break;=0A- }=0A-}=0A-=0A int = msi_maskable_irq(const struct msi_desc *entry)=0A {=0A BUG_ON(!entry);= =0A@@ -394,13 +373,11 @@ static void msi_set_mask_bit(unsigned in=0A void = mask_msi_irq(unsigned int irq)=0A {=0A msi_set_mask_bit(irq, 1);=0A- = msix_flush_writes(irq);=0A }=0A =0A void unmask_msi_irq(unsigned int = irq)=0A {=0A msi_set_mask_bit(irq, 0);=0A- msix_flush_writes(irq);= =0A }=0A =0A static struct msi_desc* alloc_msi_entry(void)=0A --=__PartFCD6E2EF.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartFCD6E2EF.0__=--