diff options
25 files changed, 62 insertions, 60 deletions
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index b83fcc81faed..03dc28cdb4da 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
18 | 18 | ||
19 | 19 | ||
20 | #define get_irq_desc(irq) (&irq_desc[(irq)]) | ||
21 | |||
22 | /* Define a way to iterate across irqs. */ | 20 | /* Define a way to iterate across irqs. */ |
23 | #define for_each_irq(i) \ | 21 | #define for_each_irq(i) \ |
24 | for ((i) = 0; (i) < NR_IRQS; ++(i)) | 22 | for ((i) = 0; (i) < NR_IRQS; ++(i)) |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 0a8439aafdd1..6f4613dd05ef 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -373,7 +373,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
373 | hard_irq_disable(); | 373 | hard_irq_disable(); |
374 | 374 | ||
375 | for_each_irq(i) { | 375 | for_each_irq(i) { |
376 | struct irq_desc *desc = irq_desc + i; | 376 | struct irq_desc *desc = irq_to_desc(i); |
377 | 377 | ||
378 | if (desc->status & IRQ_INPROGRESS) | 378 | if (desc->status & IRQ_INPROGRESS) |
379 | desc->chip->eoi(i); | 379 | desc->chip->eoi(i); |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index e5d121177984..65632215f020 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -190,7 +190,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
190 | } | 190 | } |
191 | 191 | ||
192 | if (i < NR_IRQS) { | 192 | if (i < NR_IRQS) { |
193 | desc = get_irq_desc(i); | 193 | desc = irq_to_desc(i); |
194 | spin_lock_irqsave(&desc->lock, flags); | 194 | spin_lock_irqsave(&desc->lock, flags); |
195 | action = desc->action; | 195 | action = desc->action; |
196 | if (!action || !action->handler) | 196 | if (!action || !action->handler) |
@@ -230,23 +230,25 @@ skip: | |||
230 | #ifdef CONFIG_HOTPLUG_CPU | 230 | #ifdef CONFIG_HOTPLUG_CPU |
231 | void fixup_irqs(cpumask_t map) | 231 | void fixup_irqs(cpumask_t map) |
232 | { | 232 | { |
233 | struct irq_desc *desc; | ||
233 | unsigned int irq; | 234 | unsigned int irq; |
234 | static int warned; | 235 | static int warned; |
235 | 236 | ||
236 | for_each_irq(irq) { | 237 | for_each_irq(irq) { |
237 | cpumask_t mask; | 238 | cpumask_t mask; |
238 | 239 | ||
239 | if (irq_desc[irq].status & IRQ_PER_CPU) | 240 | desc = irq_to_desc(irq); |
241 | if (desc && desc->status & IRQ_PER_CPU) | ||
240 | continue; | 242 | continue; |
241 | 243 | ||
242 | cpumask_and(&mask, irq_desc[irq].affinity, &map); | 244 | cpumask_and(&mask, desc->affinity, &map); |
243 | if (any_online_cpu(mask) == NR_CPUS) { | 245 | if (any_online_cpu(mask) == NR_CPUS) { |
244 | printk("Breaking affinity for irq %i\n", irq); | 246 | printk("Breaking affinity for irq %i\n", irq); |
245 | mask = map; | 247 | mask = map; |
246 | } | 248 | } |
247 | if (irq_desc[irq].chip->set_affinity) | 249 | if (desc->chip->set_affinity) |
248 | irq_desc[irq].chip->set_affinity(irq, &mask); | 250 | desc->chip->set_affinity(irq, &mask); |
249 | else if (irq_desc[irq].action && !(warned++)) | 251 | else if (desc->action && !(warned++)) |
250 | printk("Cannot set affinity for irq %i\n", irq); | 252 | printk("Cannot set affinity for irq %i\n", irq); |
251 | } | 253 | } |
252 | 254 | ||
@@ -273,7 +275,7 @@ static inline void handle_one_irq(unsigned int irq) | |||
273 | return; | 275 | return; |
274 | } | 276 | } |
275 | 277 | ||
276 | desc = irq_desc + irq; | 278 | desc = irq_to_desc(irq); |
277 | saved_sp_limit = current->thread.ksp_limit; | 279 | saved_sp_limit = current->thread.ksp_limit; |
278 | 280 | ||
279 | irqtp->task = curtp->task; | 281 | irqtp->task = curtp->task; |
@@ -535,7 +537,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node, | |||
535 | smp_wmb(); | 537 | smp_wmb(); |
536 | 538 | ||
537 | /* Clear norequest flags */ | 539 | /* Clear norequest flags */ |
538 | get_irq_desc(i)->status &= ~IRQ_NOREQUEST; | 540 | irq_to_desc(i)->status &= ~IRQ_NOREQUEST; |
539 | 541 | ||
540 | /* Legacy flags are left to default at this point, | 542 | /* Legacy flags are left to default at this point, |
541 | * one can then use irq_create_mapping() to | 543 | * one can then use irq_create_mapping() to |
@@ -602,7 +604,7 @@ static int irq_setup_virq(struct irq_host *host, unsigned int virq, | |||
602 | irq_hw_number_t hwirq) | 604 | irq_hw_number_t hwirq) |
603 | { | 605 | { |
604 | /* Clear IRQ_NOREQUEST flag */ | 606 | /* Clear IRQ_NOREQUEST flag */ |
605 | get_irq_desc(virq)->status &= ~IRQ_NOREQUEST; | 607 | irq_to_desc(virq)->status &= ~IRQ_NOREQUEST; |
606 | 608 | ||
607 | /* map it */ | 609 | /* map it */ |
608 | smp_wmb(); | 610 | smp_wmb(); |
@@ -732,7 +734,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller, | |||
732 | 734 | ||
733 | /* Set type if specified and different than the current one */ | 735 | /* Set type if specified and different than the current one */ |
734 | if (type != IRQ_TYPE_NONE && | 736 | if (type != IRQ_TYPE_NONE && |
735 | type != (get_irq_desc(virq)->status & IRQF_TRIGGER_MASK)) | 737 | type != (irq_to_desc(virq)->status & IRQF_TRIGGER_MASK)) |
736 | set_irq_type(virq, type); | 738 | set_irq_type(virq, type); |
737 | return virq; | 739 | return virq; |
738 | } | 740 | } |
@@ -804,7 +806,7 @@ void irq_dispose_mapping(unsigned int virq) | |||
804 | irq_map[virq].hwirq = host->inval_irq; | 806 | irq_map[virq].hwirq = host->inval_irq; |
805 | 807 | ||
806 | /* Set some flags */ | 808 | /* Set some flags */ |
807 | get_irq_desc(virq)->status |= IRQ_NOREQUEST; | 809 | irq_to_desc(virq)->status |= IRQ_NOREQUEST; |
808 | 810 | ||
809 | /* Free it */ | 811 | /* Free it */ |
810 | irq_free_virt(virq, 1); | 812 | irq_free_virt(virq, 1); |
@@ -1001,7 +1003,7 @@ void irq_early_init(void) | |||
1001 | unsigned int i; | 1003 | unsigned int i; |
1002 | 1004 | ||
1003 | for (i = 0; i < NR_IRQS; i++) | 1005 | for (i = 0; i < NR_IRQS; i++) |
1004 | get_irq_desc(i)->status |= IRQ_NOREQUEST; | 1006 | irq_to_desc(i)->status |= IRQ_NOREQUEST; |
1005 | } | 1007 | } |
1006 | 1008 | ||
1007 | /* We need to create the radix trees late */ | 1009 | /* We need to create the radix trees late */ |
@@ -1064,7 +1066,7 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1064 | "chip name", "host name"); | 1066 | "chip name", "host name"); |
1065 | 1067 | ||
1066 | for (i = 1; i < NR_IRQS; i++) { | 1068 | for (i = 1; i < NR_IRQS; i++) { |
1067 | desc = get_irq_desc(i); | 1069 | desc = irq_to_desc(i); |
1068 | spin_lock_irqsave(&desc->lock, flags); | 1070 | spin_lock_irqsave(&desc->lock, flags); |
1069 | 1071 | ||
1070 | if (desc->action && desc->action->handler) { | 1072 | if (desc->action && desc->action->handler) { |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c index a6ce80566625..cd70ee1667fa 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | |||
@@ -132,7 +132,7 @@ static int | |||
132 | cpld_pic_host_map(struct irq_host *h, unsigned int virq, | 132 | cpld_pic_host_map(struct irq_host *h, unsigned int virq, |
133 | irq_hw_number_t hw) | 133 | irq_hw_number_t hw) |
134 | { | 134 | { |
135 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 135 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
136 | set_irq_chip_and_handler(virq, &cpld_pic, handle_level_irq); | 136 | set_irq_chip_and_handler(virq, &cpld_pic, handle_level_irq); |
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c index 68e4f1696d14..478020358748 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c | |||
@@ -114,7 +114,7 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
114 | static int media5200_irq_map(struct irq_host *h, unsigned int virq, | 114 | static int media5200_irq_map(struct irq_host *h, unsigned int virq, |
115 | irq_hw_number_t hw) | 115 | irq_hw_number_t hw) |
116 | { | 116 | { |
117 | struct irq_desc *desc = get_irq_desc(virq); | 117 | struct irq_desc *desc = irq_to_desc(virq); |
118 | 118 | ||
119 | pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw); | 119 | pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw); |
120 | set_irq_chip_data(virq, &media5200_irq); | 120 | set_irq_chip_data(virq, &media5200_irq); |
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index 7ee979f323d1..a682331ba0ff 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | |||
@@ -107,7 +107,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
107 | static int pci_pic_host_map(struct irq_host *h, unsigned int virq, | 107 | static int pci_pic_host_map(struct irq_host *h, unsigned int virq, |
108 | irq_hw_number_t hw) | 108 | irq_hw_number_t hw) |
109 | { | 109 | { |
110 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 110 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
111 | set_irq_chip_data(virq, h->host_data); | 111 | set_irq_chip_data(virq, h->host_data); |
112 | set_irq_chip_and_handler(virq, &pq2ads_pci_ic, handle_level_irq); | 112 | set_irq_chip_and_handler(virq, &pq2ads_pci_ic, handle_level_irq); |
113 | return 0; | 113 | return 0; |
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c index 60edf63d0157..e59920aa6668 100644 --- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c +++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c | |||
@@ -245,7 +245,7 @@ static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq, | |||
245 | irq_hw_number_t hwirq) | 245 | irq_hw_number_t hwirq) |
246 | { | 246 | { |
247 | /* All interrupts are LEVEL sensitive */ | 247 | /* All interrupts are LEVEL sensitive */ |
248 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 248 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
249 | set_irq_chip_and_handler(virq, &socrates_fpga_pic_chip, | 249 | set_irq_chip_and_handler(virq, &socrates_fpga_pic_chip, |
250 | handle_fasteoi_irq); | 250 | handle_fasteoi_irq); |
251 | 251 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_pic.c b/arch/powerpc/platforms/86xx/gef_pic.c index 50d0a2b63809..978d6cb37516 100644 --- a/arch/powerpc/platforms/86xx/gef_pic.c +++ b/arch/powerpc/platforms/86xx/gef_pic.c | |||
@@ -163,7 +163,7 @@ static int gef_pic_host_map(struct irq_host *h, unsigned int virq, | |||
163 | irq_hw_number_t hwirq) | 163 | irq_hw_number_t hwirq) |
164 | { | 164 | { |
165 | /* All interrupts are LEVEL sensitive */ | 165 | /* All interrupts are LEVEL sensitive */ |
166 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 166 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
167 | set_irq_chip_and_handler(virq, &gef_pic_chip, handle_level_irq); | 167 | set_irq_chip_and_handler(virq, &gef_pic_chip, handle_level_irq); |
168 | 168 | ||
169 | return 0; | 169 | return 0; |
diff --git a/arch/powerpc/platforms/cell/beat_interrupt.c b/arch/powerpc/platforms/cell/beat_interrupt.c index 72254848a228..4a2bbff57698 100644 --- a/arch/powerpc/platforms/cell/beat_interrupt.c +++ b/arch/powerpc/platforms/cell/beat_interrupt.c | |||
@@ -136,7 +136,7 @@ static void beatic_pic_host_unmap(struct irq_host *h, unsigned int virq) | |||
136 | static int beatic_pic_host_map(struct irq_host *h, unsigned int virq, | 136 | static int beatic_pic_host_map(struct irq_host *h, unsigned int virq, |
137 | irq_hw_number_t hw) | 137 | irq_hw_number_t hw) |
138 | { | 138 | { |
139 | struct irq_desc *desc = get_irq_desc(virq); | 139 | struct irq_desc *desc = irq_to_desc(virq); |
140 | int64_t err; | 140 | int64_t err; |
141 | 141 | ||
142 | err = beat_construct_and_connect_irq_plug(virq, hw); | 142 | err = beat_construct_and_connect_irq_plug(virq, hw); |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 4e5655624ae8..9dd63c5d11a8 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -102,7 +102,7 @@ static void spider_ack_irq(unsigned int virq) | |||
102 | 102 | ||
103 | /* Reset edge detection logic if necessary | 103 | /* Reset edge detection logic if necessary |
104 | */ | 104 | */ |
105 | if (get_irq_desc(virq)->status & IRQ_LEVEL) | 105 | if (irq_to_desc(virq)->status & IRQ_LEVEL) |
106 | return; | 106 | return; |
107 | 107 | ||
108 | /* Only interrupts 47 to 50 can be set to edge */ | 108 | /* Only interrupts 47 to 50 can be set to edge */ |
@@ -119,7 +119,7 @@ static int spider_set_irq_type(unsigned int virq, unsigned int type) | |||
119 | struct spider_pic *pic = spider_virq_to_pic(virq); | 119 | struct spider_pic *pic = spider_virq_to_pic(virq); |
120 | unsigned int hw = irq_map[virq].hwirq; | 120 | unsigned int hw = irq_map[virq].hwirq; |
121 | void __iomem *cfg = spider_get_irq_config(pic, hw); | 121 | void __iomem *cfg = spider_get_irq_config(pic, hw); |
122 | struct irq_desc *desc = get_irq_desc(virq); | 122 | struct irq_desc *desc = irq_to_desc(virq); |
123 | u32 old_mask; | 123 | u32 old_mask; |
124 | u32 ic; | 124 | u32 ic; |
125 | 125 | ||
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 94f444758836..f8446ea31189 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -214,7 +214,7 @@ void __init iSeries_activate_IRQs() | |||
214 | unsigned long flags; | 214 | unsigned long flags; |
215 | 215 | ||
216 | for_each_irq (irq) { | 216 | for_each_irq (irq) { |
217 | struct irq_desc *desc = get_irq_desc(irq); | 217 | struct irq_desc *desc = irq_to_desc(irq); |
218 | 218 | ||
219 | if (desc && desc->chip && desc->chip->startup) { | 219 | if (desc && desc->chip && desc->chip->startup) { |
220 | spin_lock_irqsave(&desc->lock, flags); | 220 | spin_lock_irqsave(&desc->lock, flags); |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index d212006a5b3c..484d21e55c61 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -152,12 +152,12 @@ static unsigned int pmac_startup_irq(unsigned int virq) | |||
152 | unsigned long bit = 1UL << (src & 0x1f); | 152 | unsigned long bit = 1UL << (src & 0x1f); |
153 | int i = src >> 5; | 153 | int i = src >> 5; |
154 | 154 | ||
155 | spin_lock_irqsave(&pmac_pic_lock, flags); | 155 | spin_lock_irqsave(&pmac_pic_lock, flags); |
156 | if ((irq_desc[virq].status & IRQ_LEVEL) == 0) | 156 | if ((irq_to_desc(virq)->status & IRQ_LEVEL) == 0) |
157 | out_le32(&pmac_irq_hw[i]->ack, bit); | 157 | out_le32(&pmac_irq_hw[i]->ack, bit); |
158 | __set_bit(src, ppc_cached_irq_mask); | 158 | __set_bit(src, ppc_cached_irq_mask); |
159 | __pmac_set_irq_mask(src, 0); | 159 | __pmac_set_irq_mask(src, 0); |
160 | spin_unlock_irqrestore(&pmac_pic_lock, flags); | 160 | spin_unlock_irqrestore(&pmac_pic_lock, flags); |
161 | 161 | ||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
@@ -285,7 +285,7 @@ static int pmac_pic_host_match(struct irq_host *h, struct device_node *node) | |||
285 | static int pmac_pic_host_map(struct irq_host *h, unsigned int virq, | 285 | static int pmac_pic_host_map(struct irq_host *h, unsigned int virq, |
286 | irq_hw_number_t hw) | 286 | irq_hw_number_t hw) |
287 | { | 287 | { |
288 | struct irq_desc *desc = get_irq_desc(virq); | 288 | struct irq_desc *desc = irq_to_desc(virq); |
289 | int level; | 289 | int level; |
290 | 290 | ||
291 | if (hw >= max_irqs) | 291 | if (hw >= max_irqs) |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 419f8a637ffe..75935ae1a941 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -156,7 +156,7 @@ static int get_irq_server(unsigned int virq, unsigned int strict_check) | |||
156 | cpumask_t cpumask; | 156 | cpumask_t cpumask; |
157 | cpumask_t tmp = CPU_MASK_NONE; | 157 | cpumask_t tmp = CPU_MASK_NONE; |
158 | 158 | ||
159 | cpumask_copy(&cpumask, irq_desc[virq].affinity); | 159 | cpumask_copy(&cpumask, irq_to_desc(virq)->affinity); |
160 | if (!distribute_irqs) | 160 | if (!distribute_irqs) |
161 | return default_server; | 161 | return default_server; |
162 | 162 | ||
@@ -419,7 +419,7 @@ static int xics_host_map(struct irq_host *h, unsigned int virq, | |||
419 | /* Insert the interrupt mapping into the radix tree for fast lookup */ | 419 | /* Insert the interrupt mapping into the radix tree for fast lookup */ |
420 | irq_radix_revmap_insert(xics_host, virq, hw); | 420 | irq_radix_revmap_insert(xics_host, virq, hw); |
421 | 421 | ||
422 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 422 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
423 | set_irq_chip_and_handler(virq, xics_irq_chip, handle_fasteoi_irq); | 423 | set_irq_chip_and_handler(virq, xics_irq_chip, handle_fasteoi_irq); |
424 | return 0; | 424 | return 0; |
425 | } | 425 | } |
@@ -843,7 +843,7 @@ void xics_migrate_irqs_away(void) | |||
843 | /* We need to get IPIs still. */ | 843 | /* We need to get IPIs still. */ |
844 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 844 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) |
845 | continue; | 845 | continue; |
846 | desc = get_irq_desc(virq); | 846 | desc = irq_to_desc(virq); |
847 | 847 | ||
848 | /* We only need to migrate enabled IRQS */ | 848 | /* We only need to migrate enabled IRQS */ |
849 | if (desc == NULL || desc->chip == NULL | 849 | if (desc == NULL || desc->chip == NULL |
@@ -872,7 +872,7 @@ void xics_migrate_irqs_away(void) | |||
872 | virq, cpu); | 872 | virq, cpu); |
873 | 873 | ||
874 | /* Reset affinity to all cpus */ | 874 | /* Reset affinity to all cpus */ |
875 | cpumask_setall(irq_desc[virq].affinity); | 875 | cpumask_setall(irq_to_desc(virq)->affinity); |
876 | desc->chip->set_affinity(virq, cpu_all_mask); | 876 | desc->chip->set_affinity(virq, cpu_all_mask); |
877 | unlock: | 877 | unlock: |
878 | spin_unlock_irqrestore(&desc->lock, flags); | 878 | spin_unlock_irqrestore(&desc->lock, flags); |
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index 82424cd7e128..523537300ad5 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch/powerpc/sysdev/cpm1.c | |||
@@ -102,7 +102,7 @@ static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, | |||
102 | { | 102 | { |
103 | pr_debug("cpm_pic_host_map(%d, 0x%lx)\n", virq, hw); | 103 | pr_debug("cpm_pic_host_map(%d, 0x%lx)\n", virq, hw); |
104 | 104 | ||
105 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 105 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
106 | set_irq_chip_and_handler(virq, &cpm_pic, handle_fasteoi_irq); | 106 | set_irq_chip_and_handler(virq, &cpm_pic, handle_fasteoi_irq); |
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index 78f1f7cca0a0..722cf72e190d 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
@@ -115,11 +115,13 @@ static void cpm2_ack(unsigned int virq) | |||
115 | 115 | ||
116 | static void cpm2_end_irq(unsigned int virq) | 116 | static void cpm2_end_irq(unsigned int virq) |
117 | { | 117 | { |
118 | struct irq_desc *desc; | ||
118 | int bit, word; | 119 | int bit, word; |
119 | unsigned int irq_nr = virq_to_hw(virq); | 120 | unsigned int irq_nr = virq_to_hw(virq); |
120 | 121 | ||
121 | if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)) | 122 | desc = irq_to_desc(irq_nr); |
122 | && irq_desc[irq_nr].action) { | 123 | if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)) |
124 | && desc->action) { | ||
123 | 125 | ||
124 | bit = irq_to_siubit[irq_nr]; | 126 | bit = irq_to_siubit[irq_nr]; |
125 | word = irq_to_siureg[irq_nr]; | 127 | word = irq_to_siureg[irq_nr]; |
@@ -138,7 +140,7 @@ static void cpm2_end_irq(unsigned int virq) | |||
138 | static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type) | 140 | static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type) |
139 | { | 141 | { |
140 | unsigned int src = virq_to_hw(virq); | 142 | unsigned int src = virq_to_hw(virq); |
141 | struct irq_desc *desc = get_irq_desc(virq); | 143 | struct irq_desc *desc = irq_to_desc(virq); |
142 | unsigned int vold, vnew, edibit; | 144 | unsigned int vold, vnew, edibit; |
143 | 145 | ||
144 | if (flow_type == IRQ_TYPE_NONE) | 146 | if (flow_type == IRQ_TYPE_NONE) |
@@ -210,7 +212,7 @@ static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, | |||
210 | { | 212 | { |
211 | pr_debug("cpm2_pic_host_map(%d, 0x%lx)\n", virq, hw); | 213 | pr_debug("cpm2_pic_host_map(%d, 0x%lx)\n", virq, hw); |
212 | 214 | ||
213 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 215 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
214 | set_irq_chip_and_handler(virq, &cpm2_pic, handle_level_irq); | 216 | set_irq_chip_and_handler(virq, &cpm2_pic, handle_level_irq); |
215 | return 0; | 217 | return 0; |
216 | } | 218 | } |
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index da38a1ff97bb..7174374f90ff 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -55,7 +55,7 @@ static int fsl_msi_host_map(struct irq_host *h, unsigned int virq, | |||
55 | { | 55 | { |
56 | struct irq_chip *chip = &fsl_msi_chip; | 56 | struct irq_chip *chip = &fsl_msi_chip; |
57 | 57 | ||
58 | get_irq_desc(virq)->status |= IRQ_TYPE_EDGE_FALLING; | 58 | irq_to_desc(virq)->status |= IRQ_TYPE_EDGE_FALLING; |
59 | 59 | ||
60 | set_irq_chip_and_handler(virq, chip, handle_edge_irq); | 60 | set_irq_chip_and_handler(virq, chip, handle_edge_irq); |
61 | 61 | ||
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index a96584ab33dd..78ed945453db 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -175,12 +175,12 @@ static int i8259_host_map(struct irq_host *h, unsigned int virq, | |||
175 | 175 | ||
176 | /* We block the internal cascade */ | 176 | /* We block the internal cascade */ |
177 | if (hw == 2) | 177 | if (hw == 2) |
178 | get_irq_desc(virq)->status |= IRQ_NOREQUEST; | 178 | irq_to_desc(virq)->status |= IRQ_NOREQUEST; |
179 | 179 | ||
180 | /* We use the level handler only for now, we might want to | 180 | /* We use the level handler only for now, we might want to |
181 | * be more cautious here but that works for now | 181 | * be more cautious here but that works for now |
182 | */ | 182 | */ |
183 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 183 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
184 | set_irq_chip_and_handler(virq, &i8259_pic, handle_level_irq); | 184 | set_irq_chip_and_handler(virq, &i8259_pic, handle_level_irq); |
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index cb7689c4bfbd..f042c1d69002 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -605,7 +605,7 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
605 | { | 605 | { |
606 | struct ipic *ipic = ipic_from_irq(virq); | 606 | struct ipic *ipic = ipic_from_irq(virq); |
607 | unsigned int src = ipic_irq_to_hw(virq); | 607 | unsigned int src = ipic_irq_to_hw(virq); |
608 | struct irq_desc *desc = get_irq_desc(virq); | 608 | struct irq_desc *desc = irq_to_desc(virq); |
609 | unsigned int vold, vnew, edibit; | 609 | unsigned int vold, vnew, edibit; |
610 | 610 | ||
611 | if (flow_type == IRQ_TYPE_NONE) | 611 | if (flow_type == IRQ_TYPE_NONE) |
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index 5d2d5522ef41..01179587df2a 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
@@ -72,7 +72,7 @@ static void mpc8xx_end_irq(unsigned int virq) | |||
72 | 72 | ||
73 | static int mpc8xx_set_irq_type(unsigned int virq, unsigned int flow_type) | 73 | static int mpc8xx_set_irq_type(unsigned int virq, unsigned int flow_type) |
74 | { | 74 | { |
75 | struct irq_desc *desc = get_irq_desc(virq); | 75 | struct irq_desc *desc = irq_to_desc(virq); |
76 | 76 | ||
77 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | 77 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); |
78 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | 78 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 30c44e6b0413..4fd57ab956bf 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -572,7 +572,7 @@ static int irq_choose_cpu(unsigned int virt_irq) | |||
572 | cpumask_t mask; | 572 | cpumask_t mask; |
573 | int cpuid; | 573 | int cpuid; |
574 | 574 | ||
575 | cpumask_copy(&mask, irq_desc[virt_irq].affinity); | 575 | cpumask_copy(&mask, irq_to_desc(virt_irq)->affinity); |
576 | if (cpus_equal(mask, CPU_MASK_ALL)) { | 576 | if (cpus_equal(mask, CPU_MASK_ALL)) { |
577 | static int irq_rover; | 577 | static int irq_rover; |
578 | static DEFINE_SPINLOCK(irq_rover_lock); | 578 | static DEFINE_SPINLOCK(irq_rover_lock); |
@@ -621,7 +621,7 @@ static struct mpic *mpic_find(unsigned int irq) | |||
621 | if (irq < NUM_ISA_INTERRUPTS) | 621 | if (irq < NUM_ISA_INTERRUPTS) |
622 | return NULL; | 622 | return NULL; |
623 | 623 | ||
624 | return irq_desc[irq].chip_data; | 624 | return irq_to_desc(irq)->chip_data; |
625 | } | 625 | } |
626 | 626 | ||
627 | /* Determine if the linux irq is an IPI */ | 627 | /* Determine if the linux irq is an IPI */ |
@@ -648,14 +648,14 @@ static inline u32 mpic_physmask(u32 cpumask) | |||
648 | /* Get the mpic structure from the IPI number */ | 648 | /* Get the mpic structure from the IPI number */ |
649 | static inline struct mpic * mpic_from_ipi(unsigned int ipi) | 649 | static inline struct mpic * mpic_from_ipi(unsigned int ipi) |
650 | { | 650 | { |
651 | return irq_desc[ipi].chip_data; | 651 | return irq_to_desc(ipi)->chip_data; |
652 | } | 652 | } |
653 | #endif | 653 | #endif |
654 | 654 | ||
655 | /* Get the mpic structure from the irq number */ | 655 | /* Get the mpic structure from the irq number */ |
656 | static inline struct mpic * mpic_from_irq(unsigned int irq) | 656 | static inline struct mpic * mpic_from_irq(unsigned int irq) |
657 | { | 657 | { |
658 | return irq_desc[irq].chip_data; | 658 | return irq_to_desc(irq)->chip_data; |
659 | } | 659 | } |
660 | 660 | ||
661 | /* Send an EOI */ | 661 | /* Send an EOI */ |
@@ -735,7 +735,7 @@ static void mpic_unmask_ht_irq(unsigned int irq) | |||
735 | 735 | ||
736 | mpic_unmask_irq(irq); | 736 | mpic_unmask_irq(irq); |
737 | 737 | ||
738 | if (irq_desc[irq].status & IRQ_LEVEL) | 738 | if (irq_to_desc(irq)->status & IRQ_LEVEL) |
739 | mpic_ht_end_irq(mpic, src); | 739 | mpic_ht_end_irq(mpic, src); |
740 | } | 740 | } |
741 | 741 | ||
@@ -745,7 +745,7 @@ static unsigned int mpic_startup_ht_irq(unsigned int irq) | |||
745 | unsigned int src = mpic_irq_to_hw(irq); | 745 | unsigned int src = mpic_irq_to_hw(irq); |
746 | 746 | ||
747 | mpic_unmask_irq(irq); | 747 | mpic_unmask_irq(irq); |
748 | mpic_startup_ht_interrupt(mpic, src, irq_desc[irq].status); | 748 | mpic_startup_ht_interrupt(mpic, src, irq_to_desc(irq)->status); |
749 | 749 | ||
750 | return 0; | 750 | return 0; |
751 | } | 751 | } |
@@ -755,7 +755,7 @@ static void mpic_shutdown_ht_irq(unsigned int irq) | |||
755 | struct mpic *mpic = mpic_from_irq(irq); | 755 | struct mpic *mpic = mpic_from_irq(irq); |
756 | unsigned int src = mpic_irq_to_hw(irq); | 756 | unsigned int src = mpic_irq_to_hw(irq); |
757 | 757 | ||
758 | mpic_shutdown_ht_interrupt(mpic, src, irq_desc[irq].status); | 758 | mpic_shutdown_ht_interrupt(mpic, src, irq_to_desc(irq)->status); |
759 | mpic_mask_irq(irq); | 759 | mpic_mask_irq(irq); |
760 | } | 760 | } |
761 | 761 | ||
@@ -772,7 +772,7 @@ static void mpic_end_ht_irq(unsigned int irq) | |||
772 | * latched another edge interrupt coming in anyway | 772 | * latched another edge interrupt coming in anyway |
773 | */ | 773 | */ |
774 | 774 | ||
775 | if (irq_desc[irq].status & IRQ_LEVEL) | 775 | if (irq_to_desc(irq)->status & IRQ_LEVEL) |
776 | mpic_ht_end_irq(mpic, src); | 776 | mpic_ht_end_irq(mpic, src); |
777 | mpic_eoi(mpic); | 777 | mpic_eoi(mpic); |
778 | } | 778 | } |
@@ -856,7 +856,7 @@ int mpic_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
856 | { | 856 | { |
857 | struct mpic *mpic = mpic_from_irq(virq); | 857 | struct mpic *mpic = mpic_from_irq(virq); |
858 | unsigned int src = mpic_irq_to_hw(virq); | 858 | unsigned int src = mpic_irq_to_hw(virq); |
859 | struct irq_desc *desc = get_irq_desc(virq); | 859 | struct irq_desc *desc = irq_to_desc(virq); |
860 | unsigned int vecpri, vold, vnew; | 860 | unsigned int vecpri, vold, vnew; |
861 | 861 | ||
862 | DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n", | 862 | DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n", |
diff --git a/arch/powerpc/sysdev/mv64x60_pic.c b/arch/powerpc/sysdev/mv64x60_pic.c index 2aa4ed066db1..485b92477d7c 100644 --- a/arch/powerpc/sysdev/mv64x60_pic.c +++ b/arch/powerpc/sysdev/mv64x60_pic.c | |||
@@ -213,7 +213,7 @@ static int mv64x60_host_map(struct irq_host *h, unsigned int virq, | |||
213 | { | 213 | { |
214 | int level1; | 214 | int level1; |
215 | 215 | ||
216 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 216 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
217 | 217 | ||
218 | level1 = (hwirq & MV64x60_LEVEL1_MASK) >> MV64x60_LEVEL1_OFFSET; | 218 | level1 = (hwirq & MV64x60_LEVEL1_MASK) >> MV64x60_LEVEL1_OFFSET; |
219 | BUG_ON(level1 > MV64x60_LEVEL1_GPP); | 219 | BUG_ON(level1 > MV64x60_LEVEL1_GPP); |
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 3faa42e03a85..fc098744ad82 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c | |||
@@ -189,7 +189,7 @@ static inline void qe_ic_write(volatile __be32 __iomem * base, unsigned int reg | |||
189 | 189 | ||
190 | static inline struct qe_ic *qe_ic_from_irq(unsigned int virq) | 190 | static inline struct qe_ic *qe_ic_from_irq(unsigned int virq) |
191 | { | 191 | { |
192 | return irq_desc[virq].chip_data; | 192 | return irq_to_desc(virq)->chip_data; |
193 | } | 193 | } |
194 | 194 | ||
195 | #define virq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq) | 195 | #define virq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq) |
@@ -263,7 +263,7 @@ static int qe_ic_host_map(struct irq_host *h, unsigned int virq, | |||
263 | chip = &qe_ic->hc_irq; | 263 | chip = &qe_ic->hc_irq; |
264 | 264 | ||
265 | set_irq_chip_data(virq, qe_ic); | 265 | set_irq_chip_data(virq, qe_ic); |
266 | get_irq_desc(virq)->status |= IRQ_LEVEL; | 266 | irq_to_desc(virq)->status |= IRQ_LEVEL; |
267 | 267 | ||
268 | set_irq_chip_and_handler(virq, chip, handle_level_irq); | 268 | set_irq_chip_and_handler(virq, chip, handle_level_irq); |
269 | 269 | ||
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index cf244a419e96..02f600991dce 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -398,7 +398,7 @@ static int pci_irq_host_map(struct irq_host *h, unsigned int virq, | |||
398 | DBG("%s(%d, 0x%lx)\n", __func__, virq, hw); | 398 | DBG("%s(%d, 0x%lx)\n", __func__, virq, hw); |
399 | if ((virq >= 1) && (virq <= 4)){ | 399 | if ((virq >= 1) && (virq <= 4)){ |
400 | irq = virq + IRQ_PCI_INTAD_BASE - 1; | 400 | irq = virq + IRQ_PCI_INTAD_BASE - 1; |
401 | get_irq_desc(irq)->status |= IRQ_LEVEL; | 401 | irq_to_desc(irq)->status |= IRQ_LEVEL; |
402 | set_irq_chip(irq, &tsi108_pci_irq); | 402 | set_irq_chip(irq, &tsi108_pci_irq); |
403 | } | 403 | } |
404 | return 0; | 404 | return 0; |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 466ce9ace127..cf97935863c8 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -57,7 +57,7 @@ struct uic { | |||
57 | 57 | ||
58 | static void uic_unmask_irq(unsigned int virq) | 58 | static void uic_unmask_irq(unsigned int virq) |
59 | { | 59 | { |
60 | struct irq_desc *desc = get_irq_desc(virq); | 60 | struct irq_desc *desc = irq_to_desc(virq); |
61 | struct uic *uic = get_irq_chip_data(virq); | 61 | struct uic *uic = get_irq_chip_data(virq); |
62 | unsigned int src = uic_irq_to_hw(virq); | 62 | unsigned int src = uic_irq_to_hw(virq); |
63 | unsigned long flags; | 63 | unsigned long flags; |
@@ -101,7 +101,7 @@ static void uic_ack_irq(unsigned int virq) | |||
101 | 101 | ||
102 | static void uic_mask_ack_irq(unsigned int virq) | 102 | static void uic_mask_ack_irq(unsigned int virq) |
103 | { | 103 | { |
104 | struct irq_desc *desc = get_irq_desc(virq); | 104 | struct irq_desc *desc = irq_to_desc(virq); |
105 | struct uic *uic = get_irq_chip_data(virq); | 105 | struct uic *uic = get_irq_chip_data(virq); |
106 | unsigned int src = uic_irq_to_hw(virq); | 106 | unsigned int src = uic_irq_to_hw(virq); |
107 | unsigned long flags; | 107 | unsigned long flags; |
@@ -129,7 +129,7 @@ static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
129 | { | 129 | { |
130 | struct uic *uic = get_irq_chip_data(virq); | 130 | struct uic *uic = get_irq_chip_data(virq); |
131 | unsigned int src = uic_irq_to_hw(virq); | 131 | unsigned int src = uic_irq_to_hw(virq); |
132 | struct irq_desc *desc = get_irq_desc(virq); | 132 | struct irq_desc *desc = irq_to_desc(virq); |
133 | unsigned long flags; | 133 | unsigned long flags; |
134 | int trigger, polarity; | 134 | int trigger, polarity; |
135 | u32 tr, pr, mask; | 135 | u32 tr, pr, mask; |
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c index 40edad520770..ab743718876b 100644 --- a/arch/powerpc/sysdev/xilinx_intc.c +++ b/arch/powerpc/sysdev/xilinx_intc.c | |||
@@ -79,7 +79,7 @@ static void xilinx_intc_mask(unsigned int virq) | |||
79 | 79 | ||
80 | static int xilinx_intc_set_type(unsigned int virq, unsigned int flow_type) | 80 | static int xilinx_intc_set_type(unsigned int virq, unsigned int flow_type) |
81 | { | 81 | { |
82 | struct irq_desc *desc = get_irq_desc(virq); | 82 | struct irq_desc *desc = irq_to_desc(virq); |
83 | 83 | ||
84 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | 84 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); |
85 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | 85 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; |