Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67395
b: refs/heads/master
c: 21ccdd3
h: refs/heads/master
i:
  67393: 749704b
  67391: c983b06
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Oct 2, 2007
1 parent 57a383d commit 573e987
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d385366a9b96fc3f4705f8513adccceaa0515f97
refs/heads/master: 21ccdd31e9c70f42b00d9ea152f6c4e0ff3f536e
24 changes: 9 additions & 15 deletions trunk/arch/powerpc/sysdev/mpic_u3msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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++;
Expand Down

0 comments on commit 573e987

Please sign in to comment.