diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-29 05:24:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:22 -0400 |
commit | 34ffdb7233d5847808d2b63ca6761dac3af9c942 (patch) | |
tree | 3eb73aae034729eac24f7f2ee809ba913b32a51b | |
parent | 06fcb0c6fb3aae9570a32ac3b72a8222563baa69 (diff) |
[PATCH] genirq: cleanup: reduce irq_desc_t use, mark it obsolete
Cleanup: remove irq_desc_t use from the generic IRQ code, and mark it
obsolete.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/linux/irq.h | 18 | ||||
-rw-r--r-- | kernel/irq/autoprobe.c | 6 | ||||
-rw-r--r-- | kernel/irq/handle.c | 4 | ||||
-rw-r--r-- | kernel/irq/manage.c | 6 | ||||
-rw-r--r-- | kernel/irq/migration.c | 4 | ||||
-rw-r--r-- | kernel/irq/spurious.c | 9 |
6 files changed, 28 insertions, 19 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 92c685414622..9ce276a2374a 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -68,7 +68,7 @@ typedef struct hw_interrupt_type hw_irq_controller; | |||
68 | * | 68 | * |
69 | * Pad this out to 32 bytes for cache and indexing reasons. | 69 | * Pad this out to 32 bytes for cache and indexing reasons. |
70 | */ | 70 | */ |
71 | typedef struct irq_desc { | 71 | struct irq_desc { |
72 | hw_irq_controller *chip; | 72 | hw_irq_controller *chip; |
73 | void *chip_data; | 73 | void *chip_data; |
74 | struct irqaction *action; /* IRQ action list */ | 74 | struct irqaction *action; /* IRQ action list */ |
@@ -83,11 +83,19 @@ typedef struct irq_desc { | |||
83 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) | 83 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) |
84 | unsigned int move_irq; /* Flag need to re-target intr dest*/ | 84 | unsigned int move_irq; /* Flag need to re-target intr dest*/ |
85 | #endif | 85 | #endif |
86 | } ____cacheline_aligned irq_desc_t; | 86 | } ____cacheline_aligned; |
87 | 87 | ||
88 | extern irq_desc_t irq_desc [NR_IRQS]; | 88 | extern struct irq_desc irq_desc[NR_IRQS]; |
89 | 89 | ||
90 | #include <asm/hw_irq.h> /* the arch dependent stuff */ | 90 | /* |
91 | * Migration helpers for obsolete names, they will go away: | ||
92 | */ | ||
93 | typedef struct irq_desc irq_desc_t; | ||
94 | |||
95 | /* | ||
96 | * Pick up the arch-dependent methods: | ||
97 | */ | ||
98 | #include <asm/hw_irq.h> | ||
91 | 99 | ||
92 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 100 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
93 | 101 | ||
@@ -188,7 +196,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | |||
188 | */ | 196 | */ |
189 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); | 197 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); |
190 | 198 | ||
191 | extern void note_interrupt(unsigned int irq, irq_desc_t *desc, | 199 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, |
192 | int action_ret, struct pt_regs *regs); | 200 | int action_ret, struct pt_regs *regs); |
193 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); | 201 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); |
194 | 202 | ||
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index d6eab98a3173..5c988bba401f 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c | |||
@@ -27,8 +27,8 @@ static DEFINE_MUTEX(probing_active); | |||
27 | */ | 27 | */ |
28 | unsigned long probe_irq_on(void) | 28 | unsigned long probe_irq_on(void) |
29 | { | 29 | { |
30 | struct irq_desc *desc; | ||
30 | unsigned long mask; | 31 | unsigned long mask; |
31 | irq_desc_t *desc; | ||
32 | unsigned int i; | 32 | unsigned int i; |
33 | 33 | ||
34 | mutex_lock(&probing_active); | 34 | mutex_lock(&probing_active); |
@@ -116,7 +116,7 @@ unsigned int probe_irq_mask(unsigned long val) | |||
116 | 116 | ||
117 | mask = 0; | 117 | mask = 0; |
118 | for (i = 0; i < NR_IRQS; i++) { | 118 | for (i = 0; i < NR_IRQS; i++) { |
119 | irq_desc_t *desc = irq_desc + i; | 119 | struct irq_desc *desc = irq_desc + i; |
120 | unsigned int status; | 120 | unsigned int status; |
121 | 121 | ||
122 | spin_lock_irq(&desc->lock); | 122 | spin_lock_irq(&desc->lock); |
@@ -159,7 +159,7 @@ int probe_irq_off(unsigned long val) | |||
159 | int i, irq_found = 0, nr_irqs = 0; | 159 | int i, irq_found = 0, nr_irqs = 0; |
160 | 160 | ||
161 | for (i = 0; i < NR_IRQS; i++) { | 161 | for (i = 0; i < NR_IRQS; i++) { |
162 | irq_desc_t *desc = irq_desc + i; | 162 | struct irq_desc *desc = irq_desc + i; |
163 | unsigned int status; | 163 | unsigned int status; |
164 | 164 | ||
165 | spin_lock_irq(&desc->lock); | 165 | spin_lock_irq(&desc->lock); |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index f9c33a86cbdf..8eda1005d10a 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * | 28 | * |
29 | * Controller mappings for all interrupt sources: | 29 | * Controller mappings for all interrupt sources: |
30 | */ | 30 | */ |
31 | irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { | 31 | struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = { |
32 | [0 ... NR_IRQS-1] = { | 32 | [0 ... NR_IRQS-1] = { |
33 | .status = IRQ_DISABLED, | 33 | .status = IRQ_DISABLED, |
34 | .chip = &no_irq_type, | 34 | .chip = &no_irq_type, |
@@ -110,7 +110,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | |||
110 | */ | 110 | */ |
111 | fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs) | 111 | fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs) |
112 | { | 112 | { |
113 | irq_desc_t *desc = irq_desc + irq; | 113 | struct irq_desc *desc = irq_desc + irq; |
114 | struct irqaction *action; | 114 | struct irqaction *action; |
115 | unsigned int status; | 115 | unsigned int status; |
116 | 116 | ||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 261906ebdf04..6a6f1d3dd399 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(synchronize_irq); | |||
57 | */ | 57 | */ |
58 | void disable_irq_nosync(unsigned int irq) | 58 | void disable_irq_nosync(unsigned int irq) |
59 | { | 59 | { |
60 | irq_desc_t *desc = irq_desc + irq; | 60 | struct irq_desc *desc = irq_desc + irq; |
61 | unsigned long flags; | 61 | unsigned long flags; |
62 | 62 | ||
63 | if (irq >= NR_IRQS) | 63 | if (irq >= NR_IRQS) |
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(disable_irq_nosync); | |||
86 | */ | 86 | */ |
87 | void disable_irq(unsigned int irq) | 87 | void disable_irq(unsigned int irq) |
88 | { | 88 | { |
89 | irq_desc_t *desc = irq_desc + irq; | 89 | struct irq_desc *desc = irq_desc + irq; |
90 | 90 | ||
91 | if (irq >= NR_IRQS) | 91 | if (irq >= NR_IRQS) |
92 | return; | 92 | return; |
@@ -109,7 +109,7 @@ EXPORT_SYMBOL(disable_irq); | |||
109 | */ | 109 | */ |
110 | void enable_irq(unsigned int irq) | 110 | void enable_irq(unsigned int irq) |
111 | { | 111 | { |
112 | irq_desc_t *desc = irq_desc + irq; | 112 | struct irq_desc *desc = irq_desc + irq; |
113 | unsigned long flags; | 113 | unsigned long flags; |
114 | 114 | ||
115 | if (irq >= NR_IRQS) | 115 | if (irq >= NR_IRQS) |
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index b4a4354d03d5..a571c3abb793 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | void set_pending_irq(unsigned int irq, cpumask_t mask) | 4 | void set_pending_irq(unsigned int irq, cpumask_t mask) |
5 | { | 5 | { |
6 | irq_desc_t *desc = irq_desc + irq; | 6 | struct irq_desc *desc = irq_desc + irq; |
7 | unsigned long flags; | 7 | unsigned long flags; |
8 | 8 | ||
9 | spin_lock_irqsave(&desc->lock, flags); | 9 | spin_lock_irqsave(&desc->lock, flags); |
@@ -14,8 +14,8 @@ void set_pending_irq(unsigned int irq, cpumask_t mask) | |||
14 | 14 | ||
15 | void move_native_irq(int irq) | 15 | void move_native_irq(int irq) |
16 | { | 16 | { |
17 | struct irq_desc *desc = irq_desc + irq; | ||
17 | cpumask_t tmp; | 18 | cpumask_t tmp; |
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; |
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 5eae7bf3c347..3a0a62123301 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -99,7 +99,8 @@ static int misrouted_irq(int irq, struct pt_regs *regs) | |||
99 | */ | 99 | */ |
100 | 100 | ||
101 | static void | 101 | static void |
102 | __report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret) | 102 | __report_bad_irq(unsigned int irq, struct irq_desc *desc, |
103 | irqreturn_t action_ret) | ||
103 | { | 104 | { |
104 | struct irqaction *action; | 105 | struct irqaction *action; |
105 | 106 | ||
@@ -124,7 +125,7 @@ __report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret) | |||
124 | } | 125 | } |
125 | 126 | ||
126 | static void | 127 | static void |
127 | report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret) | 128 | report_bad_irq(unsigned int irq, struct irq_desc *desc, irqreturn_t action_ret) |
128 | { | 129 | { |
129 | static int count = 100; | 130 | static int count = 100; |
130 | 131 | ||
@@ -134,8 +135,8 @@ report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret) | |||
134 | } | 135 | } |
135 | } | 136 | } |
136 | 137 | ||
137 | void note_interrupt(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret, | 138 | void note_interrupt(unsigned int irq, struct irq_desc *desc, |
138 | struct pt_regs *regs) | 139 | irqreturn_t action_ret, struct pt_regs *regs) |
139 | { | 140 | { |
140 | if (unlikely(action_ret != IRQ_HANDLED)) { | 141 | if (unlikely(action_ret != IRQ_HANDLED)) { |
141 | desc->irqs_unhandled++; | 142 | desc->irqs_unhandled++; |