x86: use 28 bits irq NR for pci msi/msix and ht
also print out irq no in /proc/interrups and /proc/stat in hex, so could tell bus/dev/func. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -82,6 +82,18 @@ void unmask_ht_irq(unsigned int irq)
|
||||
write_ht_irq_msg(irq, &msg);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* __ht_create_irq - create an irq and attach it to a device.
|
||||
* @dev: The hypertransport device to find the irq capability on.
|
||||
@@ -97,7 +109,8 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
|
||||
u32 data;
|
||||
int max_irq;
|
||||
int pos;
|
||||
int irq;
|
||||
unsigned int irq;
|
||||
unsigned int irq_want;
|
||||
|
||||
pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
|
||||
if (!pos)
|
||||
@@ -125,8 +138,13 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
|
||||
cfg->msg.address_lo = 0xffffffff;
|
||||
cfg->msg.address_hi = 0xffffffff;
|
||||
|
||||
irq_want= build_irq_for_pci_dev(dev);
|
||||
#ifdef CONFIG_HAVE_SPARSE_IRQ
|
||||
irq = create_irq_nr(irq_want + idx);
|
||||
#else
|
||||
irq = create_irq();
|
||||
if (irq < 0) {
|
||||
#endif
|
||||
if (irq == 0) {
|
||||
kfree(cfg);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
Reference in New Issue
Block a user