diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-01 08:44:58 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-04 06:43:34 -0400 |
| commit | a77c4635915021c646cc017f22239e66d1aab4d5 (patch) | |
| tree | 59f372efa6d87064fda9c901ea785c838cb642e5 | |
| parent | f8822657e799b02c55556c99a601261e207a299d (diff) | |
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>
| -rw-r--r-- | kernel/irq/handle.c | 59 | ||||
| -rw-r--r-- | kernel/irq/internals.h | 2 |
2 files changed, 44 insertions, 17 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index fc27d76e83ef..adca5b4b40d8 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
| @@ -291,7 +291,15 @@ void clear_kstat_irqs(struct irq_desc *desc) | |||
| 291 | * What should we do if we get a hw irq event on an illegal vector? | 291 | * What should we do if we get a hw irq event on an illegal vector? |
| 292 | * Each architecture has to answer this themself. | 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 | { | ||
| 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) | ||
| 295 | { | 303 | { |
| 296 | struct irq_desc *desc = irq_to_desc(irq); | 304 | struct irq_desc *desc = irq_to_desc(irq); |
| 297 | 305 | ||
| @@ -302,11 +310,16 @@ static void ack_bad(unsigned int irq) | |||
| 302 | /* | 310 | /* |
| 303 | * NOP functions | 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 | return 0; | 324 | return 0; |
| 312 | } | 325 | } |
| @@ -316,12 +329,17 @@ static unsigned int noop_ret(unsigned int irq) | |||
| 316 | */ | 329 | */ |
| 317 | struct irq_chip no_irq_chip = { | 330 | struct irq_chip no_irq_chip = { |
| 318 | .name = "none", | 331 | .name = "none", |
| 319 | .startup = noop_ret, | 332 | .irq_startup = noop_ret, |
| 320 | .shutdown = noop, | 333 | .irq_shutdown = noop, |
| 321 | .enable = noop, | 334 | .irq_enable = noop, |
| 322 | .disable = noop, | 335 | .irq_disable = noop, |
| 323 | .ack = ack_bad, | 336 | .irq_ack = ack_bad, |
| 324 | .end = noop, | 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 @@ struct irq_chip no_irq_chip = { | |||
| 330 | */ | 348 | */ |
| 331 | struct irq_chip dummy_irq_chip = { | 349 | struct irq_chip dummy_irq_chip = { |
| 332 | .name = "dummy", | 350 | .name = "dummy", |
| 333 | .startup = noop_ret, | 351 | .irq_startup = noop_ret, |
| 334 | .shutdown = noop, | 352 | .irq_shutdown = noop, |
| 335 | .enable = noop, | 353 | .irq_enable = noop, |
| 336 | .disable = noop, | 354 | .irq_disable = noop, |
| 337 | .ack = noop, | 355 | .irq_ack = noop, |
| 338 | .mask = noop, | 356 | .irq_mask = noop, |
| 339 | .unmask = noop, | 357 | .irq_unmask = noop, |
| 340 | .end = 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 | /* |
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index a805a00cfd28..562fc7eeabec 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | extern int noirqdebug; | 5 | extern int noirqdebug; |
| 6 | 6 | ||
| 7 | #define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data) | ||
| 8 | |||
| 7 | /* Set default functions for irq_chip structures: */ | 9 | /* Set default functions for irq_chip structures: */ |
| 8 | extern void irq_chip_set_defaults(struct irq_chip *chip); | 10 | extern void irq_chip_set_defaults(struct irq_chip *chip); |
| 9 | 11 | ||
