From: Grant Grundler <iod00d@hp.com>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz
Subject: Re: Problems with MSI-X on ia64
Date: Wed, 31 May 2006 23:35:47 -0700 [thread overview]
Message-ID: <20060601063547.GA5531@esmail.cup.hp.com> (raw)
In-Reply-To: <20060217075829.GB22451@esmail.cup.hp.com>
On Thu, Feb 16, 2006 at 11:58:29PM -0800, Grant Grundler wrote:
> Log Entry:
...
> Second part of this patch deals with "useless" code.
> We walk through the steps to find the phys_addr and then
> don't use the result. I suspect the intent was to zero
> out the respective MSI-X entry but I'm not sure at the moment.
> Delete the code inside the #if 0/#endif if it's really
> not needed.
The code is really not needed.
Roland Dreier/Greg KH removed the release_mem_region() calls that
were the only consumers of phys_addr:
http://www.ussg.iu.edu/hypermail/linux/kernel/0503.0/1540.html
patch below deletes the "dead" code.
thanks,
grant
Signed-off-by: Grant Grundler <iod00d@hp.com>
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1008,33 +1008,8 @@ static int msi_free_vector(struct pci_de
entry_nr * PCI_MSIX_ENTRY_SIZE +
PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
- if (head == vector) {
- /*
- * Detect last MSI-X vector to be released.
- * Release the MSI-X memory-mapped table.
- */
-#if 0
- int pos, nr_entries;
- unsigned long phys_addr;
- u32 table_offset;
- u16 control;
- u8 bir;
-
- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
- pci_read_config_word(dev, msi_control_reg(pos),
- &control);
- nr_entries = multi_msix_capable(control);
- pci_read_config_dword(dev, msix_table_offset_reg(pos),
- &table_offset);
- bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
- table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
- phys_addr = pci_resource_start(dev, bir) + table_offset;
-/*
- * FIXME! and what did you want to do with phys_addr?
- */
-#endif
+ if (head == vector)
iounmap(base);
- }
}
return 0;
@@ -1300,24 +1275,6 @@ void msi_remove_pci_irq_vectors(struct p
}
msi_free_vector(dev, vector, 0);
if (warning) {
- /* Force to release the MSI-X memory-mapped table */
-#if 0
- unsigned long phys_addr;
- u32 table_offset;
- u16 control;
- u8 bir;
-
- pci_read_config_word(dev, msi_control_reg(pos),
- &control);
- pci_read_config_dword(dev, msix_table_offset_reg(pos),
- &table_offset);
- bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
- table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
- phys_addr = pci_resource_start(dev, bir) + table_offset;
-/*
- * FIXME! and what did you want to do with phys_addr?
- */
-#endif
iounmap(base);
printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() "
"called without free_irq() on all MSI-X vectors\n",
next prev parent reply other threads:[~2006-06-01 6:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 17:14 Problems with MSI-X on ia64 Miller, Mike (OS Dev)
2006-01-26 17:24 ` Mark Maule
2006-01-26 20:24 ` Grant Grundler
2006-02-17 7:58 ` Grant Grundler
2006-02-17 8:46 ` Chris Wedgwood
2006-02-17 14:11 ` Matthew Wilcox
2006-02-17 16:36 ` Grant Grundler
2006-02-17 19:10 ` Chris Wedgwood
2006-06-01 6:35 ` Grant Grundler [this message]
2006-01-26 20:37 Miller, Mike (OS Dev)
2006-01-27 4:37 ` Greg KH
2006-01-27 15:34 Miller, Mike (OS Dev)
2006-02-17 19:52 Luck, Tony
2006-02-17 20:04 ` Grant Grundler
2006-02-17 20:21 ` Roland Dreier
2006-02-21 20:21 Miller, Mike (OS Dev)
2006-02-25 16:23 ` Grant Grundler
2006-02-27 18:36 Miller, Mike (OS Dev)
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=20060601063547.GA5531@esmail.cup.hp.com \
--to=iod00d@hp.com \
--cc=gregkh@suse.de \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/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;
as well as URLs for NNTP newsgroup(s).