Messages in this thread | | | Subject | Re: [PATCH] pci: change msi-x vector to 32bit | From | James Bottomley <> | Date | Sat, 16 Aug 2008 09:50:38 -0500 |
| |
On Fri, 2008-08-15 at 23:42 -0700, Yinghai Lu wrote: > On Fri, Aug 15, 2008 at 8:26 PM, H. Peter Anvin <hpa@zytor.com> wrote: > > The 28 bits aren't enough, are they: we need domain as well (and surely we can have more than 16 domains?) > > current code > static unsigned int build_irq_for_pci_dev(struct pci_dev *dev) > { > unsigned int irq; > > irq = dev->bus->number; > irq <<= 8; > irq |= dev->devfn; > irq <<= 12; > > return irq; > }
Where exactly is this code in the kernel? Most arches assume the irq is an index to a compact table bounded by NR_IRQS, so something like this would violate that assumption.
This is also the reason why it doesn't matter to assign a u32 irq to a u16 vector. The u32 irq is a historical thing; it used to be u16 but then sparc used a vector mapping scheme for the irq number, which I don't believe it does any more.
> int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > { > unsigned int irq; > int ret; > unsigned int irq_want; > > irq_want = build_irq_for_pci_dev(dev) + 0x100; > > irq = create_irq(irq_want); > > domain is not used yet. > > need to make vecter_irq to vector_domain_irq > > irq_desc(irq) change to domain_irq_desc(domain, irq)
So the assumption underlying this is that the same bus/dev/function on different domains would share irq space ... that sounds possible but a bit strange.
James
| |