Commit a77c4635915021c646cc017f22239e66d1aab4d5
1 parent
f8822657e7
Exists in
master
and in
20 other branches
genirq: Add new functions to dummy chips
The compat functions go away when the core code is converted. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 44 additions and 17 deletions Side-by-side Diff
kernel/irq/handle.c
... | ... | @@ -291,8 +291,16 @@ |
291 | 291 | * What should we do if we get a hw irq event on an illegal vector? |
292 | 292 | * Each architecture has to answer this themself. |
293 | 293 | */ |
294 | -static void ack_bad(unsigned int irq) | |
294 | +static void ack_bad(struct irq_data *data) | |
295 | 295 | { |
296 | + struct irq_desc *desc = irq_data_to_desc(data); | |
297 | + | |
298 | + print_irq_desc(data->irq, desc); | |
299 | + ack_bad_irq(data->irq); | |
300 | +} | |
301 | + | |
302 | +static void compat_ack_bad(unsigned int irq) | |
303 | +{ | |
296 | 304 | struct irq_desc *desc = irq_to_desc(irq); |
297 | 305 | |
298 | 306 | print_irq_desc(irq, desc); |
299 | 307 | |
300 | 308 | |
... | ... | @@ -302,11 +310,16 @@ |
302 | 310 | /* |
303 | 311 | * NOP functions |
304 | 312 | */ |
305 | -static void noop(unsigned int irq) | |
313 | +static void noop(struct irq_data *data) { } | |
314 | + | |
315 | +static unsigned int noop_ret(struct irq_data *data) | |
306 | 316 | { |
317 | + return 0; | |
307 | 318 | } |
308 | 319 | |
309 | -static unsigned int noop_ret(unsigned int irq) | |
320 | +static void compat_noop(unsigned int irq) { } | |
321 | + | |
322 | +static unsigned int compat_noop_ret(unsigned int irq) | |
310 | 323 | { |
311 | 324 | return 0; |
312 | 325 | } |
... | ... | @@ -316,12 +329,17 @@ |
316 | 329 | */ |
317 | 330 | struct irq_chip no_irq_chip = { |
318 | 331 | .name = "none", |
319 | - .startup = noop_ret, | |
320 | - .shutdown = noop, | |
321 | - .enable = noop, | |
322 | - .disable = noop, | |
323 | - .ack = ack_bad, | |
324 | - .end = noop, | |
332 | + .irq_startup = noop_ret, | |
333 | + .irq_shutdown = noop, | |
334 | + .irq_enable = noop, | |
335 | + .irq_disable = noop, | |
336 | + .irq_ack = ack_bad, | |
337 | + .startup = compat_noop_ret, | |
338 | + .shutdown = compat_noop, | |
339 | + .enable = compat_noop, | |
340 | + .disable = compat_noop, | |
341 | + .ack = compat_ack_bad, | |
342 | + .end = compat_noop, | |
325 | 343 | }; |
326 | 344 | |
327 | 345 | /* |
... | ... | @@ -330,14 +348,21 @@ |
330 | 348 | */ |
331 | 349 | struct irq_chip dummy_irq_chip = { |
332 | 350 | .name = "dummy", |
333 | - .startup = noop_ret, | |
334 | - .shutdown = noop, | |
335 | - .enable = noop, | |
336 | - .disable = noop, | |
337 | - .ack = noop, | |
338 | - .mask = noop, | |
339 | - .unmask = noop, | |
340 | - .end = noop, | |
351 | + .irq_startup = noop_ret, | |
352 | + .irq_shutdown = noop, | |
353 | + .irq_enable = noop, | |
354 | + .irq_disable = noop, | |
355 | + .irq_ack = noop, | |
356 | + .irq_mask = noop, | |
357 | + .irq_unmask = noop, | |
358 | + .startup = compat_noop_ret, | |
359 | + .shutdown = compat_noop, | |
360 | + .enable = compat_noop, | |
361 | + .disable = compat_noop, | |
362 | + .ack = compat_noop, | |
363 | + .mask = compat_noop, | |
364 | + .unmask = compat_noop, | |
365 | + .end = compat_noop, | |
341 | 366 | }; |
342 | 367 | |
343 | 368 | /* |
kernel/irq/internals.h