diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hardirq.h | 6 | ||||
| -rw-r--r-- | include/linux/kernel.h | 9 | ||||
| -rw-r--r-- | include/linux/profile.h | 11 | ||||
| -rw-r--r-- | include/linux/radix-tree.h | 13 | ||||
| -rw-r--r-- | include/linux/smp.h | 11 | ||||
| -rw-r--r-- | include/linux/smp_lock.h | 2 | ||||
| -rw-r--r-- | include/linux/workqueue.h | 3 |
7 files changed, 46 insertions, 9 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 70b12547cfb2..16966fbab185 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -77,9 +77,9 @@ | |||
| 77 | * Are we doing bottom half or hardware interrupt processing? | 77 | * Are we doing bottom half or hardware interrupt processing? |
| 78 | * Are we in a softirq context? Interrupt context? | 78 | * Are we in a softirq context? Interrupt context? |
| 79 | */ | 79 | */ |
| 80 | #define in_irq() (hardirq_count()) | 80 | #define in_irq() (hardirq_count() || (current->flags & PF_HARDIRQ)) |
| 81 | #define in_softirq() (softirq_count()) | 81 | #define in_softirq() (softirq_count() || (current->flags & PF_SOFTIRQ)) |
| 82 | #define in_interrupt() (irq_count()) | 82 | #define in_interrupt() (irq_count()) |
| 83 | 83 | ||
| 84 | /* | 84 | /* |
| 85 | * Are we in NMI context? | 85 | * Are we in NMI context? |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d6320a3e8def..4651e0971d75 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -124,7 +124,7 @@ extern int _cond_resched(void); | |||
| 124 | # define might_resched() do { } while (0) | 124 | # define might_resched() do { } while (0) |
| 125 | #endif | 125 | #endif |
| 126 | 126 | ||
| 127 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | 127 | #if defined(CONFIG_DEBUG_SPINLOCK_SLEEP) || defined(CONFIG_DEBUG_PREEMPT) |
| 128 | void __might_sleep(char *file, int line); | 128 | void __might_sleep(char *file, int line); |
| 129 | /** | 129 | /** |
| 130 | * might_sleep - annotation for functions that can sleep | 130 | * might_sleep - annotation for functions that can sleep |
| @@ -284,6 +284,12 @@ extern void printk_tick(void); | |||
| 284 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | 284 | extern void asmlinkage __attribute__((format(printf, 1, 2))) |
| 285 | early_printk(const char *fmt, ...); | 285 | early_printk(const char *fmt, ...); |
| 286 | 286 | ||
| 287 | #ifdef CONFIG_PREEMPT_RT | ||
| 288 | extern void zap_rt_locks(void); | ||
| 289 | #else | ||
| 290 | # define zap_rt_locks() do { } while (0) | ||
| 291 | #endif | ||
| 292 | |||
| 287 | unsigned long int_sqrt(unsigned long); | 293 | unsigned long int_sqrt(unsigned long); |
| 288 | 294 | ||
| 289 | static inline void console_silent(void) | 295 | static inline void console_silent(void) |
| @@ -313,6 +319,7 @@ extern int root_mountflags; | |||
| 313 | /* Values used for system_state */ | 319 | /* Values used for system_state */ |
| 314 | extern enum system_states { | 320 | extern enum system_states { |
| 315 | SYSTEM_BOOTING, | 321 | SYSTEM_BOOTING, |
| 322 | SYSTEM_BOOTING_SCHEDULER_OK, | ||
| 316 | SYSTEM_RUNNING, | 323 | SYSTEM_RUNNING, |
| 317 | SYSTEM_HALT, | 324 | SYSTEM_HALT, |
| 318 | SYSTEM_POWER_OFF, | 325 | SYSTEM_POWER_OFF, |
diff --git a/include/linux/profile.h b/include/linux/profile.h index a0fc32279fc0..5b72082c273e 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h | |||
| @@ -8,10 +8,11 @@ | |||
| 8 | 8 | ||
| 9 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
| 10 | 10 | ||
| 11 | #define CPU_PROFILING 1 | 11 | #define CPU_PROFILING 1 |
| 12 | #define SCHED_PROFILING 2 | 12 | #define SCHED_PROFILING 2 |
| 13 | #define SLEEP_PROFILING 3 | 13 | #define SLEEP_PROFILING 3 |
| 14 | #define KVM_PROFILING 4 | 14 | #define KVM_PROFILING 4 |
| 15 | #define PREEMPT_PROFILING 5 | ||
| 15 | 16 | ||
| 16 | struct proc_dir_entry; | 17 | struct proc_dir_entry; |
| 17 | struct pt_regs; | 18 | struct pt_regs; |
| @@ -36,6 +37,8 @@ enum profile_type { | |||
| 36 | PROFILE_MUNMAP | 37 | PROFILE_MUNMAP |
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 40 | extern int prof_pid; | ||
| 41 | |||
| 39 | #ifdef CONFIG_PROFILING | 42 | #ifdef CONFIG_PROFILING |
| 40 | 43 | ||
| 41 | extern int prof_on __read_mostly; | 44 | extern int prof_on __read_mostly; |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da74918096..9eb17f95857b 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -169,7 +169,18 @@ unsigned long radix_tree_next_hole(struct radix_tree_root *root, | |||
| 169 | unsigned long index, unsigned long max_scan); | 169 | unsigned long index, unsigned long max_scan); |
| 170 | unsigned long radix_tree_prev_hole(struct radix_tree_root *root, | 170 | unsigned long radix_tree_prev_hole(struct radix_tree_root *root, |
| 171 | unsigned long index, unsigned long max_scan); | 171 | unsigned long index, unsigned long max_scan); |
| 172 | /* | ||
| 173 | * On a mutex based kernel we can freely schedule within the radix code: | ||
| 174 | */ | ||
| 175 | #ifdef CONFIG_PREEMPT_RT | ||
| 176 | static inline int radix_tree_preload(gfp_t gfp_mask) | ||
| 177 | { | ||
| 178 | return 0; | ||
| 179 | } | ||
| 180 | #else | ||
| 172 | int radix_tree_preload(gfp_t gfp_mask); | 181 | int radix_tree_preload(gfp_t gfp_mask); |
| 182 | #endif | ||
| 183 | |||
| 173 | void radix_tree_init(void); | 184 | void radix_tree_init(void); |
| 174 | void *radix_tree_tag_set(struct radix_tree_root *root, | 185 | void *radix_tree_tag_set(struct radix_tree_root *root, |
| 175 | unsigned long index, unsigned int tag); | 186 | unsigned long index, unsigned int tag); |
| @@ -189,7 +200,9 @@ int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); | |||
| 189 | 200 | ||
| 190 | static inline void radix_tree_preload_end(void) | 201 | static inline void radix_tree_preload_end(void) |
| 191 | { | 202 | { |
| 203 | #ifndef CONFIG_PREEMPT_RT | ||
| 192 | preempt_enable(); | 204 | preempt_enable(); |
| 205 | #endif | ||
| 193 | } | 206 | } |
| 194 | 207 | ||
| 195 | #endif /* _LINUX_RADIX_TREE_H */ | 208 | #endif /* _LINUX_RADIX_TREE_H */ |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 9e3d8af09207..378005121d60 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -50,6 +50,16 @@ extern void smp_send_stop(void); | |||
| 50 | */ | 50 | */ |
| 51 | extern void smp_send_reschedule(int cpu); | 51 | extern void smp_send_reschedule(int cpu); |
| 52 | 52 | ||
| 53 | /* | ||
| 54 | * trigger a reschedule on all other CPUs: | ||
| 55 | */ | ||
| 56 | extern void smp_send_reschedule_allbutself(void); | ||
| 57 | |||
| 58 | /* | ||
| 59 | * trigger a reschedule on all other CPUs: | ||
| 60 | */ | ||
| 61 | extern void smp_send_reschedule_allbutself(void); | ||
| 62 | |||
| 53 | 63 | ||
| 54 | /* | 64 | /* |
| 55 | * Prepare machine for booting other CPUs. | 65 | * Prepare machine for booting other CPUs. |
| @@ -142,6 +152,7 @@ static inline int up_smp_call_function(void (*func)(void *), void *info) | |||
| 142 | 0; \ | 152 | 0; \ |
| 143 | }) | 153 | }) |
| 144 | static inline void smp_send_reschedule(int cpu) { } | 154 | static inline void smp_send_reschedule(int cpu) { } |
| 155 | static inline void smp_send_reschedule_allbutself(void) { } | ||
| 145 | #define num_booting_cpus() 1 | 156 | #define num_booting_cpus() 1 |
| 146 | #define smp_prepare_boot_cpu() do {} while (0) | 157 | #define smp_prepare_boot_cpu() do {} while (0) |
| 147 | #define smp_call_function_mask(mask, func, info, wait) \ | 158 | #define smp_call_function_mask(mask, func, info, wait) \ |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 813be59bf345..0cb3cf9a68ef 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
| @@ -45,7 +45,7 @@ static inline void cycle_kernel_lock(void) | |||
| 45 | #define unlock_kernel() do { } while(0) | 45 | #define unlock_kernel() do { } while(0) |
| 46 | #define release_kernel_lock(task) do { } while(0) | 46 | #define release_kernel_lock(task) do { } while(0) |
| 47 | #define cycle_kernel_lock() do { } while(0) | 47 | #define cycle_kernel_lock() do { } while(0) |
| 48 | #define reacquire_kernel_lock(task) 0 | 48 | #define reacquire_kernel_lock(task) do { } while(0) |
| 49 | #define kernel_locked() 1 | 49 | #define kernel_locked() 1 |
| 50 | 50 | ||
| 51 | #endif /* CONFIG_LOCK_KERNEL */ | 51 | #endif /* CONFIG_LOCK_KERNEL */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 13e1adf55c4c..3f363b7168c4 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -195,6 +195,9 @@ __create_workqueue_key(const char *name, int singlethread, | |||
| 195 | #define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1, 0) | 195 | #define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1, 0) |
| 196 | #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0, 0) | 196 | #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0, 0) |
| 197 | 197 | ||
| 198 | extern void set_workqueue_prio(struct workqueue_struct *wq, int policy, | ||
| 199 | int rt_priority, int nice); | ||
| 200 | |||
| 198 | extern void destroy_workqueue(struct workqueue_struct *wq); | 201 | extern void destroy_workqueue(struct workqueue_struct *wq); |
| 199 | 202 | ||
| 200 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); | 203 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); |
