diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2011-01-22 06:32:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:19:03 -0400 |
commit | 44ed3c0c47906297924c3fde801dc160f6996f7c (patch) | |
tree | f11b2de6fd33842c7aadd8cafdfbd136b56bfed6 /arch/sparc/kernel | |
parent | fe41493f749797f516deb84ba07747fb7d8c04c1 (diff) |
sparc64: rename virt_irq => irq - II
The generic irq support uses the term 'irq' for the
allocated irq number.
Fix it so sparc64 use the same term for an irq as the
generic irq support does.
For a naive reader this is less confusing.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/pci.c | 10 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_fire.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_impl.h | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 44 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/prom_irqtrans.c | 16 |
6 files changed, 44 insertions, 44 deletions
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 4137579d9adc..bfede51c3afc 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1001,22 +1001,22 @@ EXPORT_SYMBOL(pci_domain_nr); | |||
1001 | int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) | 1001 | int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) |
1002 | { | 1002 | { |
1003 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 1003 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
1004 | unsigned int virt_irq; | 1004 | unsigned int irq; |
1005 | 1005 | ||
1006 | if (!pbm->setup_msi_irq) | 1006 | if (!pbm->setup_msi_irq) |
1007 | return -EINVAL; | 1007 | return -EINVAL; |
1008 | 1008 | ||
1009 | return pbm->setup_msi_irq(&virt_irq, pdev, desc); | 1009 | return pbm->setup_msi_irq(&irq, pdev, desc); |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | void arch_teardown_msi_irq(unsigned int virt_irq) | 1012 | void arch_teardown_msi_irq(unsigned int irq) |
1013 | { | 1013 | { |
1014 | struct msi_desc *entry = get_irq_msi(virt_irq); | 1014 | struct msi_desc *entry = get_irq_msi(irq); |
1015 | struct pci_dev *pdev = entry->dev; | 1015 | struct pci_dev *pdev = entry->dev; |
1016 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 1016 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
1017 | 1017 | ||
1018 | if (pbm->teardown_msi_irq) | 1018 | if (pbm->teardown_msi_irq) |
1019 | pbm->teardown_msi_irq(virt_irq, pdev); | 1019 | pbm->teardown_msi_irq(irq, pdev); |
1020 | } | 1020 | } |
1021 | #endif /* !(CONFIG_PCI_MSI) */ | 1021 | #endif /* !(CONFIG_PCI_MSI) */ |
1022 | 1022 | ||
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index be5e2441c6d7..43d691b67d52 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -277,7 +277,7 @@ static int pci_fire_msiq_build_irq(struct pci_pbm_info *pbm, | |||
277 | { | 277 | { |
278 | unsigned long cregs = (unsigned long) pbm->pbm_regs; | 278 | unsigned long cregs = (unsigned long) pbm->pbm_regs; |
279 | unsigned long imap_reg, iclr_reg, int_ctrlr; | 279 | unsigned long imap_reg, iclr_reg, int_ctrlr; |
280 | unsigned int virt_irq; | 280 | unsigned int irq; |
281 | int fixup; | 281 | int fixup; |
282 | u64 val; | 282 | u64 val; |
283 | 283 | ||
@@ -293,14 +293,14 @@ static int pci_fire_msiq_build_irq(struct pci_pbm_info *pbm, | |||
293 | 293 | ||
294 | fixup = ((pbm->portid << 6) | devino) - int_ctrlr; | 294 | fixup = ((pbm->portid << 6) | devino) - int_ctrlr; |
295 | 295 | ||
296 | virt_irq = build_irq(fixup, iclr_reg, imap_reg); | 296 | irq = build_irq(fixup, iclr_reg, imap_reg); |
297 | if (!virt_irq) | 297 | if (!irq) |
298 | return -ENOMEM; | 298 | return -ENOMEM; |
299 | 299 | ||
300 | upa_writeq(EVENT_QUEUE_CONTROL_SET_EN, | 300 | upa_writeq(EVENT_QUEUE_CONTROL_SET_EN, |
301 | pbm->pbm_regs + EVENT_QUEUE_CONTROL_SET(msiqid)); | 301 | pbm->pbm_regs + EVENT_QUEUE_CONTROL_SET(msiqid)); |
302 | 302 | ||
303 | return virt_irq; | 303 | return irq; |
304 | } | 304 | } |
305 | 305 | ||
306 | static const struct sparc64_msiq_ops pci_fire_msiq_ops = { | 306 | static const struct sparc64_msiq_ops pci_fire_msiq_ops = { |
diff --git a/arch/sparc/kernel/pci_impl.h b/arch/sparc/kernel/pci_impl.h index e20ed5f06e9c..6beb60df31d0 100644 --- a/arch/sparc/kernel/pci_impl.h +++ b/arch/sparc/kernel/pci_impl.h | |||
@@ -131,9 +131,9 @@ struct pci_pbm_info { | |||
131 | void *msi_queues; | 131 | void *msi_queues; |
132 | unsigned long *msi_bitmap; | 132 | unsigned long *msi_bitmap; |
133 | unsigned int *msi_irq_table; | 133 | unsigned int *msi_irq_table; |
134 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, | 134 | int (*setup_msi_irq)(unsigned int *irq_p, struct pci_dev *pdev, |
135 | struct msi_desc *entry); | 135 | struct msi_desc *entry); |
136 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); | 136 | void (*teardown_msi_irq)(unsigned int irq, struct pci_dev *pdev); |
137 | const struct sparc64_msiq_ops *msi_ops; | 137 | const struct sparc64_msiq_ops *msi_ops; |
138 | #endif /* !(CONFIG_PCI_MSI) */ | 138 | #endif /* !(CONFIG_PCI_MSI) */ |
139 | 139 | ||
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index b210416ace7b..550e937720e7 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -31,12 +31,12 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie) | |||
31 | err = ops->dequeue_msi(pbm, msiqid, &head, &msi); | 31 | err = ops->dequeue_msi(pbm, msiqid, &head, &msi); |
32 | if (likely(err > 0)) { | 32 | if (likely(err > 0)) { |
33 | struct irq_desc *desc; | 33 | struct irq_desc *desc; |
34 | unsigned int virt_irq; | 34 | unsigned int irq; |
35 | 35 | ||
36 | virt_irq = pbm->msi_irq_table[msi - pbm->msi_first]; | 36 | irq = pbm->msi_irq_table[msi - pbm->msi_first]; |
37 | desc = irq_desc + virt_irq; | 37 | desc = irq_desc + irq; |
38 | 38 | ||
39 | desc->handle_irq(virt_irq, desc); | 39 | desc->handle_irq(irq, desc); |
40 | } | 40 | } |
41 | 41 | ||
42 | if (unlikely(err < 0)) | 42 | if (unlikely(err < 0)) |
@@ -121,7 +121,7 @@ static struct irq_chip msi_irq = { | |||
121 | /* XXX affinity XXX */ | 121 | /* XXX affinity XXX */ |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static int sparc64_setup_msi_irq(unsigned int *virt_irq_p, | 124 | static int sparc64_setup_msi_irq(unsigned int *irq_p, |
125 | struct pci_dev *pdev, | 125 | struct pci_dev *pdev, |
126 | struct msi_desc *entry) | 126 | struct msi_desc *entry) |
127 | { | 127 | { |
@@ -131,17 +131,17 @@ static int sparc64_setup_msi_irq(unsigned int *virt_irq_p, | |||
131 | int msi, err; | 131 | int msi, err; |
132 | u32 msiqid; | 132 | u32 msiqid; |
133 | 133 | ||
134 | *virt_irq_p = virt_irq_alloc(0, 0); | 134 | *irq_p = irq_alloc(0, 0); |
135 | err = -ENOMEM; | 135 | err = -ENOMEM; |
136 | if (!*virt_irq_p) | 136 | if (!*irq_p) |
137 | goto out_err; | 137 | goto out_err; |
138 | 138 | ||
139 | set_irq_chip_and_handler_name(*virt_irq_p, &msi_irq, | 139 | set_irq_chip_and_handler_name(*irq_p, &msi_irq, |
140 | handle_simple_irq, "MSI"); | 140 | handle_simple_irq, "MSI"); |
141 | 141 | ||
142 | err = alloc_msi(pbm); | 142 | err = alloc_msi(pbm); |
143 | if (unlikely(err < 0)) | 143 | if (unlikely(err < 0)) |
144 | goto out_virt_irq_free; | 144 | goto out_irq_free; |
145 | 145 | ||
146 | msi = err; | 146 | msi = err; |
147 | 147 | ||
@@ -152,7 +152,7 @@ static int sparc64_setup_msi_irq(unsigned int *virt_irq_p, | |||
152 | if (err) | 152 | if (err) |
153 | goto out_msi_free; | 153 | goto out_msi_free; |
154 | 154 | ||
155 | pbm->msi_irq_table[msi - pbm->msi_first] = *virt_irq_p; | 155 | pbm->msi_irq_table[msi - pbm->msi_first] = *irq_p; |
156 | 156 | ||
157 | if (entry->msi_attrib.is_64) { | 157 | if (entry->msi_attrib.is_64) { |
158 | msg.address_hi = pbm->msi64_start >> 32; | 158 | msg.address_hi = pbm->msi64_start >> 32; |
@@ -163,24 +163,24 @@ static int sparc64_setup_msi_irq(unsigned int *virt_irq_p, | |||
163 | } | 163 | } |
164 | msg.data = msi; | 164 | msg.data = msi; |
165 | 165 | ||
166 | set_irq_msi(*virt_irq_p, entry); | 166 | set_irq_msi(*irq_p, entry); |
167 | write_msi_msg(*virt_irq_p, &msg); | 167 | write_msi_msg(*irq_p, &msg); |
168 | 168 | ||
169 | return 0; | 169 | return 0; |
170 | 170 | ||
171 | out_msi_free: | 171 | out_msi_free: |
172 | free_msi(pbm, msi); | 172 | free_msi(pbm, msi); |
173 | 173 | ||
174 | out_virt_irq_free: | 174 | out_irq_free: |
175 | set_irq_chip(*virt_irq_p, NULL); | 175 | set_irq_chip(*irq_p, NULL); |
176 | virt_irq_free(*virt_irq_p); | 176 | irq_free(*irq_p); |
177 | *virt_irq_p = 0; | 177 | *irq_p = 0; |
178 | 178 | ||
179 | out_err: | 179 | out_err: |
180 | return err; | 180 | return err; |
181 | } | 181 | } |
182 | 182 | ||
183 | static void sparc64_teardown_msi_irq(unsigned int virt_irq, | 183 | static void sparc64_teardown_msi_irq(unsigned int irq, |
184 | struct pci_dev *pdev) | 184 | struct pci_dev *pdev) |
185 | { | 185 | { |
186 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 186 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
@@ -189,12 +189,12 @@ static void sparc64_teardown_msi_irq(unsigned int virt_irq, | |||
189 | int i, err; | 189 | int i, err; |
190 | 190 | ||
191 | for (i = 0; i < pbm->msi_num; i++) { | 191 | for (i = 0; i < pbm->msi_num; i++) { |
192 | if (pbm->msi_irq_table[i] == virt_irq) | 192 | if (pbm->msi_irq_table[i] == irq) |
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | if (i >= pbm->msi_num) { | 195 | if (i >= pbm->msi_num) { |
196 | printk(KERN_ERR "%s: teardown: No MSI for irq %u\n", | 196 | printk(KERN_ERR "%s: teardown: No MSI for irq %u\n", |
197 | pbm->name, virt_irq); | 197 | pbm->name, irq); |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | 200 | ||
@@ -205,14 +205,14 @@ static void sparc64_teardown_msi_irq(unsigned int virt_irq, | |||
205 | if (err) { | 205 | if (err) { |
206 | printk(KERN_ERR "%s: teardown: ops->teardown() on MSI %u, " | 206 | printk(KERN_ERR "%s: teardown: ops->teardown() on MSI %u, " |
207 | "irq %u, gives error %d\n", | 207 | "irq %u, gives error %d\n", |
208 | pbm->name, msi_num, virt_irq, err); | 208 | pbm->name, msi_num, irq, err); |
209 | return; | 209 | return; |
210 | } | 210 | } |
211 | 211 | ||
212 | free_msi(pbm, msi_num); | 212 | free_msi(pbm, msi_num); |
213 | 213 | ||
214 | set_irq_chip(virt_irq, NULL); | 214 | set_irq_chip(irq, NULL); |
215 | virt_irq_free(virt_irq); | 215 | irq_free(irq); |
216 | } | 216 | } |
217 | 217 | ||
218 | static int msi_bitmap_alloc(struct pci_pbm_info *pbm) | 218 | static int msi_bitmap_alloc(struct pci_pbm_info *pbm) |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 158cd739b263..629160772a9d 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -844,9 +844,9 @@ static int pci_sun4v_msiq_build_irq(struct pci_pbm_info *pbm, | |||
844 | unsigned long msiqid, | 844 | unsigned long msiqid, |
845 | unsigned long devino) | 845 | unsigned long devino) |
846 | { | 846 | { |
847 | unsigned int virt_irq = sun4v_build_irq(pbm->devhandle, devino); | 847 | unsigned int irq = sun4v_build_irq(pbm->devhandle, devino); |
848 | 848 | ||
849 | if (!virt_irq) | 849 | if (!irq) |
850 | return -ENOMEM; | 850 | return -ENOMEM; |
851 | 851 | ||
852 | if (pci_sun4v_msiq_setstate(pbm->devhandle, msiqid, HV_MSIQSTATE_IDLE)) | 852 | if (pci_sun4v_msiq_setstate(pbm->devhandle, msiqid, HV_MSIQSTATE_IDLE)) |
@@ -854,7 +854,7 @@ static int pci_sun4v_msiq_build_irq(struct pci_pbm_info *pbm, | |||
854 | if (pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_VALID)) | 854 | if (pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_VALID)) |
855 | return -EINVAL; | 855 | return -EINVAL; |
856 | 856 | ||
857 | return virt_irq; | 857 | return irq; |
858 | } | 858 | } |
859 | 859 | ||
860 | static const struct sparc64_msiq_ops pci_sun4v_msiq_ops = { | 860 | static const struct sparc64_msiq_ops pci_sun4v_msiq_ops = { |
diff --git a/arch/sparc/kernel/prom_irqtrans.c b/arch/sparc/kernel/prom_irqtrans.c index ce651147fabc..570b98f6e897 100644 --- a/arch/sparc/kernel/prom_irqtrans.c +++ b/arch/sparc/kernel/prom_irqtrans.c | |||
@@ -227,7 +227,7 @@ static unsigned int sabre_irq_build(struct device_node *dp, | |||
227 | unsigned long imap, iclr; | 227 | unsigned long imap, iclr; |
228 | unsigned long imap_off, iclr_off; | 228 | unsigned long imap_off, iclr_off; |
229 | int inofixup = 0; | 229 | int inofixup = 0; |
230 | int virt_irq; | 230 | int irq; |
231 | 231 | ||
232 | ino &= 0x3f; | 232 | ino &= 0x3f; |
233 | if (ino < SABRE_ONBOARD_IRQ_BASE) { | 233 | if (ino < SABRE_ONBOARD_IRQ_BASE) { |
@@ -247,7 +247,7 @@ static unsigned int sabre_irq_build(struct device_node *dp, | |||
247 | if ((ino & 0x20) == 0) | 247 | if ((ino & 0x20) == 0) |
248 | inofixup = ino & 0x03; | 248 | inofixup = ino & 0x03; |
249 | 249 | ||
250 | virt_irq = build_irq(inofixup, iclr, imap); | 250 | irq = build_irq(inofixup, iclr, imap); |
251 | 251 | ||
252 | /* If the parent device is a PCI<->PCI bridge other than | 252 | /* If the parent device is a PCI<->PCI bridge other than |
253 | * APB, we have to install a pre-handler to ensure that | 253 | * APB, we have to install a pre-handler to ensure that |
@@ -256,13 +256,13 @@ static unsigned int sabre_irq_build(struct device_node *dp, | |||
256 | */ | 256 | */ |
257 | regs = of_get_property(dp, "reg", NULL); | 257 | regs = of_get_property(dp, "reg", NULL); |
258 | if (regs && sabre_device_needs_wsync(dp)) { | 258 | if (regs && sabre_device_needs_wsync(dp)) { |
259 | irq_install_pre_handler(virt_irq, | 259 | irq_install_pre_handler(irq, |
260 | sabre_wsync_handler, | 260 | sabre_wsync_handler, |
261 | (void *) (long) regs->phys_hi, | 261 | (void *) (long) regs->phys_hi, |
262 | (void *) irq_data); | 262 | (void *) irq_data); |
263 | } | 263 | } |
264 | 264 | ||
265 | return virt_irq; | 265 | return irq; |
266 | } | 266 | } |
267 | 267 | ||
268 | static void __init sabre_irq_trans_init(struct device_node *dp) | 268 | static void __init sabre_irq_trans_init(struct device_node *dp) |
@@ -382,7 +382,7 @@ static unsigned int schizo_irq_build(struct device_node *dp, | |||
382 | unsigned long pbm_regs = irq_data->pbm_regs; | 382 | unsigned long pbm_regs = irq_data->pbm_regs; |
383 | unsigned long imap, iclr; | 383 | unsigned long imap, iclr; |
384 | int ign_fixup; | 384 | int ign_fixup; |
385 | int virt_irq; | 385 | int irq; |
386 | int is_tomatillo; | 386 | int is_tomatillo; |
387 | 387 | ||
388 | ino &= 0x3f; | 388 | ino &= 0x3f; |
@@ -409,17 +409,17 @@ static unsigned int schizo_irq_build(struct device_node *dp, | |||
409 | ign_fixup = (1 << 6); | 409 | ign_fixup = (1 << 6); |
410 | } | 410 | } |
411 | 411 | ||
412 | virt_irq = build_irq(ign_fixup, iclr, imap); | 412 | irq = build_irq(ign_fixup, iclr, imap); |
413 | 413 | ||
414 | if (is_tomatillo) { | 414 | if (is_tomatillo) { |
415 | irq_install_pre_handler(virt_irq, | 415 | irq_install_pre_handler(irq, |
416 | tomatillo_wsync_handler, | 416 | tomatillo_wsync_handler, |
417 | ((irq_data->chip_version <= 4) ? | 417 | ((irq_data->chip_version <= 4) ? |
418 | (void *) 1 : (void *) 0), | 418 | (void *) 1 : (void *) 0), |
419 | (void *) irq_data->sync_reg); | 419 | (void *) irq_data->sync_reg); |
420 | } | 420 | } |
421 | 421 | ||
422 | return virt_irq; | 422 | return irq; |
423 | } | 423 | } |
424 | 424 | ||
425 | static void __init __schizo_irq_trans_init(struct device_node *dp, | 425 | static void __init __schizo_irq_trans_init(struct device_node *dp, |