Skip to content

Commit a036802

Browse files
author
Rob Herring
committed
ARM: remove mach .handle_irq for VIC users
Now that the VIC initialization sets up the handle_arch_irq pointer, we can remove it for all machines and make it static. Move vic_handle_irq to avoid a forward declaration. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Hubert Feurstein <hubert.feurstein@contec.at> Cc: Alessandro Rubini <rubini@unipv.it> Cc: STEricsson <STEricsson_nomadik_linux@list.st.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Shiraz Hashim <shiraz.hashim@st.com> Cc: Rajeev Kumar <rajeev-dlh.kumar@st.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent 7fb7d8a commit a036802

41 files changed

Lines changed: 36 additions & 87 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/common/vic.c‎

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ static struct vic_device vic_devices[CONFIG_ARM_VIC_NR];
8383

8484
static int vic_id;
8585

86+
static void vic_handle_irq(struct pt_regs *regs);
87+
8688
/**
8789
* vic_init2 - common initialisation code
8890
* @base: Base of the VIC.
@@ -199,6 +201,40 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
199201
return 0;
200202
}
201203

204+
/*
205+
* Handle each interrupt in a single VIC. Returns non-zero if we've
206+
* handled at least one interrupt. This reads the status register
207+
* before handling each interrupt, which is necessary given that
208+
* handle_IRQ may briefly re-enable interrupts for soft IRQ handling.
209+
*/
210+
static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
211+
{
212+
u32 stat, irq;
213+
int handled = 0;
214+
215+
while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) {
216+
irq = ffs(stat) - 1;
217+
handle_IRQ(irq_find_mapping(vic->domain, irq), regs);
218+
handled = 1;
219+
}
220+
221+
return handled;
222+
}
223+
224+
/*
225+
* Keep iterating over all registered VIC's until there are no pending
226+
* interrupts.
227+
*/
228+
static asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs)
229+
{
230+
int i, handled;
231+
232+
do {
233+
for (i = 0, handled = 0; i < vic_id; ++i)
234+
handled |= handle_one_vic(&vic_devices[i], regs);
235+
} while (handled);
236+
}
237+
202238
static struct irq_domain_ops vic_irqdomain_ops = {
203239
.map = vic_irqdomain_map,
204240
.xlate = irq_domain_xlate_onetwocell,
@@ -446,37 +482,3 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
446482
return 0;
447483
}
448484
#endif /* CONFIG OF */
449-
450-
/*
451-
* Handle each interrupt in a single VIC. Returns non-zero if we've
452-
* handled at least one interrupt. This reads the status register
453-
* before handling each interrupt, which is necessary given that
454-
* handle_IRQ may briefly re-enable interrupts for soft IRQ handling.
455-
*/
456-
static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
457-
{
458-
u32 stat, irq;
459-
int handled = 0;
460-
461-
while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) {
462-
irq = ffs(stat) - 1;
463-
handle_IRQ(irq_find_mapping(vic->domain, irq), regs);
464-
handled = 1;
465-
}
466-
467-
return handled;
468-
}
469-
470-
/*
471-
* Keep iterating over all registered VIC's until there are no pending
472-
* interrupts.
473-
*/
474-
asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs)
475-
{
476-
int i, handled;
477-
478-
do {
479-
for (i = 0, handled = 0; i < vic_id; ++i)
480-
handled |= handle_one_vic(&vic_devices[i], regs);
481-
} while (handled);
482-
}

‎arch/arm/include/asm/hardware/vic.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ void __vic_init(void __iomem *base, int irq_start, u32 vic_sources,
3333
u32 resume_sources, struct device_node *node);
3434
void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
3535
int vic_of_init(struct device_node *node, struct device_node *parent);
36-
void vic_handle_irq(struct pt_regs *regs);
3736

3837
#endif

‎arch/arm/mach-ep93xx/adssphere.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
3939
.atag_offset = 0x100,
4040
.map_io = ep93xx_map_io,
4141
.init_irq = ep93xx_init_irq,
42-
.handle_irq = vic_handle_irq,
4342
.timer = &ep93xx_timer,
4443
.init_machine = adssphere_init_machine,
4544
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/edb93xx.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
276276
.atag_offset = 0x100,
277277
.map_io = ep93xx_map_io,
278278
.init_irq = ep93xx_init_irq,
279-
.handle_irq = vic_handle_irq,
280279
.timer = &ep93xx_timer,
281280
.init_machine = edb93xx_init_machine,
282281
.init_late = ep93xx_init_late,
@@ -290,7 +289,6 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
290289
.atag_offset = 0x100,
291290
.map_io = ep93xx_map_io,
292291
.init_irq = ep93xx_init_irq,
293-
.handle_irq = vic_handle_irq,
294292
.timer = &ep93xx_timer,
295293
.init_machine = edb93xx_init_machine,
296294
.init_late = ep93xx_init_late,
@@ -304,7 +302,6 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
304302
.atag_offset = 0x100,
305303
.map_io = ep93xx_map_io,
306304
.init_irq = ep93xx_init_irq,
307-
.handle_irq = vic_handle_irq,
308305
.timer = &ep93xx_timer,
309306
.init_machine = edb93xx_init_machine,
310307
.init_late = ep93xx_init_late,
@@ -318,7 +315,6 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
318315
.atag_offset = 0x100,
319316
.map_io = ep93xx_map_io,
320317
.init_irq = ep93xx_init_irq,
321-
.handle_irq = vic_handle_irq,
322318
.timer = &ep93xx_timer,
323319
.init_machine = edb93xx_init_machine,
324320
.init_late = ep93xx_init_late,
@@ -332,7 +328,6 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
332328
.atag_offset = 0x100,
333329
.map_io = ep93xx_map_io,
334330
.init_irq = ep93xx_init_irq,
335-
.handle_irq = vic_handle_irq,
336331
.timer = &ep93xx_timer,
337332
.init_machine = edb93xx_init_machine,
338333
.init_late = ep93xx_init_late,
@@ -346,7 +341,6 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
346341
.atag_offset = 0x100,
347342
.map_io = ep93xx_map_io,
348343
.init_irq = ep93xx_init_irq,
349-
.handle_irq = vic_handle_irq,
350344
.timer = &ep93xx_timer,
351345
.init_machine = edb93xx_init_machine,
352346
.init_late = ep93xx_init_late,
@@ -360,7 +354,6 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
360354
.atag_offset = 0x100,
361355
.map_io = ep93xx_map_io,
362356
.init_irq = ep93xx_init_irq,
363-
.handle_irq = vic_handle_irq,
364357
.timer = &ep93xx_timer,
365358
.init_machine = edb93xx_init_machine,
366359
.init_late = ep93xx_init_late,
@@ -374,7 +367,6 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
374367
.atag_offset = 0x100,
375368
.map_io = ep93xx_map_io,
376369
.init_irq = ep93xx_init_irq,
377-
.handle_irq = vic_handle_irq,
378370
.timer = &ep93xx_timer,
379371
.init_machine = edb93xx_init_machine,
380372
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/gesbc9312.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
3939
.atag_offset = 0x100,
4040
.map_io = ep93xx_map_io,
4141
.init_irq = ep93xx_init_irq,
42-
.handle_irq = vic_handle_irq,
4342
.timer = &ep93xx_timer,
4443
.init_machine = gesbc9312_init_machine,
4544
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/micro9.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ MACHINE_START(MICRO9, "Contec Micro9-High")
8282
.atag_offset = 0x100,
8383
.map_io = ep93xx_map_io,
8484
.init_irq = ep93xx_init_irq,
85-
.handle_irq = vic_handle_irq,
8685
.timer = &ep93xx_timer,
8786
.init_machine = micro9_init_machine,
8887
.init_late = ep93xx_init_late,
@@ -96,7 +95,6 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid")
9695
.atag_offset = 0x100,
9796
.map_io = ep93xx_map_io,
9897
.init_irq = ep93xx_init_irq,
99-
.handle_irq = vic_handle_irq,
10098
.timer = &ep93xx_timer,
10199
.init_machine = micro9_init_machine,
102100
.init_late = ep93xx_init_late,
@@ -110,7 +108,6 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite")
110108
.atag_offset = 0x100,
111109
.map_io = ep93xx_map_io,
112110
.init_irq = ep93xx_init_irq,
113-
.handle_irq = vic_handle_irq,
114111
.timer = &ep93xx_timer,
115112
.init_machine = micro9_init_machine,
116113
.init_late = ep93xx_init_late,
@@ -124,7 +121,6 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim")
124121
.atag_offset = 0x100,
125122
.map_io = ep93xx_map_io,
126123
.init_irq = ep93xx_init_irq,
127-
.handle_irq = vic_handle_irq,
128124
.timer = &ep93xx_timer,
129125
.init_machine = micro9_init_machine,
130126
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/simone.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
8383
.atag_offset = 0x100,
8484
.map_io = ep93xx_map_io,
8585
.init_irq = ep93xx_init_irq,
86-
.handle_irq = vic_handle_irq,
8786
.timer = &ep93xx_timer,
8887
.init_machine = simone_init_machine,
8988
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/snappercl15.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
176176
.atag_offset = 0x100,
177177
.map_io = ep93xx_map_io,
178178
.init_irq = ep93xx_init_irq,
179-
.handle_irq = vic_handle_irq,
180179
.timer = &ep93xx_timer,
181180
.init_machine = snappercl15_init_machine,
182181
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/ts72xx.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
246246
.atag_offset = 0x100,
247247
.map_io = ts72xx_map_io,
248248
.init_irq = ep93xx_init_irq,
249-
.handle_irq = vic_handle_irq,
250249
.timer = &ep93xx_timer,
251250
.init_machine = ts72xx_init_machine,
252251
.init_late = ep93xx_init_late,

‎arch/arm/mach-ep93xx/vision_ep9307.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
364364
.atag_offset = 0x100,
365365
.map_io = vision_map_io,
366366
.init_irq = ep93xx_init_irq,
367-
.handle_irq = vic_handle_irq,
368367
.timer = &ep93xx_timer,
369368
.init_machine = vision_init_machine,
370369
.init_late = ep93xx_init_late,

0 commit comments

Comments
 (0)