aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:22 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:52 -0400
commit6d50bc26836e16a9589e0b128d527c29e30d722a (patch)
tree8fd02d634b4cdf618e0328813b33c3a357015547 /drivers/pci
parente420dfb40c453a9760b86c7f338052bdb4dfa755 (diff)
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/htirq.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c
index 279c940a0039..7c5aef13fcdb 100644
--- a/drivers/pci/htirq.c
+++ b/drivers/pci/htirq.c
@@ -82,6 +82,18 @@ void unmask_ht_irq(unsigned int irq)
82 write_ht_irq_msg(irq, &msg); 82 write_ht_irq_msg(irq, &msg);
83} 83}
84 84
85static unsigned int build_irq_for_pci_dev(struct pci_dev *dev)
86{
87 unsigned int irq;
88
89 irq = dev->bus->number;
90 irq <<= 8;
91 irq |= dev->devfn;
92 irq <<= 12;
93
94 return irq;
95}
96
85/** 97/**
86 * __ht_create_irq - create an irq and attach it to a device. 98 * __ht_create_irq - create an irq and attach it to a device.
87 * @dev: The hypertransport device to find the irq capability on. 99 * @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)
97 u32 data; 109 u32 data;
98 int max_irq; 110 int max_irq;
99 int pos; 111 int pos;
100 int irq; 112 unsigned int irq;
113 unsigned int irq_want;
101 114
102 pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ); 115 pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
103 if (!pos) 116 if (!pos)
@@ -125,8 +138,13 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
125 cfg->msg.address_lo = 0xffffffff; 138 cfg->msg.address_lo = 0xffffffff;
126 cfg->msg.address_hi = 0xffffffff; 139 cfg->msg.address_hi = 0xffffffff;
127 140
141 irq_want= build_irq_for_pci_dev(dev);
142#ifdef CONFIG_HAVE_SPARSE_IRQ
143 irq = create_irq_nr(irq_want + idx);
144#else
128 irq = create_irq(); 145 irq = create_irq();
129 if (irq < 0) { 146#endif
147 if (irq == 0) {
130 kfree(cfg); 148 kfree(cfg);
131 return -EBUSY; 149 return -EBUSY;
132 } 150 }