diff options
| author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-22 19:49:27 -0400 |
|---|---|---|
| committer | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-22 19:49:27 -0400 |
| commit | f056878332a91ed984a116bad4e7d49aefff9e6e (patch) | |
| tree | 572f4757c8e7811d45e0be0c2ae529c78fb63441 /include/linux/interrupt.h | |
| parent | 3961f7c3cf247eee5df7fabadc7a40f2deeb98f3 (diff) | |
| parent | 7fa07729e439a6184bd824746d06a49cca553f15 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/power/wm97xx_battery.c
Diffstat (limited to 'include/linux/interrupt.h')
| -rw-r--r-- | include/linux/interrupt.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2721f07e9354..8e9e151f811e 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/irqflags.h> | 14 | #include <linux/irqflags.h> |
| 15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
| 16 | #include <linux/percpu.h> | 16 | #include <linux/percpu.h> |
| 17 | #include <linux/hrtimer.h> | ||
| 17 | 18 | ||
| 18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
| 19 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
| @@ -49,6 +50,9 @@ | |||
| 49 | * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is | 50 | * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is |
| 50 | * registered first in an shared interrupt is considered for | 51 | * registered first in an shared interrupt is considered for |
| 51 | * performance reasons) | 52 | * performance reasons) |
| 53 | * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished. | ||
| 54 | * Used by threaded interrupts which need to keep the | ||
| 55 | * irq line disabled until the threaded handler has been run. | ||
| 52 | */ | 56 | */ |
| 53 | #define IRQF_DISABLED 0x00000020 | 57 | #define IRQF_DISABLED 0x00000020 |
| 54 | #define IRQF_SAMPLE_RANDOM 0x00000040 | 58 | #define IRQF_SAMPLE_RANDOM 0x00000040 |
| @@ -58,17 +62,20 @@ | |||
| 58 | #define IRQF_PERCPU 0x00000400 | 62 | #define IRQF_PERCPU 0x00000400 |
| 59 | #define IRQF_NOBALANCING 0x00000800 | 63 | #define IRQF_NOBALANCING 0x00000800 |
| 60 | #define IRQF_IRQPOLL 0x00001000 | 64 | #define IRQF_IRQPOLL 0x00001000 |
| 65 | #define IRQF_ONESHOT 0x00002000 | ||
| 61 | 66 | ||
| 62 | /* | 67 | /* |
| 63 | * Bits used by threaded handlers: | 68 | * Bits used by threaded handlers: |
| 64 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run | 69 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run |
| 65 | * IRQTF_DIED - handler thread died | 70 | * IRQTF_DIED - handler thread died |
| 66 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed | 71 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed |
| 72 | * IRQTF_AFFINITY - irq thread is requested to adjust affinity | ||
| 67 | */ | 73 | */ |
| 68 | enum { | 74 | enum { |
| 69 | IRQTF_RUNTHREAD, | 75 | IRQTF_RUNTHREAD, |
| 70 | IRQTF_DIED, | 76 | IRQTF_DIED, |
| 71 | IRQTF_WARNED, | 77 | IRQTF_WARNED, |
| 78 | IRQTF_AFFINITY, | ||
| 72 | }; | 79 | }; |
| 73 | 80 | ||
| 74 | typedef irqreturn_t (*irq_handler_t)(int, void *); | 81 | typedef irqreturn_t (*irq_handler_t)(int, void *); |
| @@ -341,6 +348,7 @@ enum | |||
| 341 | NET_TX_SOFTIRQ, | 348 | NET_TX_SOFTIRQ, |
| 342 | NET_RX_SOFTIRQ, | 349 | NET_RX_SOFTIRQ, |
| 343 | BLOCK_SOFTIRQ, | 350 | BLOCK_SOFTIRQ, |
| 351 | BLOCK_IOPOLL_SOFTIRQ, | ||
| 344 | TASKLET_SOFTIRQ, | 352 | TASKLET_SOFTIRQ, |
| 345 | SCHED_SOFTIRQ, | 353 | SCHED_SOFTIRQ, |
| 346 | HRTIMER_SOFTIRQ, | 354 | HRTIMER_SOFTIRQ, |
| @@ -517,6 +525,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); | |||
| 517 | extern void tasklet_init(struct tasklet_struct *t, | 525 | extern void tasklet_init(struct tasklet_struct *t, |
| 518 | void (*func)(unsigned long), unsigned long data); | 526 | void (*func)(unsigned long), unsigned long data); |
| 519 | 527 | ||
| 528 | struct tasklet_hrtimer { | ||
| 529 | struct hrtimer timer; | ||
| 530 | struct tasklet_struct tasklet; | ||
| 531 | enum hrtimer_restart (*function)(struct hrtimer *); | ||
| 532 | }; | ||
| 533 | |||
| 534 | extern void | ||
| 535 | tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, | ||
| 536 | enum hrtimer_restart (*function)(struct hrtimer *), | ||
| 537 | clockid_t which_clock, enum hrtimer_mode mode); | ||
| 538 | |||
| 539 | static inline | ||
| 540 | int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time, | ||
| 541 | const enum hrtimer_mode mode) | ||
| 542 | { | ||
| 543 | return hrtimer_start(&ttimer->timer, time, mode); | ||
| 544 | } | ||
| 545 | |||
| 546 | static inline | ||
| 547 | void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) | ||
| 548 | { | ||
| 549 | hrtimer_cancel(&ttimer->timer); | ||
| 550 | tasklet_kill(&ttimer->tasklet); | ||
| 551 | } | ||
| 552 | |||
| 520 | /* | 553 | /* |
| 521 | * Autoprobing for irqs: | 554 | * Autoprobing for irqs: |
| 522 | * | 555 | * |
