diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/interrupt.h | 28 | ||||
| -rw-r--r-- | include/linux/perf_counter.h | 15 | ||||
| -rw-r--r-- | include/linux/sched.h | 3 |
3 files changed, 34 insertions, 12 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2721f07e9354..35e7df1e9f30 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> |
| @@ -64,11 +65,13 @@ | |||
| 64 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run | 65 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run |
| 65 | * IRQTF_DIED - handler thread died | 66 | * IRQTF_DIED - handler thread died |
| 66 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed | 67 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed |
| 68 | * IRQTF_AFFINITY - irq thread is requested to adjust affinity | ||
| 67 | */ | 69 | */ |
| 68 | enum { | 70 | enum { |
| 69 | IRQTF_RUNTHREAD, | 71 | IRQTF_RUNTHREAD, |
| 70 | IRQTF_DIED, | 72 | IRQTF_DIED, |
| 71 | IRQTF_WARNED, | 73 | IRQTF_WARNED, |
| 74 | IRQTF_AFFINITY, | ||
| 72 | }; | 75 | }; |
| 73 | 76 | ||
| 74 | typedef irqreturn_t (*irq_handler_t)(int, void *); | 77 | typedef irqreturn_t (*irq_handler_t)(int, void *); |
| @@ -517,6 +520,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); | |||
| 517 | extern void tasklet_init(struct tasklet_struct *t, | 520 | extern void tasklet_init(struct tasklet_struct *t, |
| 518 | void (*func)(unsigned long), unsigned long data); | 521 | void (*func)(unsigned long), unsigned long data); |
| 519 | 522 | ||
| 523 | struct tasklet_hrtimer { | ||
| 524 | struct hrtimer timer; | ||
| 525 | struct tasklet_struct tasklet; | ||
| 526 | enum hrtimer_restart (*function)(struct hrtimer *); | ||
| 527 | }; | ||
| 528 | |||
| 529 | extern void | ||
| 530 | tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, | ||
| 531 | enum hrtimer_restart (*function)(struct hrtimer *), | ||
| 532 | clockid_t which_clock, enum hrtimer_mode mode); | ||
| 533 | |||
| 534 | static inline | ||
| 535 | int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time, | ||
| 536 | const enum hrtimer_mode mode) | ||
| 537 | { | ||
| 538 | return hrtimer_start(&ttimer->timer, time, mode); | ||
| 539 | } | ||
| 540 | |||
| 541 | static inline | ||
| 542 | void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) | ||
| 543 | { | ||
| 544 | hrtimer_cancel(&ttimer->timer); | ||
| 545 | tasklet_kill(&ttimer->tasklet); | ||
| 546 | } | ||
| 547 | |||
| 520 | /* | 548 | /* |
| 521 | * Autoprobing for irqs: | 549 | * Autoprobing for irqs: |
| 522 | * | 550 | * |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 5e970c7d3fd5..bd15d7a5f5ce 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
| @@ -120,8 +120,9 @@ enum perf_counter_sample_format { | |||
| 120 | PERF_SAMPLE_ID = 1U << 6, | 120 | PERF_SAMPLE_ID = 1U << 6, |
| 121 | PERF_SAMPLE_CPU = 1U << 7, | 121 | PERF_SAMPLE_CPU = 1U << 7, |
| 122 | PERF_SAMPLE_PERIOD = 1U << 8, | 122 | PERF_SAMPLE_PERIOD = 1U << 8, |
| 123 | PERF_SAMPLE_STREAM_ID = 1U << 9, | ||
| 123 | 124 | ||
| 124 | PERF_SAMPLE_MAX = 1U << 9, /* non-ABI */ | 125 | PERF_SAMPLE_MAX = 1U << 10, /* non-ABI */ |
| 125 | }; | 126 | }; |
| 126 | 127 | ||
| 127 | /* | 128 | /* |
| @@ -312,16 +313,7 @@ enum perf_event_type { | |||
| 312 | * struct perf_event_header header; | 313 | * struct perf_event_header header; |
| 313 | * u64 time; | 314 | * u64 time; |
| 314 | * u64 id; | 315 | * u64 id; |
| 315 | * u64 sample_period; | 316 | * u64 stream_id; |
| 316 | * }; | ||
| 317 | */ | ||
| 318 | PERF_EVENT_PERIOD = 4, | ||
| 319 | |||
| 320 | /* | ||
| 321 | * struct { | ||
| 322 | * struct perf_event_header header; | ||
| 323 | * u64 time; | ||
| 324 | * u64 id; | ||
| 325 | * }; | 317 | * }; |
| 326 | */ | 318 | */ |
| 327 | PERF_EVENT_THROTTLE = 5, | 319 | PERF_EVENT_THROTTLE = 5, |
| @@ -356,6 +348,7 @@ enum perf_event_type { | |||
| 356 | * { u64 time; } && PERF_SAMPLE_TIME | 348 | * { u64 time; } && PERF_SAMPLE_TIME |
| 357 | * { u64 addr; } && PERF_SAMPLE_ADDR | 349 | * { u64 addr; } && PERF_SAMPLE_ADDR |
| 358 | * { u64 id; } && PERF_SAMPLE_ID | 350 | * { u64 id; } && PERF_SAMPLE_ID |
| 351 | * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID | ||
| 359 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 352 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
| 360 | * { u64 period; } && PERF_SAMPLE_PERIOD | 353 | * { u64 period; } && PERF_SAMPLE_PERIOD |
| 361 | * | 354 | * |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 16a982e389fb..3ab08e4bb6b8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -209,7 +209,7 @@ extern unsigned long long time_sync_thresh; | |||
| 209 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) | 209 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
| 210 | #define task_contributes_to_load(task) \ | 210 | #define task_contributes_to_load(task) \ |
| 211 | ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ | 211 | ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ |
| 212 | (task->flags & PF_FROZEN) == 0) | 212 | (task->flags & PF_FREEZING) == 0) |
| 213 | 213 | ||
| 214 | #define __set_task_state(tsk, state_value) \ | 214 | #define __set_task_state(tsk, state_value) \ |
| 215 | do { (tsk)->state = (state_value); } while (0) | 215 | do { (tsk)->state = (state_value); } while (0) |
| @@ -1680,6 +1680,7 @@ extern cputime_t task_gtime(struct task_struct *p); | |||
| 1680 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1680 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
| 1681 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ | 1681 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ |
| 1682 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1682 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
| 1683 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ | ||
| 1683 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1684 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
| 1684 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ | 1685 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ |
| 1685 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ | 1686 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ |
