aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/hp/sim/hpsim_irq.c6
-rw-r--r--arch/ia64/kernel/iosapic.c14
-rw-r--r--arch/ia64/kernel/irq.c2
-rw-r--r--arch/ia64/kernel/irq_ia64.c2
-rw-r--r--arch/ia64/kernel/mca.c2
-rw-r--r--arch/ia64/kernel/smpboot.c2
-rw-r--r--arch/powerpc/kernel/crash.c2
-rw-r--r--include/linux/irq.h7
-rw-r--r--kernel/irq/migration.c2
9 files changed, 16 insertions, 23 deletions
diff --git a/arch/ia64/hp/sim/hpsim_irq.c b/arch/ia64/hp/sim/hpsim_irq.c
index c0d25a2a3e9..8145547bb52 100644
--- a/arch/ia64/hp/sim/hpsim_irq.c
+++ b/arch/ia64/hp/sim/hpsim_irq.c
@@ -44,8 +44,8 @@ hpsim_irq_init (void)
44 int i; 44 int i;
45 45
46 for (i = 0; i < NR_IRQS; ++i) { 46 for (i = 0; i < NR_IRQS; ++i) {
47 idesc = irq_descp(i); 47 idesc = irq_desc + i;
48 if (idesc->handler == &no_irq_type) 48 if (idesc->chip == &no_irq_type)
49 idesc->handler = &irq_type_hp_sim; 49 idesc->chip = &irq_type_hp_sim;
50 } 50 }
51} 51}
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index abb4cb1c831..efc7df4b0fd 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -456,7 +456,7 @@ iosapic_startup_edge_irq (unsigned int irq)
456static void 456static void
457iosapic_ack_edge_irq (unsigned int irq) 457iosapic_ack_edge_irq (unsigned int irq)
458{ 458{
459 irq_desc_t *idesc = irq_descp(irq); 459 irq_desc_t *idesc = irq_desc + irq;
460 460
461 move_native_irq(irq); 461 move_native_irq(irq);
462 /* 462 /*
@@ -659,7 +659,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
659 else 659 else
660 irq_type = &irq_type_iosapic_level; 660 irq_type = &irq_type_iosapic_level;
661 661
662 idesc = irq_descp(vector); 662 idesc = irq_desc + vector;
663 if (idesc->chip != irq_type) { 663 if (idesc->chip != irq_type) {
664 if (idesc->chip != &no_irq_type) 664 if (idesc->chip != &no_irq_type)
665 printk(KERN_WARNING 665 printk(KERN_WARNING
@@ -793,14 +793,14 @@ again:
793 return -ENOSPC; 793 return -ENOSPC;
794 } 794 }
795 795
796 spin_lock_irqsave(&irq_descp(vector)->lock, flags); 796 spin_lock_irqsave(&irq_desc[vector].lock, flags);
797 spin_lock(&iosapic_lock); 797 spin_lock(&iosapic_lock);
798 { 798 {
799 if (gsi_to_vector(gsi) > 0) { 799 if (gsi_to_vector(gsi) > 0) {
800 if (list_empty(&iosapic_intr_info[vector].rtes)) 800 if (list_empty(&iosapic_intr_info[vector].rtes))
801 free_irq_vector(vector); 801 free_irq_vector(vector);
802 spin_unlock(&iosapic_lock); 802 spin_unlock(&iosapic_lock);
803 spin_unlock_irqrestore(&irq_descp(vector)->lock, 803 spin_unlock_irqrestore(&irq_desc[vector].lock,
804 flags); 804 flags);
805 goto again; 805 goto again;
806 } 806 }
@@ -810,7 +810,7 @@ again:
810 polarity, trigger); 810 polarity, trigger);
811 if (err < 0) { 811 if (err < 0) {
812 spin_unlock(&iosapic_lock); 812 spin_unlock(&iosapic_lock);
813 spin_unlock_irqrestore(&irq_descp(vector)->lock, 813 spin_unlock_irqrestore(&irq_desc[vector].lock,
814 flags); 814 flags);
815 return err; 815 return err;
816 } 816 }
@@ -825,7 +825,7 @@ again:
825 set_rte(gsi, vector, dest, mask); 825 set_rte(gsi, vector, dest, mask);
826 } 826 }
827 spin_unlock(&iosapic_lock); 827 spin_unlock(&iosapic_lock);
828 spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); 828 spin_unlock_irqrestore(&irq_desc[vector].lock, flags);
829 829
830 printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n", 830 printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n",
831 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), 831 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
@@ -860,7 +860,7 @@ iosapic_unregister_intr (unsigned int gsi)
860 } 860 }
861 vector = irq_to_vector(irq); 861 vector = irq_to_vector(irq);
862 862
863 idesc = irq_descp(irq); 863 idesc = irq_desc + irq;
864 spin_lock_irqsave(&idesc->lock, flags); 864 spin_lock_irqsave(&idesc->lock, flags);
865 spin_lock(&iosapic_lock); 865 spin_lock(&iosapic_lock);
866 { 866 {
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index c4e1b3b60b4..7852382de2f 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -120,7 +120,7 @@ static void migrate_irqs(void)
120 int irq, new_cpu; 120 int irq, new_cpu;
121 121
122 for (irq=0; irq < NR_IRQS; irq++) { 122 for (irq=0; irq < NR_IRQS; irq++) {
123 desc = irq_descp(irq); 123 desc = irq_desc + irq;
124 124
125 /* 125 /*
126 * No handling for now. 126 * No handling for now.
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 6d8fc9498ed..f5035304594 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -249,7 +249,7 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action)
249 249
250 for (irq = 0; irq < NR_IRQS; ++irq) 250 for (irq = 0; irq < NR_IRQS; ++irq)
251 if (irq_to_vector(irq) == vec) { 251 if (irq_to_vector(irq) == vec) {
252 desc = irq_descp(irq); 252 desc = irq_desc + irq;
253 desc->status |= IRQ_PER_CPU; 253 desc->status |= IRQ_PER_CPU;
254 desc->chip = &irq_type_ia64_lsapic; 254 desc->chip = &irq_type_ia64_lsapic;
255 if (action) 255 if (action)
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 6a0880639bc..d7dc5e63de6 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1788,7 +1788,7 @@ ia64_mca_late_init(void)
1788 cpe_poll_enabled = 0; 1788 cpe_poll_enabled = 0;
1789 for (irq = 0; irq < NR_IRQS; ++irq) 1789 for (irq = 0; irq < NR_IRQS; ++irq)
1790 if (irq_to_vector(irq) == cpe_vector) { 1790 if (irq_to_vector(irq) == cpe_vector) {
1791 desc = irq_descp(irq); 1791 desc = irq_desc + irq;
1792 desc->status |= IRQ_PER_CPU; 1792 desc->status |= IRQ_PER_CPU;
1793 setup_irq(irq, &mca_cpe_irqaction); 1793 setup_irq(irq, &mca_cpe_irqaction);
1794 ia64_cpe_irq = irq; 1794 ia64_cpe_irq = irq;
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index d6928805559..5203df78f15 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -677,7 +677,7 @@ int migrate_platform_irqs(unsigned int cpu)
677 new_cpei_cpu = any_online_cpu(cpu_online_map); 677 new_cpei_cpu = any_online_cpu(cpu_online_map);
678 mask = cpumask_of_cpu(new_cpei_cpu); 678 mask = cpumask_of_cpu(new_cpei_cpu);
679 set_cpei_target_cpu(new_cpei_cpu); 679 set_cpei_target_cpu(new_cpei_cpu);
680 desc = irq_descp(ia64_cpe_irq); 680 desc = irq_desc + ia64_cpe_irq;
681 /* 681 /*
682 * Switch for now, immediatly, we need to do fake intr 682 * Switch for now, immediatly, we need to do fake intr
683 * as other interrupts, but need to study CPEI behaviour with 683 * as other interrupts, but need to study CPEI behaviour with
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 1bfad7c2f8c..22ceba844bf 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -190,7 +190,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
190 local_irq_disable(); 190 local_irq_disable();
191 191
192 for_each_irq(irq) { 192 for_each_irq(irq) {
193 struct irq_desc *desc = irq_descp(irq); 193 struct irq_desc *desc = irq_desc + irq;
194 194
195 if (desc->status & IRQ_INPROGRESS) 195 if (desc->status & IRQ_INPROGRESS)
196 desc->chip->end(irq); 196 desc->chip->end(irq);
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 6e3ad6245bd..80713d6e8c8 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -87,13 +87,6 @@ typedef struct irq_desc {
87 87
88extern irq_desc_t irq_desc [NR_IRQS]; 88extern irq_desc_t irq_desc [NR_IRQS];
89 89
90/* Return a pointer to the irq descriptor for IRQ. */
91static inline irq_desc_t *
92irq_descp (int irq)
93{
94 return irq_desc + irq;
95}
96
97#include <asm/hw_irq.h> /* the arch dependent stuff */ 90#include <asm/hw_irq.h> /* the arch dependent stuff */
98 91
99extern int setup_irq(unsigned int irq, struct irqaction * new); 92extern int setup_irq(unsigned int irq, struct irqaction * new);
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index d978c87bca9..b4a4354d03d 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -15,7 +15,7 @@ void set_pending_irq(unsigned int irq, cpumask_t mask)
15void move_native_irq(int irq) 15void move_native_irq(int irq)
16{ 16{
17 cpumask_t tmp; 17 cpumask_t tmp;
18 irq_desc_t *desc = irq_descp(irq); 18 irq_desc_t *desc = irq_desc + irq;
19 19
20 if (likely(!desc->move_irq)) 20 if (likely(!desc->move_irq))
21 return; 21 return;