diff options
Diffstat (limited to 'include/linux/init_task.h')
| -rw-r--r-- | include/linux/init_task.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 5368fbdc7801..21a6f5d9af22 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -94,15 +94,25 @@ extern struct group_info init_groups; | |||
| 94 | # define CAP_INIT_BSET CAP_INIT_EFF_SET | 94 | # define CAP_INIT_BSET CAP_INIT_EFF_SET |
| 95 | #endif | 95 | #endif |
| 96 | 96 | ||
| 97 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
| 98 | #define INIT_TASK_RCU_PREEMPT(tsk) \ | ||
| 99 | .rcu_read_lock_nesting = 0, \ | ||
| 100 | .rcu_read_unlock_special = 0, \ | ||
| 101 | .rcu_blocked_node = NULL, \ | ||
| 102 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), | ||
| 103 | #else | ||
| 104 | #define INIT_TASK_RCU_PREEMPT(tsk) | ||
| 105 | #endif | ||
| 106 | |||
| 97 | extern struct cred init_cred; | 107 | extern struct cred init_cred; |
| 98 | 108 | ||
| 99 | #ifdef CONFIG_PERF_COUNTERS | 109 | #ifdef CONFIG_PERF_EVENTS |
| 100 | # define INIT_PERF_COUNTERS(tsk) \ | 110 | # define INIT_PERF_EVENTS(tsk) \ |
| 101 | .perf_counter_mutex = \ | 111 | .perf_event_mutex = \ |
| 102 | __MUTEX_INITIALIZER(tsk.perf_counter_mutex), \ | 112 | __MUTEX_INITIALIZER(tsk.perf_event_mutex), \ |
| 103 | .perf_counter_list = LIST_HEAD_INIT(tsk.perf_counter_list), | 113 | .perf_event_list = LIST_HEAD_INIT(tsk.perf_event_list), |
| 104 | #else | 114 | #else |
| 105 | # define INIT_PERF_COUNTERS(tsk) | 115 | # define INIT_PERF_EVENTS(tsk) |
| 106 | #endif | 116 | #endif |
| 107 | 117 | ||
| 108 | /* | 118 | /* |
| @@ -168,11 +178,12 @@ extern struct cred init_cred; | |||
| 168 | }, \ | 178 | }, \ |
| 169 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ | 179 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ |
| 170 | INIT_IDS \ | 180 | INIT_IDS \ |
| 171 | INIT_PERF_COUNTERS(tsk) \ | 181 | INIT_PERF_EVENTS(tsk) \ |
| 172 | INIT_TRACE_IRQFLAGS \ | 182 | INIT_TRACE_IRQFLAGS \ |
| 173 | INIT_LOCKDEP \ | 183 | INIT_LOCKDEP \ |
| 174 | INIT_FTRACE_GRAPH \ | 184 | INIT_FTRACE_GRAPH \ |
| 175 | INIT_TRACE_RECURSION \ | 185 | INIT_TRACE_RECURSION \ |
| 186 | INIT_TASK_RCU_PREEMPT(tsk) \ | ||
| 176 | } | 187 | } |
| 177 | 188 | ||
| 178 | 189 | ||
| @@ -183,5 +194,8 @@ extern struct cred init_cred; | |||
| 183 | LIST_HEAD_INIT(cpu_timers[2]), \ | 194 | LIST_HEAD_INIT(cpu_timers[2]), \ |
| 184 | } | 195 | } |
| 185 | 196 | ||
| 197 | /* Attach to the init_task data structure for proper alignment */ | ||
| 198 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | ||
| 199 | |||
| 186 | 200 | ||
| 187 | #endif | 201 | #endif |
