[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <525E32FC.3010604@oracle.com>
Date: Wed, 16 Oct 2013 14:32:28 +0800
From: Zhenzhong Duan <zhenzhong.duan@...cle.com>
To: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
xen-devel <xen-devel@...ts.xen.org>
CC: Bjorn Helgaas <bhelgaas@...gle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Feng Jin <joe.jin@...cle.com>,
Sucheta Chakraborty <sucheta.chakraborty@...gic.com>
Subject: [PATCH 1/3] PCI: Refactor restore_msi_irqs - code movement
Move default_restore_msi_irqs down to reference msi_mask_irq and msix_mask_irq.
This patch lays the groundwork for patch titled:
'PCI: Refactor MSI/MSIX mask restore code to fix interrupt lost issue'
Tested-by: Sucheta Chakraborty <sucheta.chakraborty@...gic.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...cle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
drivers/pci/msi.c | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d5f90d6..ecd4cdf 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -116,24 +116,6 @@ void __weak arch_teardown_msi_irqs(struct pci_dev *dev)
return default_teardown_msi_irqs(dev);
}
-void default_restore_msi_irqs(struct pci_dev *dev, int irq)
-{
- struct msi_desc *entry;
-
- entry = NULL;
- if (dev->msix_enabled) {
- list_for_each_entry(entry, &dev->msi_list, list) {
- if (irq == entry->irq)
- break;
- }
- } else if (dev->msi_enabled) {
- entry = irq_get_msi_desc(irq);
- }
-
- if (entry)
- write_msi_msg(irq, &entry->msg);
-}
-
void __weak arch_restore_msi_irqs(struct pci_dev *dev, int irq)
{
return default_restore_msi_irqs(dev, irq);
@@ -252,6 +234,24 @@ void unmask_msi_irq(struct irq_data *data)
msi_set_mask_bit(data, 0);
}
+void default_restore_msi_irqs(struct pci_dev *dev, int irq)
+{
+ struct msi_desc *entry;
+
+ entry = NULL;
+ if (dev->msix_enabled) {
+ list_for_each_entry(entry, &dev->msi_list, list) {
+ if (irq == entry->irq)
+ break;
+ }
+ } else if (dev->msi_enabled) {
+ entry = irq_get_msi_desc(irq);
+ }
+
+ if (entry)
+ write_msi_msg(irq, &entry->msg);
+}
+
void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
{
BUG_ON(entry->dev->current_state != PCI_D0);
--
1.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists