diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-23 17:09:14 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-03-25 13:45:19 -0400 |
commit | d6d5d5c4afd4c8bb4c5e3753a2141e9c3a874629 (patch) | |
tree | 8cfa9f30269678ae55822a90bb3d2e655dc85126 /arch/mips/sibyte/sb1250 | |
parent | 4d2796f83600bbba8e7170e847226c377c0305af (diff) |
MIPS: Sibyte: Convert to new irq_chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2205/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte/sb1250')
-rw-r--r-- | arch/mips/sibyte/sb1250/irq.c | 53 |
1 files changed, 15 insertions, 38 deletions
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 12ac04a658ee..fd269ea8d8a8 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -43,31 +43,10 @@ | |||
43 | * for interrupt lines | 43 | * for interrupt lines |
44 | */ | 44 | */ |
45 | 45 | ||
46 | |||
47 | static void end_sb1250_irq(unsigned int irq); | ||
48 | static void enable_sb1250_irq(unsigned int irq); | ||
49 | static void disable_sb1250_irq(unsigned int irq); | ||
50 | static void ack_sb1250_irq(unsigned int irq); | ||
51 | #ifdef CONFIG_SMP | ||
52 | static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask); | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_SIBYTE_HAS_LDT | 46 | #ifdef CONFIG_SIBYTE_HAS_LDT |
56 | extern unsigned long ldt_eoi_space; | 47 | extern unsigned long ldt_eoi_space; |
57 | #endif | 48 | #endif |
58 | 49 | ||
59 | static struct irq_chip sb1250_irq_type = { | ||
60 | .name = "SB1250-IMR", | ||
61 | .ack = ack_sb1250_irq, | ||
62 | .mask = disable_sb1250_irq, | ||
63 | .mask_ack = ack_sb1250_irq, | ||
64 | .unmask = enable_sb1250_irq, | ||
65 | .end = end_sb1250_irq, | ||
66 | #ifdef CONFIG_SMP | ||
67 | .set_affinity = sb1250_set_affinity | ||
68 | #endif | ||
69 | }; | ||
70 | |||
71 | /* Store the CPU id (not the logical number) */ | 50 | /* Store the CPU id (not the logical number) */ |
72 | int sb1250_irq_owner[SB1250_NR_IRQS]; | 51 | int sb1250_irq_owner[SB1250_NR_IRQS]; |
73 | 52 | ||
@@ -102,9 +81,11 @@ void sb1250_unmask_irq(int cpu, int irq) | |||
102 | } | 81 | } |
103 | 82 | ||
104 | #ifdef CONFIG_SMP | 83 | #ifdef CONFIG_SMP |
105 | static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask) | 84 | static int sb1250_set_affinity(struct irq_data *d, const struct cpumask *mask, |
85 | bool force) | ||
106 | { | 86 | { |
107 | int i = 0, old_cpu, cpu, int_on; | 87 | int i = 0, old_cpu, cpu, int_on; |
88 | unsigned int irq = d->irq; | ||
108 | u64 cur_ints; | 89 | u64 cur_ints; |
109 | unsigned long flags; | 90 | unsigned long flags; |
110 | 91 | ||
@@ -142,21 +123,17 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
142 | } | 123 | } |
143 | #endif | 124 | #endif |
144 | 125 | ||
145 | /*****************************************************************************/ | 126 | static void enable_sb1250_irq(struct irq_data *d) |
146 | |||
147 | static void disable_sb1250_irq(unsigned int irq) | ||
148 | { | 127 | { |
149 | sb1250_mask_irq(sb1250_irq_owner[irq], irq); | 128 | unsigned int irq = d->irq; |
150 | } | ||
151 | 129 | ||
152 | static void enable_sb1250_irq(unsigned int irq) | ||
153 | { | ||
154 | sb1250_unmask_irq(sb1250_irq_owner[irq], irq); | 130 | sb1250_unmask_irq(sb1250_irq_owner[irq], irq); |
155 | } | 131 | } |
156 | 132 | ||
157 | 133 | ||
158 | static void ack_sb1250_irq(unsigned int irq) | 134 | static void ack_sb1250_irq(struct irq_data *d) |
159 | { | 135 | { |
136 | unsigned int irq = d->irq; | ||
160 | #ifdef CONFIG_SIBYTE_HAS_LDT | 137 | #ifdef CONFIG_SIBYTE_HAS_LDT |
161 | u64 pending; | 138 | u64 pending; |
162 | 139 | ||
@@ -199,14 +176,14 @@ static void ack_sb1250_irq(unsigned int irq) | |||
199 | sb1250_mask_irq(sb1250_irq_owner[irq], irq); | 176 | sb1250_mask_irq(sb1250_irq_owner[irq], irq); |
200 | } | 177 | } |
201 | 178 | ||
202 | 179 | static struct irq_chip sb1250_irq_type = { | |
203 | static void end_sb1250_irq(unsigned int irq) | 180 | .name = "SB1250-IMR", |
204 | { | 181 | .irq_mask_ack = ack_sb1250_irq, |
205 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { | 182 | .irq_unmask = enable_sb1250_irq, |
206 | sb1250_unmask_irq(sb1250_irq_owner[irq], irq); | 183 | #ifdef CONFIG_SMP |
207 | } | 184 | .irq_set_affinity = sb1250_set_affinity |
208 | } | 185 | #endif |
209 | 186 | }; | |
210 | 187 | ||
211 | void __init init_sb1250_irqs(void) | 188 | void __init init_sb1250_irqs(void) |
212 | { | 189 | { |