Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21ccdd31e9c70f42b00d9ea152f6c4e0ff3f536e
Commit:     21ccdd31e9c70f42b00d9ea152f6c4e0ff3f536e
Parent:     d385366a9b96fc3f4705f8513adccceaa0515f97
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 20 16:36:51 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 09:11:42 2007 +1000

    [POWERPC] Inline u3msi_compose_msi_msg()
    
    In the MPIC U3 MSI code, we call u3msi_compose_msi_msg() once for each MSI.
    This is overkill, as the address is per pci device, not per MSI. So setup
    the address once, and just set the data per MSI.
    
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/sysdev/mpic_u3msi.c |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 255b2f5..1d5a408 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -108,26 +108,17 @@ static void u3msi_teardown_msi_irqs(struct pci_dev *pdev)
        return;
 }
 
-static void u3msi_compose_msi_msg(struct pci_dev *pdev, int virq,
-                                 struct msi_msg *msg)
-{
-       u64 addr;
-
-       addr = find_ht_magic_addr(pdev);
-       msg->address_lo = addr & 0xFFFFFFFF;
-       msg->address_hi = addr >> 32;
-       msg->data = virq_to_hw(virq);
-
-       pr_debug("u3msi: allocated virq 0x%x (hw 0x%lx) at address 0x%lx\n",
-                virq, virq_to_hw(virq), addr);
-}
-
 static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 {
        irq_hw_number_t hwirq;
        unsigned int virq;
        struct msi_desc *entry;
        struct msi_msg msg;
+       u64 addr;
+
+       addr = find_ht_magic_addr(pdev);
+       msg.address_lo = addr & 0xFFFFFFFF;
+       msg.address_hi = addr >> 32;
 
        list_for_each_entry(entry, &pdev->msi_list, list) {
                hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1);
@@ -147,7 +138,10 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int 
nvec, int type)
                set_irq_chip(virq, &mpic_u3msi_chip);
                set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
 
-               u3msi_compose_msi_msg(pdev, virq, &msg);
+               pr_debug("u3msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n",
+                         virq, hwirq, addr);
+
+               msg.data = hwirq;
                write_msi_msg(virq, &msg);
 
                hwirq++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to