aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/completion.h1
-rw-r--r--include/linux/fs.h21
-rw-r--r--include/linux/hrtimer.h32
-rw-r--r--include/linux/sched.h19
-rw-r--r--include/linux/smp.h5
-rw-r--r--include/linux/tick.h5
6 files changed, 71 insertions, 12 deletions
diff --git a/include/linux/completion.h b/include/linux/completion.h
index 51494e6b5548..9d727271c9fe 100644
--- a/include/linux/completion.h
+++ b/include/linux/completion.h
@@ -90,6 +90,7 @@ extern bool completion_done(struct completion *x);
90 90
91extern void complete(struct completion *); 91extern void complete(struct completion *);
92extern void complete_all(struct completion *); 92extern void complete_all(struct completion *);
93extern 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 b5b979247863..8d5834bcb891 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -17,8 +17,8 @@
17 * nr_file rlimit, so it's safe to set up a ridiculously high absolute 17 * nr_file rlimit, so it's safe to set up a ridiculously high absolute
18 * upper limit on files-per-process. 18 * upper limit on files-per-process.
19 * 19 *
20 * Some programs (notably those using select()) may have to be 20 * Some programs (notably those using select()) may have to be
21 * recompiled to take full advantage of the new limits.. 21 * recompiled to take full advantage of the new limits..
22 */ 22 */
23 23
24/* Fixed constants first: */ 24/* 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 */
@@ -480,7 +480,7 @@ struct iattr {
480 */ 480 */
481#include <linux/quota.h> 481#include <linux/quota.h>
482 482
483/** 483/**
484 * enum positive_aop_returns - aop return codes with specific semantics 484 * enum positive_aop_returns - aop return codes with specific semantics
485 * 485 *
486 * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has 486 * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has
@@ -490,7 +490,7 @@ struct iattr {
490 * be a candidate for writeback again in the near 490 * be a candidate for writeback again in the near
491 * future. Other callers must be careful to unlock 491 * future. Other callers must be careful to unlock
492 * the page if they get this return. Returned by 492 * the page if they get this return. Returned by
493 * writepage(); 493 * writepage();
494 * 494 *
495 * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has 495 * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has
496 * unlocked it and the page might have been truncated. 496 * unlocked it and the page might have been truncated.
@@ -734,6 +734,7 @@ static inline int mapping_writably_mapped(struct address_space *mapping)
734 734
735struct posix_acl; 735struct posix_acl;
736#define ACL_NOT_CACHED ((void *)(-1)) 736#define ACL_NOT_CACHED ((void *)(-1))
737struct inode_obj_id_table;
737 738
738struct inode { 739struct inode {
739 /* RCU path lookup touches following: */ 740 /* RCU path lookup touches following: */
@@ -807,6 +808,8 @@ struct inode {
807 struct posix_acl *i_acl; 808 struct posix_acl *i_acl;
808 struct posix_acl *i_default_acl; 809 struct posix_acl *i_default_acl;
809#endif 810#endif
811 struct list_head i_obj_list;
812 struct mutex i_obj_mutex;
810 void *i_private; /* fs or device private pointer */ 813 void *i_private; /* fs or device private pointer */
811}; 814};
812 815
@@ -1032,10 +1035,10 @@ static inline int file_check_writeable(struct file *filp)
1032 1035
1033#define MAX_NON_LFS ((1UL<<31) - 1) 1036#define MAX_NON_LFS ((1UL<<31) - 1)
1034 1037
1035/* Page cache limit. The filesystems should put that into their s_maxbytes 1038/* Page cache limit. The filesystems should put that into their s_maxbytes
1036 limits, otherwise bad things can happen in VM. */ 1039 limits, otherwise bad things can happen in VM. */
1037#if BITS_PER_LONG==32 1040#if BITS_PER_LONG==32
1038#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) 1041#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
1039#elif BITS_PER_LONG==64 1042#elif BITS_PER_LONG==64
1040#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL 1043#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
1041#endif 1044#endif
@@ -2234,7 +2237,7 @@ extern void free_write_pipe(struct file *);
2234 2237
2235extern int kernel_read(struct file *, loff_t, char *, unsigned long); 2238extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2236extern struct file * open_exec(const char *); 2239extern struct file * open_exec(const char *);
2237 2240
2238/* fs/dcache.c -- generic fs support functions */ 2241/* fs/dcache.c -- generic fs support functions */
2239extern int is_subdir(struct dentry *, struct dentry *); 2242extern int is_subdir(struct dentry *, struct dentry *);
2240extern int path_is_under(struct path *, struct path *); 2243extern int path_is_under(struct path *, struct path *);
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index fd0dc30c9f15..d91bba539ca8 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -174,6 +174,7 @@ enum hrtimer_base_type {
174 * @nr_hangs: Total number of hrtimer interrupt hangs 174 * @nr_hangs: Total number of hrtimer interrupt hangs
175 * @max_hang_time: Maximum time spent in hrtimer_interrupt 175 * @max_hang_time: Maximum time spent in hrtimer_interrupt
176 * @clock_base: array of clock bases for this cpu 176 * @clock_base: array of clock bases for this cpu
177 * @to_pull: LITMUS^RT list of timers to be pulled on this cpu
177 */ 178 */
178struct hrtimer_cpu_base { 179struct hrtimer_cpu_base {
179 raw_spinlock_t lock; 180 raw_spinlock_t lock;
@@ -188,8 +189,32 @@ struct hrtimer_cpu_base {
188 ktime_t max_hang_time; 189 ktime_t max_hang_time;
189#endif 190#endif
190 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; 191 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
192 struct list_head to_pull;
191}; 193};
192 194
195#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
196
197#define HRTIMER_START_ON_INACTIVE 0
198#define HRTIMER_START_ON_QUEUED 1
199
200/*
201 * struct hrtimer_start_on_info - save timer info on remote cpu
202 * @list: list of hrtimer_start_on_info on remote cpu (to_pull)
203 * @timer: timer to be triggered on remote cpu
204 * @time: time event
205 * @mode: timer mode
206 * @state: activity flag
207 */
208struct hrtimer_start_on_info {
209 struct list_head list;
210 struct hrtimer *timer;
211 ktime_t time;
212 enum hrtimer_mode mode;
213 atomic_t state;
214};
215
216#endif
217
193static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) 218static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
194{ 219{
195 timer->node.expires = time; 220 timer->node.expires = time;
@@ -355,6 +380,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
355 unsigned long delta_ns, 380 unsigned long delta_ns,
356 const enum hrtimer_mode mode, int wakeup); 381 const enum hrtimer_mode mode, int wakeup);
357 382
383#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
384extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info);
385extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info,
386 struct hrtimer *timer, ktime_t time,
387 const enum hrtimer_mode mode);
388#endif
389
358extern int hrtimer_cancel(struct hrtimer *timer); 390extern int hrtimer_cancel(struct hrtimer *timer);
359extern int hrtimer_try_to_cancel(struct hrtimer *timer); 391extern int hrtimer_try_to_cancel(struct hrtimer *timer);
360 392
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 14a6c7b545de..9c990d13ae35 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -39,6 +39,7 @@
39#define SCHED_BATCH 3 39#define SCHED_BATCH 3
40/* SCHED_ISO: reserved but not implemented yet */ 40/* SCHED_ISO: reserved but not implemented yet */
41#define SCHED_IDLE 5 41#define SCHED_IDLE 5
42#define SCHED_LITMUS 6
42/* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */ 43/* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */
43#define SCHED_RESET_ON_FORK 0x40000000 44#define SCHED_RESET_ON_FORK 0x40000000
44 45
@@ -93,6 +94,9 @@ struct sched_param {
93 94
94#include <asm/processor.h> 95#include <asm/processor.h>
95 96
97#include <litmus/rt_param.h>
98#include <litmus/preempt.h>
99
96struct exec_domain; 100struct exec_domain;
97struct futex_pi_state; 101struct futex_pi_state;
98struct robust_list_head; 102struct robust_list_head;
@@ -1209,6 +1213,7 @@ struct sched_rt_entity {
1209}; 1213};
1210 1214
1211struct rcu_node; 1215struct rcu_node;
1216struct od_table_entry;
1212 1217
1213enum perf_event_task_context { 1218enum perf_event_task_context {
1214 perf_invalid_context = -1, 1219 perf_invalid_context = -1,
@@ -1313,9 +1318,9 @@ struct task_struct {
1313 unsigned long stack_canary; 1318 unsigned long stack_canary;
1314#endif 1319#endif
1315 1320
1316 /* 1321 /*
1317 * pointers to (original) parent process, youngest child, younger sibling, 1322 * pointers to (original) parent process, youngest child, younger sibling,
1318 * older sibling, respectively. (p->father can be replaced with 1323 * older sibling, respectively. (p->father can be replaced with
1319 * p->real_parent->pid) 1324 * p->real_parent->pid)
1320 */ 1325 */
1321 struct task_struct *real_parent; /* real parent process */ 1326 struct task_struct *real_parent; /* real parent process */
@@ -1526,6 +1531,13 @@ struct task_struct {
1526 int make_it_fail; 1531 int make_it_fail;
1527#endif 1532#endif
1528 struct prop_local_single dirties; 1533 struct prop_local_single dirties;
1534
1535 /* LITMUS RT parameters and state */
1536 struct rt_param rt_param;
1537
1538 /* references to PI semaphores, etc. */
1539 struct od_table_entry *od_table;
1540
1529#ifdef CONFIG_LATENCYTOP 1541#ifdef CONFIG_LATENCYTOP
1530 int latency_record_count; 1542 int latency_record_count;
1531 struct latency_record latency_record[LT_SAVECOUNT]; 1543 struct latency_record latency_record[LT_SAVECOUNT];
@@ -2136,7 +2148,7 @@ static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, s
2136 spin_unlock_irqrestore(&tsk->sighand->siglock, flags); 2148 spin_unlock_irqrestore(&tsk->sighand->siglock, flags);
2137 2149
2138 return ret; 2150 return ret;
2139} 2151}
2140 2152
2141extern void block_all_signals(int (*notifier)(void *priv), void *priv, 2153extern void block_all_signals(int (*notifier)(void *priv), void *priv,
2142 sigset_t *mask); 2154 sigset_t *mask);
@@ -2446,6 +2458,7 @@ static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
2446static inline void set_tsk_need_resched(struct task_struct *tsk) 2458static inline void set_tsk_need_resched(struct task_struct *tsk)
2447{ 2459{
2448 set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); 2460 set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
2461 sched_state_will_schedule(tsk);
2449} 2462}
2450 2463
2451static inline void clear_tsk_need_resched(struct task_struct *tsk) 2464static inline void clear_tsk_need_resched(struct task_struct *tsk)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 8cc38d3bab0c..53b1beef27ad 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -82,6 +82,11 @@ int smp_call_function_any(const struct cpumask *mask,
82 smp_call_func_t func, void *info, int wait); 82 smp_call_func_t func, void *info, int wait);
83 83
84/* 84/*
85 * sends a 'pull timer' event to a remote CPU
86 */
87extern void smp_send_pull_timers(int cpu);
88
89/*
85 * Generic and arch helpers 90 * Generic and arch helpers
86 */ 91 */
87#ifdef CONFIG_USE_GENERIC_SMP_HELPERS 92#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);
74extern struct tick_device *tick_get_device(int cpu); 74extern 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
77extern int tick_init_highres(void); 82extern int tick_init_highres(void);
78extern int tick_program_event(ktime_t expires, int force); 83extern int tick_program_event(ktime_t expires, int force);
79extern void tick_setup_sched_timer(void); 84extern void tick_setup_sched_timer(void);