From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Cc: roland@topspin.com
Subject: [PATCH] PCI: clean up the msi api
Date: Fri, 4 Mar 2005 12:53:58 -0800 [thread overview]
Message-ID: <11099696383032@kroah.com> (raw)
In-Reply-To: <1109969637195@kroah.com>
ChangeSet 1.1998.11.21, 2005/02/17 15:07:01-08:00, roland@topspin.com
[PATCH] PCI: clean up the msi api
Remove the call to request_mem_region() in msix_capability_init() to
grab the MSI-X vector table. Drivers should be using
pci_request_regions() so that they own all of the PCI BARs, and the
MSI-X core should trust it's being called by a correct driver.
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/msi.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff -Nru a/drivers/pci/msi.c b/drivers/pci/msi.c
--- a/drivers/pci/msi.c 2005-03-04 12:41:47 -08:00
+++ b/drivers/pci/msi.c 2005-03-04 12:41:47 -08:00
@@ -616,15 +616,10 @@
bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
phys_addr = pci_resource_start (dev, bir);
phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK);
- if (!request_mem_region(phys_addr,
- nr_entries * PCI_MSIX_ENTRY_SIZE,
- "MSI-X vector table"))
- return -ENOMEM;
base = ioremap_nocache(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
- if (base == NULL) {
- release_mem_region(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
+ if (base == NULL)
return -ENOMEM;
- }
+
/* MSI-X Table Initialization */
for (i = 0; i < nvec; i++) {
entry = alloc_msi_entry();
@@ -859,8 +854,6 @@
phys_addr += (u32)(table_offset &
~PCI_MSIX_FLAGS_BIRMASK);
iounmap(base);
- release_mem_region(phys_addr,
- nr_entries * PCI_MSIX_ENTRY_SIZE);
}
}
@@ -1133,8 +1126,6 @@
phys_addr += (u32)(table_offset &
~PCI_MSIX_FLAGS_BIRMASK);
iounmap(base);
- release_mem_region(phys_addr, PCI_MSIX_ENTRY_SIZE *
- multi_msix_capable(control));
printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() "
"called without free_irq() on all MSI-X vectors\n",
pci_name(dev));
next prev parent reply other threads:[~2005-03-04 21:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-04 20:53 [BK PATCH] PCI update for 2.6.11 Greg KH
2005-03-04 20:53 ` [PATCH] convert pci_dev->slot_name usage to pci_name() Greg KH
2005-03-04 20:53 ` [PATCH] Remove pci_dev->slot_name Greg KH
2005-03-04 20:53 ` [PATCH] PCI Hotplug: Remove unneeded instructions from ibmphp_pci.c Greg KH
2005-03-04 20:53 ` [PATCH] PCI: pci_proc_domain Greg KH
2005-03-04 20:53 ` [PATCH] PCI: Make pci_claim_resource __devinit Greg KH
2005-03-04 20:53 ` [PATCH] PCI: fix pci_remove_legacy_files() crash Greg KH
2005-03-04 20:53 ` [PATCH] PCI: NUMA-Q PCI config access arg validation Greg KH
2005-03-04 20:53 ` [PATCH] PCI: pci_raw_ops should use unsigned args Greg KH
2005-03-04 20:53 ` [PATCH] arch/i386/kernel/pci/irq.c: Wrong message output Greg KH
2005-03-04 20:53 ` [PATCH] PCI: Dynids - passing driver data Greg KH
2005-03-04 20:53 ` [PATCH] drivers/pci/*: convert to pci_register_driver Greg KH
2005-03-04 20:53 ` [PATCH] PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers Greg KH
2005-03-04 20:53 ` [PATCH] PCI: Add PCI quirk for SMBus on the Toshiba Satellite A40 Greg KH
2005-03-04 20:53 ` [PATCH] PCI: allow x86_64 to do pci express Greg KH
2005-03-04 20:53 ` [PATCH] pci/quirks.c: unhide SMBus device on Samsung P35 laptop Greg KH
2005-03-04 20:53 ` Greg KH [this message]
2005-03-04 21:00 ` [PATCH] convert pci_dev->slot_name usage to pci_name() Jeff Garzik
2005-03-04 21:07 ` Greg KH
2005-03-04 23:00 ` Jeff Garzik
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=11099696383032@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=roland@topspin.com \
/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