diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/completion.h | 1 | ||||
| -rw-r--r-- | include/linux/fs.h | 21 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 32 | ||||
| -rw-r--r-- | include/linux/sched.h | 19 | ||||
| -rw-r--r-- | include/linux/smp.h | 5 | ||||
| -rw-r--r-- | include/linux/tick.h | 5 |
6 files changed, 71 insertions, 12 deletions
diff --git a/include/linux/completion.h b/include/linux/completion.h index 51e3145196f6..c63950e8a863 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
| @@ -90,6 +90,7 @@ extern bool completion_done(struct completion *x); | |||
| 90 | 90 | ||
| 91 | extern void complete(struct completion *); | 91 | extern void complete(struct completion *); |
| 92 | extern void complete_all(struct completion *); | 92 | extern void complete_all(struct completion *); |
| 93 | extern void complete_n(struct completion *, int n); | ||
| 93 | 94 | ||
| 94 | /** | 95 | /** |
| 95 | * INIT_COMPLETION: - reinitialize a completion structure | 96 | * INIT_COMPLETION: - reinitialize a completion structure |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 63d069bd80b7..29a672458d27 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | * nr_file rlimit, so it's safe to set up a ridiculously high absolute | 16 | * nr_file rlimit, so it's safe to set up a ridiculously high absolute |
| 17 | * upper limit on files-per-process. | 17 | * upper limit on files-per-process. |
| 18 | * | 18 | * |
| 19 | * Some programs (notably those using select()) may have to be | 19 | * Some programs (notably those using select()) may have to be |
| 20 | * recompiled to take full advantage of the new limits.. | 20 | * recompiled to take full advantage of the new limits.. |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | /* Fixed constants first: */ | 23 | /* Fixed constants first: */ |
| @@ -172,7 +172,7 @@ struct inodes_stat_t { | |||
| 172 | #define SEL_EX 4 | 172 | #define SEL_EX 4 |
| 173 | 173 | ||
| 174 | /* public flags for file_system_type */ | 174 | /* public flags for file_system_type */ |
| 175 | #define FS_REQUIRES_DEV 1 | 175 | #define FS_REQUIRES_DEV 1 |
| 176 | #define FS_BINARY_MOUNTDATA 2 | 176 | #define FS_BINARY_MOUNTDATA 2 |
| 177 | #define FS_HAS_SUBTYPE 4 | 177 | #define FS_HAS_SUBTYPE 4 |
| 178 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | 178 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ |
| @@ -470,7 +470,7 @@ struct iattr { | |||
| 470 | */ | 470 | */ |
| 471 | #include <linux/quota.h> | 471 | #include <linux/quota.h> |
| 472 | 472 | ||
| 473 | /** | 473 | /** |
| 474 | * enum positive_aop_returns - aop return codes with specific semantics | 474 | * enum positive_aop_returns - aop return codes with specific semantics |
| 475 | * | 475 | * |
| 476 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has | 476 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has |
| @@ -480,7 +480,7 @@ struct iattr { | |||
| 480 | * be a candidate for writeback again in the near | 480 | * be a candidate for writeback again in the near |
| 481 | * future. Other callers must be careful to unlock | 481 | * future. Other callers must be careful to unlock |
| 482 | * the page if they get this return. Returned by | 482 | * the page if they get this return. Returned by |
| 483 | * writepage(); | 483 | * writepage(); |
| 484 | * | 484 | * |
| 485 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has | 485 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has |
| 486 | * unlocked it and the page might have been truncated. | 486 | * unlocked it and the page might have been truncated. |
| @@ -721,6 +721,7 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
| 721 | 721 | ||
| 722 | struct posix_acl; | 722 | struct posix_acl; |
| 723 | #define ACL_NOT_CACHED ((void *)(-1)) | 723 | #define ACL_NOT_CACHED ((void *)(-1)) |
| 724 | struct inode_obj_id_table; | ||
| 724 | 725 | ||
| 725 | struct inode { | 726 | struct inode { |
| 726 | struct hlist_node i_hash; | 727 | struct hlist_node i_hash; |
| @@ -784,6 +785,8 @@ struct inode { | |||
| 784 | struct posix_acl *i_acl; | 785 | struct posix_acl *i_acl; |
| 785 | struct posix_acl *i_default_acl; | 786 | struct posix_acl *i_default_acl; |
| 786 | #endif | 787 | #endif |
| 788 | struct list_head i_obj_list; | ||
| 789 | struct mutex i_obj_mutex; | ||
| 787 | void *i_private; /* fs or device private pointer */ | 790 | void *i_private; /* fs or device private pointer */ |
| 788 | }; | 791 | }; |
| 789 | 792 | ||
| @@ -997,10 +1000,10 @@ static inline int file_check_writeable(struct file *filp) | |||
| 997 | 1000 | ||
| 998 | #define MAX_NON_LFS ((1UL<<31) - 1) | 1001 | #define MAX_NON_LFS ((1UL<<31) - 1) |
| 999 | 1002 | ||
| 1000 | /* Page cache limit. The filesystems should put that into their s_maxbytes | 1003 | /* Page cache limit. The filesystems should put that into their s_maxbytes |
| 1001 | limits, otherwise bad things can happen in VM. */ | 1004 | limits, otherwise bad things can happen in VM. */ |
| 1002 | #if BITS_PER_LONG==32 | 1005 | #if BITS_PER_LONG==32 |
| 1003 | #define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) | 1006 | #define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) |
| 1004 | #elif BITS_PER_LONG==64 | 1007 | #elif BITS_PER_LONG==64 |
| 1005 | #define MAX_LFS_FILESIZE 0x7fffffffffffffffUL | 1008 | #define MAX_LFS_FILESIZE 0x7fffffffffffffffUL |
| 1006 | #endif | 1009 | #endif |
| @@ -2145,7 +2148,7 @@ extern int may_open(struct path *, int, int); | |||
| 2145 | 2148 | ||
| 2146 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2149 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2147 | extern struct file * open_exec(const char *); | 2150 | extern struct file * open_exec(const char *); |
| 2148 | 2151 | ||
| 2149 | /* fs/dcache.c -- generic fs support functions */ | 2152 | /* fs/dcache.c -- generic fs support functions */ |
| 2150 | extern int is_subdir(struct dentry *, struct dentry *); | 2153 | extern int is_subdir(struct dentry *, struct dentry *); |
| 2151 | extern int path_is_under(struct path *, struct path *); | 2154 | extern int path_is_under(struct path *, struct path *); |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fd0c1b857d3d..76da541c1f66 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -167,6 +167,7 @@ struct hrtimer_clock_base { | |||
| 167 | * @nr_retries: Total number of hrtimer interrupt retries | 167 | * @nr_retries: Total number of hrtimer interrupt retries |
| 168 | * @nr_hangs: Total number of hrtimer interrupt hangs | 168 | * @nr_hangs: Total number of hrtimer interrupt hangs |
| 169 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 169 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
| 170 | * @to_pull: LITMUS^RT list of timers to be pulled on this cpu | ||
| 170 | */ | 171 | */ |
| 171 | struct hrtimer_cpu_base { | 172 | struct hrtimer_cpu_base { |
| 172 | raw_spinlock_t lock; | 173 | raw_spinlock_t lock; |
| @@ -180,8 +181,32 @@ struct hrtimer_cpu_base { | |||
| 180 | unsigned long nr_hangs; | 181 | unsigned long nr_hangs; |
| 181 | ktime_t max_hang_time; | 182 | ktime_t max_hang_time; |
| 182 | #endif | 183 | #endif |
| 184 | struct list_head to_pull; | ||
| 183 | }; | 185 | }; |
| 184 | 186 | ||
| 187 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
| 188 | |||
| 189 | #define HRTIMER_START_ON_INACTIVE 0 | ||
| 190 | #define HRTIMER_START_ON_QUEUED 1 | ||
| 191 | |||
| 192 | /* | ||
| 193 | * struct hrtimer_start_on_info - save timer info on remote cpu | ||
| 194 | * @list: list of hrtimer_start_on_info on remote cpu (to_pull) | ||
| 195 | * @timer: timer to be triggered on remote cpu | ||
| 196 | * @time: time event | ||
| 197 | * @mode: timer mode | ||
| 198 | * @state: activity flag | ||
| 199 | */ | ||
| 200 | struct hrtimer_start_on_info { | ||
| 201 | struct list_head list; | ||
| 202 | struct hrtimer *timer; | ||
| 203 | ktime_t time; | ||
| 204 | enum hrtimer_mode mode; | ||
| 205 | atomic_t state; | ||
| 206 | }; | ||
| 207 | |||
| 208 | #endif | ||
| 209 | |||
| 185 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 210 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
| 186 | { | 211 | { |
| 187 | timer->_expires = time; | 212 | timer->_expires = time; |
| @@ -348,6 +373,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
| 348 | unsigned long delta_ns, | 373 | unsigned long delta_ns, |
| 349 | const enum hrtimer_mode mode, int wakeup); | 374 | const enum hrtimer_mode mode, int wakeup); |
| 350 | 375 | ||
| 376 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
| 377 | extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info); | ||
| 378 | extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info, | ||
| 379 | struct hrtimer *timer, ktime_t time, | ||
| 380 | const enum hrtimer_mode mode); | ||
| 381 | #endif | ||
| 382 | |||
| 351 | extern int hrtimer_cancel(struct hrtimer *timer); | 383 | extern int hrtimer_cancel(struct hrtimer *timer); |
| 352 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 384 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
| 353 | 385 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1e2a6db2d7dd..c9ac4fc837ba 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #define SCHED_BATCH 3 | 38 | #define SCHED_BATCH 3 |
| 39 | /* SCHED_ISO: reserved but not implemented yet */ | 39 | /* SCHED_ISO: reserved but not implemented yet */ |
| 40 | #define SCHED_IDLE 5 | 40 | #define SCHED_IDLE 5 |
| 41 | #define SCHED_LITMUS 6 | ||
| 41 | /* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */ | 42 | /* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */ |
| 42 | #define SCHED_RESET_ON_FORK 0x40000000 | 43 | #define SCHED_RESET_ON_FORK 0x40000000 |
| 43 | 44 | ||
| @@ -94,6 +95,9 @@ struct sched_param { | |||
| 94 | 95 | ||
| 95 | #include <asm/processor.h> | 96 | #include <asm/processor.h> |
| 96 | 97 | ||
| 98 | #include <litmus/rt_param.h> | ||
| 99 | #include <litmus/preempt.h> | ||
| 100 | |||
| 97 | struct exec_domain; | 101 | struct exec_domain; |
| 98 | struct futex_pi_state; | 102 | struct futex_pi_state; |
| 99 | struct robust_list_head; | 103 | struct robust_list_head; |
| @@ -1159,6 +1163,7 @@ struct sched_rt_entity { | |||
| 1159 | }; | 1163 | }; |
| 1160 | 1164 | ||
| 1161 | struct rcu_node; | 1165 | struct rcu_node; |
| 1166 | struct od_table_entry; | ||
| 1162 | 1167 | ||
| 1163 | struct task_struct { | 1168 | struct task_struct { |
| 1164 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 1169 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
| @@ -1243,9 +1248,9 @@ struct task_struct { | |||
| 1243 | unsigned long stack_canary; | 1248 | unsigned long stack_canary; |
| 1244 | #endif | 1249 | #endif |
| 1245 | 1250 | ||
| 1246 | /* | 1251 | /* |
| 1247 | * pointers to (original) parent process, youngest child, younger sibling, | 1252 | * pointers to (original) parent process, youngest child, younger sibling, |
| 1248 | * older sibling, respectively. (p->father can be replaced with | 1253 | * older sibling, respectively. (p->father can be replaced with |
| 1249 | * p->real_parent->pid) | 1254 | * p->real_parent->pid) |
| 1250 | */ | 1255 | */ |
| 1251 | struct task_struct *real_parent; /* real parent process */ | 1256 | struct task_struct *real_parent; /* real parent process */ |
| @@ -1453,6 +1458,13 @@ struct task_struct { | |||
| 1453 | int make_it_fail; | 1458 | int make_it_fail; |
| 1454 | #endif | 1459 | #endif |
| 1455 | struct prop_local_single dirties; | 1460 | struct prop_local_single dirties; |
| 1461 | |||
| 1462 | /* LITMUS RT parameters and state */ | ||
| 1463 | struct rt_param rt_param; | ||
| 1464 | |||
| 1465 | /* references to PI semaphores, etc. */ | ||
| 1466 | struct od_table_entry *od_table; | ||
| 1467 | |||
| 1456 | #ifdef CONFIG_LATENCYTOP | 1468 | #ifdef CONFIG_LATENCYTOP |
| 1457 | int latency_record_count; | 1469 | int latency_record_count; |
| 1458 | struct latency_record latency_record[LT_SAVECOUNT]; | 1470 | struct latency_record latency_record[LT_SAVECOUNT]; |
| @@ -2014,7 +2026,7 @@ static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, s | |||
| 2014 | spin_unlock_irqrestore(&tsk->sighand->siglock, flags); | 2026 | spin_unlock_irqrestore(&tsk->sighand->siglock, flags); |
| 2015 | 2027 | ||
| 2016 | return ret; | 2028 | return ret; |
| 2017 | } | 2029 | } |
| 2018 | 2030 | ||
| 2019 | extern void block_all_signals(int (*notifier)(void *priv), void *priv, | 2031 | extern void block_all_signals(int (*notifier)(void *priv), void *priv, |
| 2020 | sigset_t *mask); | 2032 | sigset_t *mask); |
| @@ -2290,6 +2302,7 @@ static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) | |||
| 2290 | static inline void set_tsk_need_resched(struct task_struct *tsk) | 2302 | static inline void set_tsk_need_resched(struct task_struct *tsk) |
| 2291 | { | 2303 | { |
| 2292 | set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); | 2304 | set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); |
| 2305 | sched_state_will_schedule(tsk); | ||
| 2293 | } | 2306 | } |
| 2294 | 2307 | ||
| 2295 | static inline void clear_tsk_need_resched(struct task_struct *tsk) | 2308 | static inline void clear_tsk_need_resched(struct task_struct *tsk) |
diff --git a/include/linux/smp.h b/include/linux/smp.h index cfa2d20e35f1..f86d40768e7f 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -80,6 +80,11 @@ int smp_call_function_any(const struct cpumask *mask, | |||
| 80 | void (*func)(void *info), void *info, int wait); | 80 | void (*func)(void *info), void *info, int wait); |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| 83 | * sends a 'pull timer' event to a remote CPU | ||
| 84 | */ | ||
| 85 | extern void smp_send_pull_timers(int cpu); | ||
| 86 | |||
| 87 | /* | ||
| 83 | * Generic and arch helpers | 88 | * Generic and arch helpers |
| 84 | */ | 89 | */ |
| 85 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS | 90 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS |
diff --git a/include/linux/tick.h b/include/linux/tick.h index b232ccc0ee29..1e29bd5b18af 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -74,6 +74,11 @@ extern int tick_is_oneshot_available(void); | |||
| 74 | extern struct tick_device *tick_get_device(int cpu); | 74 | extern struct tick_device *tick_get_device(int cpu); |
| 75 | 75 | ||
| 76 | # ifdef CONFIG_HIGH_RES_TIMERS | 76 | # ifdef CONFIG_HIGH_RES_TIMERS |
| 77 | /* LITMUS^RT tick alignment */ | ||
| 78 | #define LINUX_DEFAULT_TICKS 0 | ||
| 79 | #define LITMUS_ALIGNED_TICKS 1 | ||
| 80 | #define LITMUS_STAGGERED_TICKS 2 | ||
| 81 | |||
| 77 | extern int tick_init_highres(void); | 82 | extern int tick_init_highres(void); |
| 78 | extern int tick_program_event(ktime_t expires, int force); | 83 | extern int tick_program_event(ktime_t expires, int force); |
| 79 | extern void tick_setup_sched_timer(void); | 84 | extern void tick_setup_sched_timer(void); |
