diff options
84 files changed, 62 insertions, 194 deletions
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 48bbea6898b3..d5b98ab514bb 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h | |||
@@ -27,8 +27,6 @@ struct thread_info { | |||
27 | int bpt_nsaved; | 27 | int bpt_nsaved; |
28 | unsigned long bpt_addr[2]; /* breakpoint handling */ | 28 | unsigned long bpt_addr[2]; /* breakpoint handling */ |
29 | unsigned int bpt_insn[2]; | 29 | unsigned int bpt_insn[2]; |
30 | |||
31 | struct restart_block restart_block; | ||
32 | }; | 30 | }; |
33 | 31 | ||
34 | /* | 32 | /* |
@@ -40,9 +38,6 @@ struct thread_info { | |||
40 | .exec_domain = &default_exec_domain, \ | 38 | .exec_domain = &default_exec_domain, \ |
41 | .addr_limit = KERNEL_DS, \ | 39 | .addr_limit = KERNEL_DS, \ |
42 | .preempt_count = INIT_PREEMPT_COUNT, \ | 40 | .preempt_count = INIT_PREEMPT_COUNT, \ |
43 | .restart_block = { \ | ||
44 | .fn = do_no_restart_syscall, \ | ||
45 | }, \ | ||
46 | } | 41 | } |
47 | 42 | ||
48 | #define init_thread_info (init_thread_union.thread_info) | 43 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 6cec2881acbf..8dbfb15f1745 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -150,7 +150,7 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) | |||
150 | struct switch_stack *sw = (struct switch_stack *)regs - 1; | 150 | struct switch_stack *sw = (struct switch_stack *)regs - 1; |
151 | long i, err = __get_user(regs->pc, &sc->sc_pc); | 151 | long i, err = __get_user(regs->pc, &sc->sc_pc); |
152 | 152 | ||
153 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 153 | current->restart_block.fn = do_no_restart_syscall; |
154 | 154 | ||
155 | sw->r26 = (unsigned long) ret_from_sys_call; | 155 | sw->r26 = (unsigned long) ret_from_sys_call; |
156 | 156 | ||
diff --git a/arch/arc/include/asm/thread_info.h b/arch/arc/include/asm/thread_info.h index 02bc5ec0fb2e..1163a1838ac1 100644 --- a/arch/arc/include/asm/thread_info.h +++ b/arch/arc/include/asm/thread_info.h | |||
@@ -46,7 +46,6 @@ struct thread_info { | |||
46 | struct exec_domain *exec_domain;/* execution domain */ | 46 | struct exec_domain *exec_domain;/* execution domain */ |
47 | __u32 cpu; /* current CPU */ | 47 | __u32 cpu; /* current CPU */ |
48 | unsigned long thr_ptr; /* TLS ptr */ | 48 | unsigned long thr_ptr; /* TLS ptr */ |
49 | struct restart_block restart_block; | ||
50 | }; | 49 | }; |
51 | 50 | ||
52 | /* | 51 | /* |
@@ -62,9 +61,6 @@ struct thread_info { | |||
62 | .cpu = 0, \ | 61 | .cpu = 0, \ |
63 | .preempt_count = INIT_PREEMPT_COUNT, \ | 62 | .preempt_count = INIT_PREEMPT_COUNT, \ |
64 | .addr_limit = KERNEL_DS, \ | 63 | .addr_limit = KERNEL_DS, \ |
65 | .restart_block = { \ | ||
66 | .fn = do_no_restart_syscall, \ | ||
67 | }, \ | ||
68 | } | 64 | } |
69 | 65 | ||
70 | #define init_thread_info (init_thread_union.thread_info) | 66 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c index cb3142a2d40b..114234e83caa 100644 --- a/arch/arc/kernel/signal.c +++ b/arch/arc/kernel/signal.c | |||
@@ -104,7 +104,7 @@ SYSCALL_DEFINE0(rt_sigreturn) | |||
104 | struct pt_regs *regs = current_pt_regs(); | 104 | struct pt_regs *regs = current_pt_regs(); |
105 | 105 | ||
106 | /* Always make any pending restarted system calls return -EINTR */ | 106 | /* Always make any pending restarted system calls return -EINTR */ |
107 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 107 | current->restart_block.fn = do_no_restart_syscall; |
108 | 108 | ||
109 | /* Since we stacked the signal on a word boundary, | 109 | /* Since we stacked the signal on a word boundary, |
110 | * then 'sp' should be word aligned here. If it's | 110 | * then 'sp' should be word aligned here. If it's |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index d890e41f5520..72812a1f3d1c 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -68,7 +68,6 @@ struct thread_info { | |||
68 | #ifdef CONFIG_ARM_THUMBEE | 68 | #ifdef CONFIG_ARM_THUMBEE |
69 | unsigned long thumbee_state; /* ThumbEE Handler Base register */ | 69 | unsigned long thumbee_state; /* ThumbEE Handler Base register */ |
70 | #endif | 70 | #endif |
71 | struct restart_block restart_block; | ||
72 | }; | 71 | }; |
73 | 72 | ||
74 | #define INIT_THREAD_INFO(tsk) \ | 73 | #define INIT_THREAD_INFO(tsk) \ |
@@ -81,9 +80,6 @@ struct thread_info { | |||
81 | .cpu_domain = domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ | 80 | .cpu_domain = domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ |
82 | domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ | 81 | domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ |
83 | domain_val(DOMAIN_IO, DOMAIN_CLIENT), \ | 82 | domain_val(DOMAIN_IO, DOMAIN_CLIENT), \ |
84 | .restart_block = { \ | ||
85 | .fn = do_no_restart_syscall, \ | ||
86 | }, \ | ||
87 | } | 83 | } |
88 | 84 | ||
89 | #define init_thread_info (init_thread_union.thread_info) | 85 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 8aa6f1b87c9e..023ac905e4c3 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -191,7 +191,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) | |||
191 | struct sigframe __user *frame; | 191 | struct sigframe __user *frame; |
192 | 192 | ||
193 | /* Always make any pending restarted system calls return -EINTR */ | 193 | /* Always make any pending restarted system calls return -EINTR */ |
194 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 194 | current->restart_block.fn = do_no_restart_syscall; |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * Since we stacked the signal on a 64-bit boundary, | 197 | * Since we stacked the signal on a 64-bit boundary, |
@@ -221,7 +221,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | |||
221 | struct rt_sigframe __user *frame; | 221 | struct rt_sigframe __user *frame; |
222 | 222 | ||
223 | /* Always make any pending restarted system calls return -EINTR */ | 223 | /* Always make any pending restarted system calls return -EINTR */ |
224 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 224 | current->restart_block.fn = do_no_restart_syscall; |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * Since we stacked the signal on a 64-bit boundary, | 227 | * Since we stacked the signal on a 64-bit boundary, |
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index 459bf8e53208..702e1e6a0d80 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h | |||
@@ -48,7 +48,6 @@ struct thread_info { | |||
48 | mm_segment_t addr_limit; /* address limit */ | 48 | mm_segment_t addr_limit; /* address limit */ |
49 | struct task_struct *task; /* main task structure */ | 49 | struct task_struct *task; /* main task structure */ |
50 | struct exec_domain *exec_domain; /* execution domain */ | 50 | struct exec_domain *exec_domain; /* execution domain */ |
51 | struct restart_block restart_block; | ||
52 | int preempt_count; /* 0 => preemptable, <0 => bug */ | 51 | int preempt_count; /* 0 => preemptable, <0 => bug */ |
53 | int cpu; /* cpu */ | 52 | int cpu; /* cpu */ |
54 | }; | 53 | }; |
@@ -60,9 +59,6 @@ struct thread_info { | |||
60 | .flags = 0, \ | 59 | .flags = 0, \ |
61 | .preempt_count = INIT_PREEMPT_COUNT, \ | 60 | .preempt_count = INIT_PREEMPT_COUNT, \ |
62 | .addr_limit = KERNEL_DS, \ | 61 | .addr_limit = KERNEL_DS, \ |
63 | .restart_block = { \ | ||
64 | .fn = do_no_restart_syscall, \ | ||
65 | }, \ | ||
66 | } | 62 | } |
67 | 63 | ||
68 | #define init_thread_info (init_thread_union.thread_info) | 64 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 6fa792137eda..660ccf9f7524 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c | |||
@@ -131,7 +131,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
131 | struct rt_sigframe __user *frame; | 131 | struct rt_sigframe __user *frame; |
132 | 132 | ||
133 | /* Always make any pending restarted system calls return -EINTR */ | 133 | /* Always make any pending restarted system calls return -EINTR */ |
134 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 134 | current->restart_block.fn = do_no_restart_syscall; |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * Since we stacked the signal on a 128-bit boundary, then 'sp' should | 137 | * Since we stacked the signal on a 128-bit boundary, then 'sp' should |
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index e299de396e9b..c20a300e2213 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c | |||
@@ -347,7 +347,7 @@ asmlinkage int compat_sys_sigreturn(struct pt_regs *regs) | |||
347 | struct compat_sigframe __user *frame; | 347 | struct compat_sigframe __user *frame; |
348 | 348 | ||
349 | /* Always make any pending restarted system calls return -EINTR */ | 349 | /* Always make any pending restarted system calls return -EINTR */ |
350 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 350 | current->restart_block.fn = do_no_restart_syscall; |
351 | 351 | ||
352 | /* | 352 | /* |
353 | * Since we stacked the signal on a 64-bit boundary, | 353 | * Since we stacked the signal on a 64-bit boundary, |
@@ -381,7 +381,7 @@ asmlinkage int compat_sys_rt_sigreturn(struct pt_regs *regs) | |||
381 | struct compat_rt_sigframe __user *frame; | 381 | struct compat_rt_sigframe __user *frame; |
382 | 382 | ||
383 | /* Always make any pending restarted system calls return -EINTR */ | 383 | /* Always make any pending restarted system calls return -EINTR */ |
384 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 384 | current->restart_block.fn = do_no_restart_syscall; |
385 | 385 | ||
386 | /* | 386 | /* |
387 | * Since we stacked the signal on a 64-bit boundary, | 387 | * Since we stacked the signal on a 64-bit boundary, |
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h index a978f3fe7c25..d56afa99a514 100644 --- a/arch/avr32/include/asm/thread_info.h +++ b/arch/avr32/include/asm/thread_info.h | |||
@@ -30,7 +30,6 @@ struct thread_info { | |||
30 | saved by debug handler | 30 | saved by debug handler |
31 | when setting up | 31 | when setting up |
32 | trampoline */ | 32 | trampoline */ |
33 | struct restart_block restart_block; | ||
34 | __u8 supervisor_stack[0]; | 33 | __u8 supervisor_stack[0]; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -41,9 +40,6 @@ struct thread_info { | |||
41 | .flags = 0, \ | 40 | .flags = 0, \ |
42 | .cpu = 0, \ | 41 | .cpu = 0, \ |
43 | .preempt_count = INIT_PREEMPT_COUNT, \ | 42 | .preempt_count = INIT_PREEMPT_COUNT, \ |
44 | .restart_block = { \ | ||
45 | .fn = do_no_restart_syscall \ | ||
46 | } \ | ||
47 | } | 43 | } |
48 | 44 | ||
49 | #define init_thread_info (init_thread_union.thread_info) | 45 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/avr32/kernel/asm-offsets.c b/arch/avr32/kernel/asm-offsets.c index d6a8193a1d2f..e41c84516e5d 100644 --- a/arch/avr32/kernel/asm-offsets.c +++ b/arch/avr32/kernel/asm-offsets.c | |||
@@ -18,7 +18,6 @@ void foo(void) | |||
18 | OFFSET(TI_preempt_count, thread_info, preempt_count); | 18 | OFFSET(TI_preempt_count, thread_info, preempt_count); |
19 | OFFSET(TI_rar_saved, thread_info, rar_saved); | 19 | OFFSET(TI_rar_saved, thread_info, rar_saved); |
20 | OFFSET(TI_rsr_saved, thread_info, rsr_saved); | 20 | OFFSET(TI_rsr_saved, thread_info, rsr_saved); |
21 | OFFSET(TI_restart_block, thread_info, restart_block); | ||
22 | BLANK(); | 21 | BLANK(); |
23 | OFFSET(TSK_active_mm, task_struct, active_mm); | 22 | OFFSET(TSK_active_mm, task_struct, active_mm); |
24 | BLANK(); | 23 | BLANK(); |
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index d309fbcc3bd6..8f1c63b9b983 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -69,7 +69,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | |||
69 | sigset_t set; | 69 | sigset_t set; |
70 | 70 | ||
71 | /* Always make any pending restarted system calls return -EINTR */ | 71 | /* Always make any pending restarted system calls return -EINTR */ |
72 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 72 | current->restart_block.fn = do_no_restart_syscall; |
73 | 73 | ||
74 | frame = (struct rt_sigframe __user *)regs->sp; | 74 | frame = (struct rt_sigframe __user *)regs->sp; |
75 | pr_debug("SIG return: frame = %p\n", frame); | 75 | pr_debug("SIG return: frame = %p\n", frame); |
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index 55f473bdad36..57c3a8bd583d 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h | |||
@@ -42,7 +42,6 @@ struct thread_info { | |||
42 | int cpu; /* cpu we're on */ | 42 | int cpu; /* cpu we're on */ |
43 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 43 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
44 | mm_segment_t addr_limit; /* address limit */ | 44 | mm_segment_t addr_limit; /* address limit */ |
45 | struct restart_block restart_block; | ||
46 | #ifndef CONFIG_SMP | 45 | #ifndef CONFIG_SMP |
47 | struct l1_scratch_task_info l1_task_info; | 46 | struct l1_scratch_task_info l1_task_info; |
48 | #endif | 47 | #endif |
@@ -58,9 +57,6 @@ struct thread_info { | |||
58 | .flags = 0, \ | 57 | .flags = 0, \ |
59 | .cpu = 0, \ | 58 | .cpu = 0, \ |
60 | .preempt_count = INIT_PREEMPT_COUNT, \ | 59 | .preempt_count = INIT_PREEMPT_COUNT, \ |
61 | .restart_block = { \ | ||
62 | .fn = do_no_restart_syscall, \ | ||
63 | }, \ | ||
64 | } | 60 | } |
65 | #define init_thread_info (init_thread_union.thread_info) | 61 | #define init_thread_info (init_thread_union.thread_info) |
66 | #define init_stack (init_thread_union.stack) | 62 | #define init_stack (init_thread_union.stack) |
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index ef275571d885..f2a8b5493bd3 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -44,7 +44,7 @@ rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *p | |||
44 | int err = 0; | 44 | int err = 0; |
45 | 45 | ||
46 | /* Always make any pending restarted system calls return -EINTR */ | 46 | /* Always make any pending restarted system calls return -EINTR */ |
47 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 47 | current->restart_block.fn = do_no_restart_syscall; |
48 | 48 | ||
49 | #define RESTORE(x) err |= __get_user(regs->x, &sc->sc_##x) | 49 | #define RESTORE(x) err |= __get_user(regs->x, &sc->sc_##x) |
50 | 50 | ||
diff --git a/arch/c6x/include/asm/thread_info.h b/arch/c6x/include/asm/thread_info.h index d4e9ef87076d..584e253f3217 100644 --- a/arch/c6x/include/asm/thread_info.h +++ b/arch/c6x/include/asm/thread_info.h | |||
@@ -45,7 +45,6 @@ struct thread_info { | |||
45 | int cpu; /* cpu we're on */ | 45 | int cpu; /* cpu we're on */ |
46 | int preempt_count; /* 0 = preemptable, <0 = BUG */ | 46 | int preempt_count; /* 0 = preemptable, <0 = BUG */ |
47 | mm_segment_t addr_limit; /* thread address space */ | 47 | mm_segment_t addr_limit; /* thread address space */ |
48 | struct restart_block restart_block; | ||
49 | }; | 48 | }; |
50 | 49 | ||
51 | /* | 50 | /* |
@@ -61,9 +60,6 @@ struct thread_info { | |||
61 | .cpu = 0, \ | 60 | .cpu = 0, \ |
62 | .preempt_count = INIT_PREEMPT_COUNT, \ | 61 | .preempt_count = INIT_PREEMPT_COUNT, \ |
63 | .addr_limit = KERNEL_DS, \ | 62 | .addr_limit = KERNEL_DS, \ |
64 | .restart_block = { \ | ||
65 | .fn = do_no_restart_syscall, \ | ||
66 | }, \ | ||
67 | } | 63 | } |
68 | 64 | ||
69 | #define init_thread_info (init_thread_union.thread_info) | 65 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index fe68226f6c4d..3c4bb5a5c382 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c | |||
@@ -68,7 +68,7 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs) | |||
68 | sigset_t set; | 68 | sigset_t set; |
69 | 69 | ||
70 | /* Always make any pending restarted system calls return -EINTR */ | 70 | /* Always make any pending restarted system calls return -EINTR */ |
71 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 71 | current->restart_block.fn = do_no_restart_syscall; |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * Since we stacked the signal on a dword boundary, | 74 | * Since we stacked the signal on a dword boundary, |
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index 9b32d338838b..74d7ba35120d 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c | |||
@@ -67,7 +67,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
67 | unsigned long old_usp; | 67 | unsigned long old_usp; |
68 | 68 | ||
69 | /* Always make any pending restarted system calls return -EINTR */ | 69 | /* Always make any pending restarted system calls return -EINTR */ |
70 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 70 | current->restart_block.fn = do_no_restart_syscall; |
71 | 71 | ||
72 | /* restore the regs from &sc->regs (same as sc, since regs is first) | 72 | /* restore the regs from &sc->regs (same as sc, since regs is first) |
73 | * (sc is already checked for VERIFY_READ since the sigframe was | 73 | * (sc is already checked for VERIFY_READ since the sigframe was |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 78ce3b1c9bcb..870e3e069318 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -59,7 +59,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
59 | unsigned long old_usp; | 59 | unsigned long old_usp; |
60 | 60 | ||
61 | /* Always make any pending restarted system calls return -EINTR */ | 61 | /* Always make any pending restarted system calls return -EINTR */ |
62 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 62 | current->restart_block.fn = do_no_restart_syscall; |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Restore the registers from &sc->regs. sc is already checked | 65 | * Restore the registers from &sc->regs. sc is already checked |
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h index 55dede18c032..7286db5ed90e 100644 --- a/arch/cris/include/asm/thread_info.h +++ b/arch/cris/include/asm/thread_info.h | |||
@@ -38,7 +38,6 @@ struct thread_info { | |||
38 | 0-0xBFFFFFFF for user-thead | 38 | 0-0xBFFFFFFF for user-thead |
39 | 0-0xFFFFFFFF for kernel-thread | 39 | 0-0xFFFFFFFF for kernel-thread |
40 | */ | 40 | */ |
41 | struct restart_block restart_block; | ||
42 | __u8 supervisor_stack[0]; | 41 | __u8 supervisor_stack[0]; |
43 | }; | 42 | }; |
44 | 43 | ||
@@ -56,9 +55,6 @@ struct thread_info { | |||
56 | .cpu = 0, \ | 55 | .cpu = 0, \ |
57 | .preempt_count = INIT_PREEMPT_COUNT, \ | 56 | .preempt_count = INIT_PREEMPT_COUNT, \ |
58 | .addr_limit = KERNEL_DS, \ | 57 | .addr_limit = KERNEL_DS, \ |
59 | .restart_block = { \ | ||
60 | .fn = do_no_restart_syscall, \ | ||
61 | }, \ | ||
62 | } | 58 | } |
63 | 59 | ||
64 | #define init_thread_info (init_thread_union.thread_info) | 60 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h index af29e17c0181..6b917f1c2955 100644 --- a/arch/frv/include/asm/thread_info.h +++ b/arch/frv/include/asm/thread_info.h | |||
@@ -41,7 +41,6 @@ struct thread_info { | |||
41 | * 0-0xBFFFFFFF for user-thead | 41 | * 0-0xBFFFFFFF for user-thead |
42 | * 0-0xFFFFFFFF for kernel-thread | 42 | * 0-0xFFFFFFFF for kernel-thread |
43 | */ | 43 | */ |
44 | struct restart_block restart_block; | ||
45 | 44 | ||
46 | __u8 supervisor_stack[0]; | 45 | __u8 supervisor_stack[0]; |
47 | }; | 46 | }; |
@@ -65,9 +64,6 @@ struct thread_info { | |||
65 | .cpu = 0, \ | 64 | .cpu = 0, \ |
66 | .preempt_count = INIT_PREEMPT_COUNT, \ | 65 | .preempt_count = INIT_PREEMPT_COUNT, \ |
67 | .addr_limit = KERNEL_DS, \ | 66 | .addr_limit = KERNEL_DS, \ |
68 | .restart_block = { \ | ||
69 | .fn = do_no_restart_syscall, \ | ||
70 | }, \ | ||
71 | } | 67 | } |
72 | 68 | ||
73 | #define init_thread_info (init_thread_union.thread_info) | 69 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/frv/kernel/asm-offsets.c b/arch/frv/kernel/asm-offsets.c index 9de96843a278..446e89d500cc 100644 --- a/arch/frv/kernel/asm-offsets.c +++ b/arch/frv/kernel/asm-offsets.c | |||
@@ -40,7 +40,6 @@ void foo(void) | |||
40 | OFFSET(TI_CPU, thread_info, cpu); | 40 | OFFSET(TI_CPU, thread_info, cpu); |
41 | OFFSET(TI_PREEMPT_COUNT, thread_info, preempt_count); | 41 | OFFSET(TI_PREEMPT_COUNT, thread_info, preempt_count); |
42 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); | 42 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); |
43 | OFFSET(TI_RESTART_BLOCK, thread_info, restart_block); | ||
44 | BLANK(); | 43 | BLANK(); |
45 | 44 | ||
46 | /* offsets into register file storage */ | 45 | /* offsets into register file storage */ |
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index dc3d59de0870..336713ab4745 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -62,7 +62,7 @@ static int restore_sigcontext(struct sigcontext __user *sc, int *_gr8) | |||
62 | unsigned long tbr, psr; | 62 | unsigned long tbr, psr; |
63 | 63 | ||
64 | /* Always make any pending restarted system calls return -EINTR */ | 64 | /* Always make any pending restarted system calls return -EINTR */ |
65 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 65 | current->restart_block.fn = do_no_restart_syscall; |
66 | 66 | ||
67 | tbr = user->i.tbr; | 67 | tbr = user->i.tbr; |
68 | psr = user->i.psr; | 68 | psr = user->i.psr; |
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h index a59dad3b3695..bacd3d6030c5 100644 --- a/arch/hexagon/include/asm/thread_info.h +++ b/arch/hexagon/include/asm/thread_info.h | |||
@@ -56,7 +56,6 @@ struct thread_info { | |||
56 | * used for syscalls somehow; | 56 | * used for syscalls somehow; |
57 | * seems to have a function pointer and four arguments | 57 | * seems to have a function pointer and four arguments |
58 | */ | 58 | */ |
59 | struct restart_block restart_block; | ||
60 | /* Points to the current pt_regs frame */ | 59 | /* Points to the current pt_regs frame */ |
61 | struct pt_regs *regs; | 60 | struct pt_regs *regs; |
62 | /* | 61 | /* |
@@ -83,9 +82,6 @@ struct thread_info { | |||
83 | .cpu = 0, \ | 82 | .cpu = 0, \ |
84 | .preempt_count = 1, \ | 83 | .preempt_count = 1, \ |
85 | .addr_limit = KERNEL_DS, \ | 84 | .addr_limit = KERNEL_DS, \ |
86 | .restart_block = { \ | ||
87 | .fn = do_no_restart_syscall, \ | ||
88 | }, \ | ||
89 | .sp = 0, \ | 85 | .sp = 0, \ |
90 | .regs = NULL, \ | 86 | .regs = NULL, \ |
91 | } | 87 | } |
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index eadd70e47e7e..b039a624c170 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c | |||
@@ -239,7 +239,7 @@ asmlinkage int sys_rt_sigreturn(void) | |||
239 | sigset_t blocked; | 239 | sigset_t blocked; |
240 | 240 | ||
241 | /* Always make any pending restarted system calls return -EINTR */ | 241 | /* Always make any pending restarted system calls return -EINTR */ |
242 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 242 | current->restart_block.fn = do_no_restart_syscall; |
243 | 243 | ||
244 | frame = (struct rt_sigframe __user *)pt_psp(regs); | 244 | frame = (struct rt_sigframe __user *)pt_psp(regs); |
245 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 245 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index 5b17418b4223..c16f21a068ff 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -27,7 +27,6 @@ struct thread_info { | |||
27 | __u32 status; /* Thread synchronous flags */ | 27 | __u32 status; /* Thread synchronous flags */ |
28 | mm_segment_t addr_limit; /* user-level address space limit */ | 28 | mm_segment_t addr_limit; /* user-level address space limit */ |
29 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 29 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
30 | struct restart_block restart_block; | ||
31 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | 30 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
32 | __u64 ac_stamp; | 31 | __u64 ac_stamp; |
33 | __u64 ac_leave; | 32 | __u64 ac_leave; |
@@ -46,9 +45,6 @@ struct thread_info { | |||
46 | .cpu = 0, \ | 45 | .cpu = 0, \ |
47 | .addr_limit = KERNEL_DS, \ | 46 | .addr_limit = KERNEL_DS, \ |
48 | .preempt_count = INIT_PREEMPT_COUNT, \ | 47 | .preempt_count = INIT_PREEMPT_COUNT, \ |
49 | .restart_block = { \ | ||
50 | .fn = do_no_restart_syscall, \ | ||
51 | }, \ | ||
52 | } | 48 | } |
53 | 49 | ||
54 | #ifndef ASM_OFFSETS_C | 50 | #ifndef ASM_OFFSETS_C |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 6d92170be457..b3a124da71e5 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -46,7 +46,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) | |||
46 | long err; | 46 | long err; |
47 | 47 | ||
48 | /* Always make any pending restarted system calls return -EINTR */ | 48 | /* Always make any pending restarted system calls return -EINTR */ |
49 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 49 | current->restart_block.fn = do_no_restart_syscall; |
50 | 50 | ||
51 | /* restore scratch that always needs gets updated during signal delivery: */ | 51 | /* restore scratch that always needs gets updated during signal delivery: */ |
52 | err = __get_user(flags, &sc->sc_flags); | 52 | err = __get_user(flags, &sc->sc_flags); |
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index 00171703402f..32422d0211c3 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -34,7 +34,6 @@ struct thread_info { | |||
34 | 0-0xBFFFFFFF for user-thread | 34 | 0-0xBFFFFFFF for user-thread |
35 | 0-0xFFFFFFFF for kernel-thread | 35 | 0-0xFFFFFFFF for kernel-thread |
36 | */ | 36 | */ |
37 | struct restart_block restart_block; | ||
38 | 37 | ||
39 | __u8 supervisor_stack[0]; | 38 | __u8 supervisor_stack[0]; |
40 | }; | 39 | }; |
@@ -49,7 +48,6 @@ struct thread_info { | |||
49 | #define TI_CPU 0x00000010 | 48 | #define TI_CPU 0x00000010 |
50 | #define TI_PRE_COUNT 0x00000014 | 49 | #define TI_PRE_COUNT 0x00000014 |
51 | #define TI_ADDR_LIMIT 0x00000018 | 50 | #define TI_ADDR_LIMIT 0x00000018 |
52 | #define TI_RESTART_BLOCK 0x000001C | ||
53 | 51 | ||
54 | #endif | 52 | #endif |
55 | 53 | ||
@@ -68,9 +66,6 @@ struct thread_info { | |||
68 | .cpu = 0, \ | 66 | .cpu = 0, \ |
69 | .preempt_count = INIT_PREEMPT_COUNT, \ | 67 | .preempt_count = INIT_PREEMPT_COUNT, \ |
70 | .addr_limit = KERNEL_DS, \ | 68 | .addr_limit = KERNEL_DS, \ |
71 | .restart_block = { \ | ||
72 | .fn = do_no_restart_syscall, \ | ||
73 | }, \ | ||
74 | } | 69 | } |
75 | 70 | ||
76 | #define init_thread_info (init_thread_union.thread_info) | 71 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 95408b8f130a..7736c6660a15 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -48,7 +48,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, | |||
48 | unsigned int err = 0; | 48 | unsigned int err = 0; |
49 | 49 | ||
50 | /* Always make any pending restarted system calls return -EINTR */ | 50 | /* Always make any pending restarted system calls return -EINTR */ |
51 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 51 | current->restart_block.fn = do_no_restart_syscall; |
52 | 52 | ||
53 | #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) | 53 | #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) |
54 | COPY(r4); | 54 | COPY(r4); |
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h index 21a4784ca5a1..c54256e69e64 100644 --- a/arch/m68k/include/asm/thread_info.h +++ b/arch/m68k/include/asm/thread_info.h | |||
@@ -31,7 +31,6 @@ struct thread_info { | |||
31 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 31 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
32 | __u32 cpu; /* should always be 0 on m68k */ | 32 | __u32 cpu; /* should always be 0 on m68k */ |
33 | unsigned long tp_value; /* thread pointer */ | 33 | unsigned long tp_value; /* thread pointer */ |
34 | struct restart_block restart_block; | ||
35 | }; | 34 | }; |
36 | #endif /* __ASSEMBLY__ */ | 35 | #endif /* __ASSEMBLY__ */ |
37 | 36 | ||
@@ -41,9 +40,6 @@ struct thread_info { | |||
41 | .exec_domain = &default_exec_domain, \ | 40 | .exec_domain = &default_exec_domain, \ |
42 | .addr_limit = KERNEL_DS, \ | 41 | .addr_limit = KERNEL_DS, \ |
43 | .preempt_count = INIT_PREEMPT_COUNT, \ | 42 | .preempt_count = INIT_PREEMPT_COUNT, \ |
44 | .restart_block = { \ | ||
45 | .fn = do_no_restart_syscall, \ | ||
46 | }, \ | ||
47 | } | 43 | } |
48 | 44 | ||
49 | #define init_stack (init_thread_union.stack) | 45 | #define init_stack (init_thread_union.stack) |
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 967a8b7e1527..d7179281e74a 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c | |||
@@ -655,7 +655,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u | |||
655 | int err = 0; | 655 | int err = 0; |
656 | 656 | ||
657 | /* Always make any pending restarted system calls return -EINTR */ | 657 | /* Always make any pending restarted system calls return -EINTR */ |
658 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 658 | current->restart_block.fn = do_no_restart_syscall; |
659 | 659 | ||
660 | /* get previous context */ | 660 | /* get previous context */ |
661 | if (copy_from_user(&context, usc, sizeof(context))) | 661 | if (copy_from_user(&context, usc, sizeof(context))) |
@@ -693,7 +693,7 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, | |||
693 | int err; | 693 | int err; |
694 | 694 | ||
695 | /* Always make any pending restarted system calls return -EINTR */ | 695 | /* Always make any pending restarted system calls return -EINTR */ |
696 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 696 | current->restart_block.fn = do_no_restart_syscall; |
697 | 697 | ||
698 | err = __get_user(temp, &uc->uc_mcontext.version); | 698 | err = __get_user(temp, &uc->uc_mcontext.version); |
699 | if (temp != MCONTEXT_VERSION) | 699 | if (temp != MCONTEXT_VERSION) |
diff --git a/arch/metag/include/asm/thread_info.h b/arch/metag/include/asm/thread_info.h index 47711336119e..afb3ca4776d1 100644 --- a/arch/metag/include/asm/thread_info.h +++ b/arch/metag/include/asm/thread_info.h | |||
@@ -35,9 +35,8 @@ struct thread_info { | |||
35 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 35 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
36 | 36 | ||
37 | mm_segment_t addr_limit; /* thread address space */ | 37 | mm_segment_t addr_limit; /* thread address space */ |
38 | struct restart_block restart_block; | ||
39 | 38 | ||
40 | u8 supervisor_stack[0]; | 39 | u8 supervisor_stack[0] __aligned(8); |
41 | }; | 40 | }; |
42 | 41 | ||
43 | #else /* !__ASSEMBLY__ */ | 42 | #else /* !__ASSEMBLY__ */ |
@@ -74,9 +73,6 @@ struct thread_info { | |||
74 | .cpu = 0, \ | 73 | .cpu = 0, \ |
75 | .preempt_count = INIT_PREEMPT_COUNT, \ | 74 | .preempt_count = INIT_PREEMPT_COUNT, \ |
76 | .addr_limit = KERNEL_DS, \ | 75 | .addr_limit = KERNEL_DS, \ |
77 | .restart_block = { \ | ||
78 | .fn = do_no_restart_syscall, \ | ||
79 | }, \ | ||
80 | } | 76 | } |
81 | 77 | ||
82 | #define init_thread_info (init_thread_union.thread_info) | 78 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/metag/kernel/signal.c b/arch/metag/kernel/signal.c index 0d100d5c1407..ce49d429c74a 100644 --- a/arch/metag/kernel/signal.c +++ b/arch/metag/kernel/signal.c | |||
@@ -48,7 +48,7 @@ static int restore_sigcontext(struct pt_regs *regs, | |||
48 | int err; | 48 | int err; |
49 | 49 | ||
50 | /* Always make any pending restarted system calls return -EINTR */ | 50 | /* Always make any pending restarted system calls return -EINTR */ |
51 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 51 | current->restart_block.fn = do_no_restart_syscall; |
52 | 52 | ||
53 | err = metag_gp_regs_copyin(regs, 0, sizeof(struct user_gp_regs), NULL, | 53 | err = metag_gp_regs_copyin(regs, 0, sizeof(struct user_gp_regs), NULL, |
54 | &sc->regs); | 54 | &sc->regs); |
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h index 8c9d36591a03..b699fbd7de4a 100644 --- a/arch/microblaze/include/asm/thread_info.h +++ b/arch/microblaze/include/asm/thread_info.h | |||
@@ -71,7 +71,6 @@ struct thread_info { | |||
71 | __u32 cpu; /* current CPU */ | 71 | __u32 cpu; /* current CPU */ |
72 | __s32 preempt_count; /* 0 => preemptable,< 0 => BUG*/ | 72 | __s32 preempt_count; /* 0 => preemptable,< 0 => BUG*/ |
73 | mm_segment_t addr_limit; /* thread address space */ | 73 | mm_segment_t addr_limit; /* thread address space */ |
74 | struct restart_block restart_block; | ||
75 | 74 | ||
76 | struct cpu_context cpu_context; | 75 | struct cpu_context cpu_context; |
77 | }; | 76 | }; |
@@ -87,9 +86,6 @@ struct thread_info { | |||
87 | .cpu = 0, \ | 86 | .cpu = 0, \ |
88 | .preempt_count = INIT_PREEMPT_COUNT, \ | 87 | .preempt_count = INIT_PREEMPT_COUNT, \ |
89 | .addr_limit = KERNEL_DS, \ | 88 | .addr_limit = KERNEL_DS, \ |
90 | .restart_block = { \ | ||
91 | .fn = do_no_restart_syscall, \ | ||
92 | }, \ | ||
93 | } | 89 | } |
94 | 90 | ||
95 | #define init_thread_info (init_thread_union.thread_info) | 91 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 235706055b7f..a1cbaf90e2ea 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -89,7 +89,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
89 | int rval; | 89 | int rval; |
90 | 90 | ||
91 | /* Always make any pending restarted system calls return -EINTR */ | 91 | /* Always make any pending restarted system calls return -EINTR */ |
92 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 92 | current->restart_block.fn = do_no_restart_syscall; |
93 | 93 | ||
94 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 94 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
95 | goto badframe; | 95 | goto badframe; |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index e4440f92b366..9e1295f874f0 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -34,7 +34,6 @@ struct thread_info { | |||
34 | * 0x7fffffff for user-thead | 34 | * 0x7fffffff for user-thead |
35 | * 0xffffffff for kernel-thread | 35 | * 0xffffffff for kernel-thread |
36 | */ | 36 | */ |
37 | struct restart_block restart_block; | ||
38 | struct pt_regs *regs; | 37 | struct pt_regs *regs; |
39 | long syscall; /* syscall number */ | 38 | long syscall; /* syscall number */ |
40 | }; | 39 | }; |
@@ -50,9 +49,6 @@ struct thread_info { | |||
50 | .cpu = 0, \ | 49 | .cpu = 0, \ |
51 | .preempt_count = INIT_PREEMPT_COUNT, \ | 50 | .preempt_count = INIT_PREEMPT_COUNT, \ |
52 | .addr_limit = KERNEL_DS, \ | 51 | .addr_limit = KERNEL_DS, \ |
53 | .restart_block = { \ | ||
54 | .fn = do_no_restart_syscall, \ | ||
55 | }, \ | ||
56 | } | 52 | } |
57 | 53 | ||
58 | #define init_thread_info (init_thread_union.thread_info) | 54 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index b1d84bd4efb3..3b2dfdb4865f 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c | |||
@@ -98,7 +98,6 @@ void output_thread_info_defines(void) | |||
98 | OFFSET(TI_CPU, thread_info, cpu); | 98 | OFFSET(TI_CPU, thread_info, cpu); |
99 | OFFSET(TI_PRE_COUNT, thread_info, preempt_count); | 99 | OFFSET(TI_PRE_COUNT, thread_info, preempt_count); |
100 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); | 100 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); |
101 | OFFSET(TI_RESTART_BLOCK, thread_info, restart_block); | ||
102 | OFFSET(TI_REGS, thread_info, regs); | 101 | OFFSET(TI_REGS, thread_info, regs); |
103 | DEFINE(_THREAD_SIZE, THREAD_SIZE); | 102 | DEFINE(_THREAD_SIZE, THREAD_SIZE); |
104 | DEFINE(_THREAD_MASK, THREAD_MASK); | 103 | DEFINE(_THREAD_MASK, THREAD_MASK); |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 545bf11bd2ed..6a28c792d862 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -243,7 +243,7 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
243 | int i; | 243 | int i; |
244 | 244 | ||
245 | /* Always make any pending restarted system calls return -EINTR */ | 245 | /* Always make any pending restarted system calls return -EINTR */ |
246 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 246 | current->restart_block.fn = do_no_restart_syscall; |
247 | 247 | ||
248 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); | 248 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); |
249 | 249 | ||
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index d69179c0d49d..19a7705f2a01 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -220,7 +220,7 @@ static int restore_sigcontext32(struct pt_regs *regs, | |||
220 | int i; | 220 | int i; |
221 | 221 | ||
222 | /* Always make any pending restarted system calls return -EINTR */ | 222 | /* Always make any pending restarted system calls return -EINTR */ |
223 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 223 | current->restart_block.fn = do_no_restart_syscall; |
224 | 224 | ||
225 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); | 225 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); |
226 | err |= __get_user(regs->hi, &sc->sc_mdhi); | 226 | err |= __get_user(regs->hi, &sc->sc_mdhi); |
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index bf280eaccd36..c1c374f0ec12 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -50,7 +50,6 @@ struct thread_info { | |||
50 | 0-0xBFFFFFFF for user-thead | 50 | 0-0xBFFFFFFF for user-thead |
51 | 0-0xFFFFFFFF for kernel-thread | 51 | 0-0xFFFFFFFF for kernel-thread |
52 | */ | 52 | */ |
53 | struct restart_block restart_block; | ||
54 | 53 | ||
55 | __u8 supervisor_stack[0]; | 54 | __u8 supervisor_stack[0]; |
56 | }; | 55 | }; |
@@ -80,9 +79,6 @@ struct thread_info { | |||
80 | .cpu = 0, \ | 79 | .cpu = 0, \ |
81 | .preempt_count = INIT_PREEMPT_COUNT, \ | 80 | .preempt_count = INIT_PREEMPT_COUNT, \ |
82 | .addr_limit = KERNEL_DS, \ | 81 | .addr_limit = KERNEL_DS, \ |
83 | .restart_block = { \ | ||
84 | .fn = do_no_restart_syscall, \ | ||
85 | }, \ | ||
86 | } | 82 | } |
87 | 83 | ||
88 | #define init_thread_info (init_thread_union.thread_info) | 84 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c index 47b3bb0c04ff..d780670cbaf3 100644 --- a/arch/mn10300/kernel/asm-offsets.c +++ b/arch/mn10300/kernel/asm-offsets.c | |||
@@ -28,7 +28,6 @@ void foo(void) | |||
28 | OFFSET(TI_cpu, thread_info, cpu); | 28 | OFFSET(TI_cpu, thread_info, cpu); |
29 | OFFSET(TI_preempt_count, thread_info, preempt_count); | 29 | OFFSET(TI_preempt_count, thread_info, preempt_count); |
30 | OFFSET(TI_addr_limit, thread_info, addr_limit); | 30 | OFFSET(TI_addr_limit, thread_info, addr_limit); |
31 | OFFSET(TI_restart_block, thread_info, restart_block); | ||
32 | BLANK(); | 31 | BLANK(); |
33 | 32 | ||
34 | OFFSET(REG_D0, pt_regs, d0); | 33 | OFFSET(REG_D0, pt_regs, d0); |
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index a6c0858592c3..8609845f12c5 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -40,7 +40,7 @@ static int restore_sigcontext(struct pt_regs *regs, | |||
40 | unsigned int err = 0; | 40 | unsigned int err = 0; |
41 | 41 | ||
42 | /* Always make any pending restarted system calls return -EINTR */ | 42 | /* Always make any pending restarted system calls return -EINTR */ |
43 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 43 | current->restart_block.fn = do_no_restart_syscall; |
44 | 44 | ||
45 | if (is_using_fpu(current)) | 45 | if (is_using_fpu(current)) |
46 | fpu_kill_state(current); | 46 | fpu_kill_state(current); |
diff --git a/arch/openrisc/include/asm/thread_info.h b/arch/openrisc/include/asm/thread_info.h index d797acc901e4..875f0845a707 100644 --- a/arch/openrisc/include/asm/thread_info.h +++ b/arch/openrisc/include/asm/thread_info.h | |||
@@ -57,7 +57,6 @@ struct thread_info { | |||
57 | 0-0x7FFFFFFF for user-thead | 57 | 0-0x7FFFFFFF for user-thead |
58 | 0-0xFFFFFFFF for kernel-thread | 58 | 0-0xFFFFFFFF for kernel-thread |
59 | */ | 59 | */ |
60 | struct restart_block restart_block; | ||
61 | __u8 supervisor_stack[0]; | 60 | __u8 supervisor_stack[0]; |
62 | 61 | ||
63 | /* saved context data */ | 62 | /* saved context data */ |
@@ -79,9 +78,6 @@ struct thread_info { | |||
79 | .cpu = 0, \ | 78 | .cpu = 0, \ |
80 | .preempt_count = 1, \ | 79 | .preempt_count = 1, \ |
81 | .addr_limit = KERNEL_DS, \ | 80 | .addr_limit = KERNEL_DS, \ |
82 | .restart_block = { \ | ||
83 | .fn = do_no_restart_syscall, \ | ||
84 | }, \ | ||
85 | .ksp = 0, \ | 81 | .ksp = 0, \ |
86 | } | 82 | } |
87 | 83 | ||
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index 7d1b8235bf90..4112175bf803 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c | |||
@@ -46,7 +46,7 @@ static int restore_sigcontext(struct pt_regs *regs, | |||
46 | int err = 0; | 46 | int err = 0; |
47 | 47 | ||
48 | /* Always make any pending restarted system calls return -EINTR */ | 48 | /* Always make any pending restarted system calls return -EINTR */ |
49 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 49 | current->restart_block.fn = do_no_restart_syscall; |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Restore the regs from &sc->regs. | 52 | * Restore the regs from &sc->regs. |
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index a84611835549..fb13e3865563 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
@@ -14,7 +14,6 @@ struct thread_info { | |||
14 | mm_segment_t addr_limit; /* user-level address space limit */ | 14 | mm_segment_t addr_limit; /* user-level address space limit */ |
15 | __u32 cpu; /* current CPU */ | 15 | __u32 cpu; /* current CPU */ |
16 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 16 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
17 | struct restart_block restart_block; | ||
18 | }; | 17 | }; |
19 | 18 | ||
20 | #define INIT_THREAD_INFO(tsk) \ | 19 | #define INIT_THREAD_INFO(tsk) \ |
@@ -25,9 +24,6 @@ struct thread_info { | |||
25 | .cpu = 0, \ | 24 | .cpu = 0, \ |
26 | .addr_limit = KERNEL_DS, \ | 25 | .addr_limit = KERNEL_DS, \ |
27 | .preempt_count = INIT_PREEMPT_COUNT, \ | 26 | .preempt_count = INIT_PREEMPT_COUNT, \ |
28 | .restart_block = { \ | ||
29 | .fn = do_no_restart_syscall \ | ||
30 | } \ | ||
31 | } | 27 | } |
32 | 28 | ||
33 | #define init_thread_info (init_thread_union.thread_info) | 29 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 012d4fa63d97..9b910a0251b8 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -99,7 +99,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) | |||
99 | sigframe_size = PARISC_RT_SIGFRAME_SIZE32; | 99 | sigframe_size = PARISC_RT_SIGFRAME_SIZE32; |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 102 | current->restart_block.fn = do_no_restart_syscall; |
103 | 103 | ||
104 | /* Unwind the user stack to get the rt_sigframe structure. */ | 104 | /* Unwind the user stack to get the rt_sigframe structure. */ |
105 | frame = (struct rt_sigframe __user *) | 105 | frame = (struct rt_sigframe __user *) |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index e8abc83e699f..72489799cf02 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -43,7 +43,6 @@ struct thread_info { | |||
43 | int cpu; /* cpu we're on */ | 43 | int cpu; /* cpu we're on */ |
44 | int preempt_count; /* 0 => preemptable, | 44 | int preempt_count; /* 0 => preemptable, |
45 | <0 => BUG */ | 45 | <0 => BUG */ |
46 | struct restart_block restart_block; | ||
47 | unsigned long local_flags; /* private flags for thread */ | 46 | unsigned long local_flags; /* private flags for thread */ |
48 | 47 | ||
49 | /* low level flags - has atomic operations done on it */ | 48 | /* low level flags - has atomic operations done on it */ |
@@ -59,9 +58,6 @@ struct thread_info { | |||
59 | .exec_domain = &default_exec_domain, \ | 58 | .exec_domain = &default_exec_domain, \ |
60 | .cpu = 0, \ | 59 | .cpu = 0, \ |
61 | .preempt_count = INIT_PREEMPT_COUNT, \ | 60 | .preempt_count = INIT_PREEMPT_COUNT, \ |
62 | .restart_block = { \ | ||
63 | .fn = do_no_restart_syscall, \ | ||
64 | }, \ | ||
65 | .flags = 0, \ | 61 | .flags = 0, \ |
66 | } | 62 | } |
67 | 63 | ||
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index b171001698ff..d3a831ac0f92 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -1231,7 +1231,7 @@ long sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, | |||
1231 | int tm_restore = 0; | 1231 | int tm_restore = 0; |
1232 | #endif | 1232 | #endif |
1233 | /* Always make any pending restarted system calls return -EINTR */ | 1233 | /* Always make any pending restarted system calls return -EINTR */ |
1234 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 1234 | current->restart_block.fn = do_no_restart_syscall; |
1235 | 1235 | ||
1236 | rt_sf = (struct rt_sigframe __user *) | 1236 | rt_sf = (struct rt_sigframe __user *) |
1237 | (regs->gpr[1] + __SIGNAL_FRAMESIZE + 16); | 1237 | (regs->gpr[1] + __SIGNAL_FRAMESIZE + 16); |
@@ -1504,7 +1504,7 @@ long sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, | |||
1504 | #endif | 1504 | #endif |
1505 | 1505 | ||
1506 | /* Always make any pending restarted system calls return -EINTR */ | 1506 | /* Always make any pending restarted system calls return -EINTR */ |
1507 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 1507 | current->restart_block.fn = do_no_restart_syscall; |
1508 | 1508 | ||
1509 | sf = (struct sigframe __user *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); | 1509 | sf = (struct sigframe __user *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); |
1510 | sc = &sf->sctx; | 1510 | sc = &sf->sctx; |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 2cb0c94cafa5..c7c24d2e2bdb 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -666,7 +666,7 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5, | |||
666 | #endif | 666 | #endif |
667 | 667 | ||
668 | /* Always make any pending restarted system calls return -EINTR */ | 668 | /* Always make any pending restarted system calls return -EINTR */ |
669 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 669 | current->restart_block.fn = do_no_restart_syscall; |
670 | 670 | ||
671 | if (!access_ok(VERIFY_READ, uc, sizeof(*uc))) | 671 | if (!access_ok(VERIFY_READ, uc, sizeof(*uc))) |
672 | goto badframe; | 672 | goto badframe; |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 4d62fd5b56e5..ef1df718642d 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -39,7 +39,6 @@ struct thread_info { | |||
39 | unsigned long sys_call_table; /* System call table address */ | 39 | unsigned long sys_call_table; /* System call table address */ |
40 | unsigned int cpu; /* current CPU */ | 40 | unsigned int cpu; /* current CPU */ |
41 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 41 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
42 | struct restart_block restart_block; | ||
43 | unsigned int system_call; | 42 | unsigned int system_call; |
44 | __u64 user_timer; | 43 | __u64 user_timer; |
45 | __u64 system_timer; | 44 | __u64 system_timer; |
@@ -56,9 +55,6 @@ struct thread_info { | |||
56 | .flags = 0, \ | 55 | .flags = 0, \ |
57 | .cpu = 0, \ | 56 | .cpu = 0, \ |
58 | .preempt_count = INIT_PREEMPT_COUNT, \ | 57 | .preempt_count = INIT_PREEMPT_COUNT, \ |
59 | .restart_block = { \ | ||
60 | .fn = do_no_restart_syscall, \ | ||
61 | }, \ | ||
62 | } | 58 | } |
63 | 59 | ||
64 | #define init_thread_info (init_thread_union.thread_info) | 60 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 34d5fa7b01b5..bc1df12dd4f8 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -209,7 +209,7 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) | |||
209 | int i; | 209 | int i; |
210 | 210 | ||
211 | /* Alwys make any pending restarted system call return -EINTR */ | 211 | /* Alwys make any pending restarted system call return -EINTR */ |
212 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 212 | current->restart_block.fn = do_no_restart_syscall; |
213 | 213 | ||
214 | if (__copy_from_user(&user_sregs, &sregs->regs, sizeof(user_sregs))) | 214 | if (__copy_from_user(&user_sregs, &sregs->regs, sizeof(user_sregs))) |
215 | return -EFAULT; | 215 | return -EFAULT; |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 6a2ac257d98f..b3ae6f70c6d6 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -162,7 +162,7 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | |||
162 | _sigregs user_sregs; | 162 | _sigregs user_sregs; |
163 | 163 | ||
164 | /* Alwys make any pending restarted system call return -EINTR */ | 164 | /* Alwys make any pending restarted system call return -EINTR */ |
165 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 165 | current->restart_block.fn = do_no_restart_syscall; |
166 | 166 | ||
167 | if (__copy_from_user(&user_sregs, sregs, sizeof(user_sregs))) | 167 | if (__copy_from_user(&user_sregs, sregs, sizeof(user_sregs))) |
168 | return -EFAULT; | 168 | return -EFAULT; |
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h index 656b7ada9326..33864fa2a8d4 100644 --- a/arch/score/include/asm/thread_info.h +++ b/arch/score/include/asm/thread_info.h | |||
@@ -42,7 +42,6 @@ struct thread_info { | |||
42 | * 0-0xFFFFFFFF for kernel-thread | 42 | * 0-0xFFFFFFFF for kernel-thread |
43 | */ | 43 | */ |
44 | mm_segment_t addr_limit; | 44 | mm_segment_t addr_limit; |
45 | struct restart_block restart_block; | ||
46 | struct pt_regs *regs; | 45 | struct pt_regs *regs; |
47 | }; | 46 | }; |
48 | 47 | ||
@@ -58,9 +57,6 @@ struct thread_info { | |||
58 | .cpu = 0, \ | 57 | .cpu = 0, \ |
59 | .preempt_count = 1, \ | 58 | .preempt_count = 1, \ |
60 | .addr_limit = KERNEL_DS, \ | 59 | .addr_limit = KERNEL_DS, \ |
61 | .restart_block = { \ | ||
62 | .fn = do_no_restart_syscall, \ | ||
63 | }, \ | ||
64 | } | 60 | } |
65 | 61 | ||
66 | #define init_thread_info (init_thread_union.thread_info) | 62 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/score/kernel/asm-offsets.c b/arch/score/kernel/asm-offsets.c index 57788f44c6fb..b4d5214a7a7e 100644 --- a/arch/score/kernel/asm-offsets.c +++ b/arch/score/kernel/asm-offsets.c | |||
@@ -106,7 +106,6 @@ void output_thread_info_defines(void) | |||
106 | OFFSET(TI_CPU, thread_info, cpu); | 106 | OFFSET(TI_CPU, thread_info, cpu); |
107 | OFFSET(TI_PRE_COUNT, thread_info, preempt_count); | 107 | OFFSET(TI_PRE_COUNT, thread_info, preempt_count); |
108 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); | 108 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); |
109 | OFFSET(TI_RESTART_BLOCK, thread_info, restart_block); | ||
110 | OFFSET(TI_REGS, thread_info, regs); | 109 | OFFSET(TI_REGS, thread_info, regs); |
111 | DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE); | 110 | DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE); |
112 | DEFINE(KERNEL_STACK_MASK, THREAD_MASK); | 111 | DEFINE(KERNEL_STACK_MASK, THREAD_MASK); |
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c index 1651807774ad..e381c8c4ff65 100644 --- a/arch/score/kernel/signal.c +++ b/arch/score/kernel/signal.c | |||
@@ -141,7 +141,7 @@ score_rt_sigreturn(struct pt_regs *regs) | |||
141 | int sig; | 141 | int sig; |
142 | 142 | ||
143 | /* Always make any pending restarted system calls return -EINTR */ | 143 | /* Always make any pending restarted system calls return -EINTR */ |
144 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 144 | current->restart_block.fn = do_no_restart_syscall; |
145 | 145 | ||
146 | frame = (struct rt_sigframe __user *) regs->regs[0]; | 146 | frame = (struct rt_sigframe __user *) regs->regs[0]; |
147 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 147 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index ad27ffa65e2e..657c03919627 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -33,7 +33,6 @@ struct thread_info { | |||
33 | __u32 cpu; | 33 | __u32 cpu; |
34 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 34 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
35 | mm_segment_t addr_limit; /* thread address space */ | 35 | mm_segment_t addr_limit; /* thread address space */ |
36 | struct restart_block restart_block; | ||
37 | unsigned long previous_sp; /* sp of previous stack in case | 36 | unsigned long previous_sp; /* sp of previous stack in case |
38 | of nested IRQ stacks */ | 37 | of nested IRQ stacks */ |
39 | __u8 supervisor_stack[0]; | 38 | __u8 supervisor_stack[0]; |
@@ -63,9 +62,6 @@ struct thread_info { | |||
63 | .cpu = 0, \ | 62 | .cpu = 0, \ |
64 | .preempt_count = INIT_PREEMPT_COUNT, \ | 63 | .preempt_count = INIT_PREEMPT_COUNT, \ |
65 | .addr_limit = KERNEL_DS, \ | 64 | .addr_limit = KERNEL_DS, \ |
66 | .restart_block = { \ | ||
67 | .fn = do_no_restart_syscall, \ | ||
68 | }, \ | ||
69 | } | 65 | } |
70 | 66 | ||
71 | #define init_thread_info (init_thread_union.thread_info) | 67 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/sh/kernel/asm-offsets.c b/arch/sh/kernel/asm-offsets.c index 08a2be775b6c..542225fedb11 100644 --- a/arch/sh/kernel/asm-offsets.c +++ b/arch/sh/kernel/asm-offsets.c | |||
@@ -25,7 +25,6 @@ int main(void) | |||
25 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); | 25 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); |
26 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); | 26 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); |
27 | DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); | 27 | DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); |
28 | DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block)); | ||
29 | DEFINE(TI_SIZE, sizeof(struct thread_info)); | 28 | DEFINE(TI_SIZE, sizeof(struct thread_info)); |
30 | 29 | ||
31 | #ifdef CONFIG_HIBERNATION | 30 | #ifdef CONFIG_HIBERNATION |
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index 2f002b24fb92..0b34f2a704fe 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c | |||
@@ -156,7 +156,7 @@ asmlinkage int sys_sigreturn(void) | |||
156 | int r0; | 156 | int r0; |
157 | 157 | ||
158 | /* Always make any pending restarted system calls return -EINTR */ | 158 | /* Always make any pending restarted system calls return -EINTR */ |
159 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 159 | current->restart_block.fn = do_no_restart_syscall; |
160 | 160 | ||
161 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 161 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
162 | goto badframe; | 162 | goto badframe; |
@@ -186,7 +186,7 @@ asmlinkage int sys_rt_sigreturn(void) | |||
186 | int r0; | 186 | int r0; |
187 | 187 | ||
188 | /* Always make any pending restarted system calls return -EINTR */ | 188 | /* Always make any pending restarted system calls return -EINTR */ |
189 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 189 | current->restart_block.fn = do_no_restart_syscall; |
190 | 190 | ||
191 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 191 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
192 | goto badframe; | 192 | goto badframe; |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index 897abe7b871e..71993c6a7d94 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
@@ -260,7 +260,7 @@ asmlinkage int sys_sigreturn(unsigned long r2, unsigned long r3, | |||
260 | long long ret; | 260 | long long ret; |
261 | 261 | ||
262 | /* Always make any pending restarted system calls return -EINTR */ | 262 | /* Always make any pending restarted system calls return -EINTR */ |
263 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 263 | current->restart_block.fn = do_no_restart_syscall; |
264 | 264 | ||
265 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 265 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
266 | goto badframe; | 266 | goto badframe; |
@@ -294,7 +294,7 @@ asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3, | |||
294 | long long ret; | 294 | long long ret; |
295 | 295 | ||
296 | /* Always make any pending restarted system calls return -EINTR */ | 296 | /* Always make any pending restarted system calls return -EINTR */ |
297 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 297 | current->restart_block.fn = do_no_restart_syscall; |
298 | 298 | ||
299 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 299 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
300 | goto badframe; | 300 | goto badframe; |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 025c98446b1e..fd7bd0a440ca 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -47,8 +47,6 @@ struct thread_info { | |||
47 | struct reg_window32 reg_window[NSWINS]; /* align for ldd! */ | 47 | struct reg_window32 reg_window[NSWINS]; /* align for ldd! */ |
48 | unsigned long rwbuf_stkptrs[NSWINS]; | 48 | unsigned long rwbuf_stkptrs[NSWINS]; |
49 | unsigned long w_saved; | 49 | unsigned long w_saved; |
50 | |||
51 | struct restart_block restart_block; | ||
52 | }; | 50 | }; |
53 | 51 | ||
54 | /* | 52 | /* |
@@ -62,9 +60,6 @@ struct thread_info { | |||
62 | .flags = 0, \ | 60 | .flags = 0, \ |
63 | .cpu = 0, \ | 61 | .cpu = 0, \ |
64 | .preempt_count = INIT_PREEMPT_COUNT, \ | 62 | .preempt_count = INIT_PREEMPT_COUNT, \ |
65 | .restart_block = { \ | ||
66 | .fn = do_no_restart_syscall, \ | ||
67 | }, \ | ||
68 | } | 63 | } |
69 | 64 | ||
70 | #define init_thread_info (init_thread_union.thread_info) | 65 | #define init_thread_info (init_thread_union.thread_info) |
@@ -103,7 +98,6 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
103 | #define TI_REG_WINDOW 0x30 | 98 | #define TI_REG_WINDOW 0x30 |
104 | #define TI_RWIN_SPTRS 0x230 | 99 | #define TI_RWIN_SPTRS 0x230 |
105 | #define TI_W_SAVED 0x250 | 100 | #define TI_W_SAVED 0x250 |
106 | /* #define TI_RESTART_BLOCK 0x25n */ /* Nobody cares */ | ||
107 | 101 | ||
108 | /* | 102 | /* |
109 | * thread information flag bit numbers | 103 | * thread information flag bit numbers |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 798f0279a4b5..ff455164732a 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -58,8 +58,6 @@ struct thread_info { | |||
58 | unsigned long gsr[7]; | 58 | unsigned long gsr[7]; |
59 | unsigned long xfsr[7]; | 59 | unsigned long xfsr[7]; |
60 | 60 | ||
61 | struct restart_block restart_block; | ||
62 | |||
63 | struct pt_regs *kern_una_regs; | 61 | struct pt_regs *kern_una_regs; |
64 | unsigned int kern_una_insn; | 62 | unsigned int kern_una_insn; |
65 | 63 | ||
@@ -92,10 +90,9 @@ struct thread_info { | |||
92 | #define TI_RWIN_SPTRS 0x000003c8 | 90 | #define TI_RWIN_SPTRS 0x000003c8 |
93 | #define TI_GSR 0x00000400 | 91 | #define TI_GSR 0x00000400 |
94 | #define TI_XFSR 0x00000438 | 92 | #define TI_XFSR 0x00000438 |
95 | #define TI_RESTART_BLOCK 0x00000470 | 93 | #define TI_KUNA_REGS 0x00000470 |
96 | #define TI_KUNA_REGS 0x000004a0 | 94 | #define TI_KUNA_INSN 0x00000478 |
97 | #define TI_KUNA_INSN 0x000004a8 | 95 | #define TI_FPREGS 0x00000480 |
98 | #define TI_FPREGS 0x000004c0 | ||
99 | 96 | ||
100 | /* We embed this in the uppermost byte of thread_info->flags */ | 97 | /* We embed this in the uppermost byte of thread_info->flags */ |
101 | #define FAULT_CODE_WRITE 0x01 /* Write access, implies D-TLB */ | 98 | #define FAULT_CODE_WRITE 0x01 /* Write access, implies D-TLB */ |
@@ -124,9 +121,6 @@ struct thread_info { | |||
124 | .current_ds = ASI_P, \ | 121 | .current_ds = ASI_P, \ |
125 | .exec_domain = &default_exec_domain, \ | 122 | .exec_domain = &default_exec_domain, \ |
126 | .preempt_count = INIT_PREEMPT_COUNT, \ | 123 | .preempt_count = INIT_PREEMPT_COUNT, \ |
127 | .restart_block = { \ | ||
128 | .fn = do_no_restart_syscall, \ | ||
129 | }, \ | ||
130 | } | 124 | } |
131 | 125 | ||
132 | #define init_thread_info (init_thread_union.thread_info) | 126 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/sparc/kernel/signal32.c b/arch/sparc/kernel/signal32.c index 62deba7be1a9..4eed773a7735 100644 --- a/arch/sparc/kernel/signal32.c +++ b/arch/sparc/kernel/signal32.c | |||
@@ -150,7 +150,7 @@ void do_sigreturn32(struct pt_regs *regs) | |||
150 | int err, i; | 150 | int err, i; |
151 | 151 | ||
152 | /* Always make any pending restarted system calls return -EINTR */ | 152 | /* Always make any pending restarted system calls return -EINTR */ |
153 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 153 | current->restart_block.fn = do_no_restart_syscall; |
154 | 154 | ||
155 | synchronize_user_stack(); | 155 | synchronize_user_stack(); |
156 | 156 | ||
@@ -235,7 +235,7 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) | |||
235 | int err, i; | 235 | int err, i; |
236 | 236 | ||
237 | /* Always make any pending restarted system calls return -EINTR */ | 237 | /* Always make any pending restarted system calls return -EINTR */ |
238 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 238 | current->restart_block.fn = do_no_restart_syscall; |
239 | 239 | ||
240 | synchronize_user_stack(); | 240 | synchronize_user_stack(); |
241 | regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; | 241 | regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index 9ee72fc8e0e4..52aa5e4ce5e7 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -70,7 +70,7 @@ asmlinkage void do_sigreturn(struct pt_regs *regs) | |||
70 | int err; | 70 | int err; |
71 | 71 | ||
72 | /* Always make any pending restarted system calls return -EINTR */ | 72 | /* Always make any pending restarted system calls return -EINTR */ |
73 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 73 | current->restart_block.fn = do_no_restart_syscall; |
74 | 74 | ||
75 | synchronize_user_stack(); | 75 | synchronize_user_stack(); |
76 | 76 | ||
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c index 1a6999868031..d88beff47bab 100644 --- a/arch/sparc/kernel/signal_64.c +++ b/arch/sparc/kernel/signal_64.c | |||
@@ -254,7 +254,7 @@ void do_rt_sigreturn(struct pt_regs *regs) | |||
254 | int err; | 254 | int err; |
255 | 255 | ||
256 | /* Always make any pending restarted system calls return -EINTR */ | 256 | /* Always make any pending restarted system calls return -EINTR */ |
257 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 257 | current->restart_block.fn = do_no_restart_syscall; |
258 | 258 | ||
259 | synchronize_user_stack (); | 259 | synchronize_user_stack (); |
260 | sf = (struct rt_signal_frame __user *) | 260 | sf = (struct rt_signal_frame __user *) |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index 981a769b9558..a27651e866e7 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -2730,8 +2730,6 @@ void __init trap_init(void) | |||
2730 | TI_NEW_CHILD != offsetof(struct thread_info, new_child) || | 2730 | TI_NEW_CHILD != offsetof(struct thread_info, new_child) || |
2731 | TI_CURRENT_DS != offsetof(struct thread_info, | 2731 | TI_CURRENT_DS != offsetof(struct thread_info, |
2732 | current_ds) || | 2732 | current_ds) || |
2733 | TI_RESTART_BLOCK != offsetof(struct thread_info, | ||
2734 | restart_block) || | ||
2735 | TI_KUNA_REGS != offsetof(struct thread_info, | 2733 | TI_KUNA_REGS != offsetof(struct thread_info, |
2736 | kern_una_regs) || | 2734 | kern_una_regs) || |
2737 | TI_KUNA_INSN != offsetof(struct thread_info, | 2735 | TI_KUNA_INSN != offsetof(struct thread_info, |
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h index 48e4fd0f38e4..96c14c1430d8 100644 --- a/arch/tile/include/asm/thread_info.h +++ b/arch/tile/include/asm/thread_info.h | |||
@@ -36,7 +36,6 @@ struct thread_info { | |||
36 | 36 | ||
37 | mm_segment_t addr_limit; /* thread address space | 37 | mm_segment_t addr_limit; /* thread address space |
38 | (KERNEL_DS or USER_DS) */ | 38 | (KERNEL_DS or USER_DS) */ |
39 | struct restart_block restart_block; | ||
40 | struct single_step_state *step_state; /* single step state | 39 | struct single_step_state *step_state; /* single step state |
41 | (if non-zero) */ | 40 | (if non-zero) */ |
42 | int align_ctl; /* controls unaligned access */ | 41 | int align_ctl; /* controls unaligned access */ |
@@ -57,9 +56,6 @@ struct thread_info { | |||
57 | .cpu = 0, \ | 56 | .cpu = 0, \ |
58 | .preempt_count = INIT_PREEMPT_COUNT, \ | 57 | .preempt_count = INIT_PREEMPT_COUNT, \ |
59 | .addr_limit = KERNEL_DS, \ | 58 | .addr_limit = KERNEL_DS, \ |
60 | .restart_block = { \ | ||
61 | .fn = do_no_restart_syscall, \ | ||
62 | }, \ | ||
63 | .step_state = NULL, \ | 59 | .step_state = NULL, \ |
64 | .align_ctl = 0, \ | 60 | .align_ctl = 0, \ |
65 | } | 61 | } |
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c index bb0a9ce7ae23..8a524e332c1a 100644 --- a/arch/tile/kernel/signal.c +++ b/arch/tile/kernel/signal.c | |||
@@ -48,7 +48,7 @@ int restore_sigcontext(struct pt_regs *regs, | |||
48 | int err; | 48 | int err; |
49 | 49 | ||
50 | /* Always make any pending restarted system calls return -EINTR */ | 50 | /* Always make any pending restarted system calls return -EINTR */ |
51 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 51 | current->restart_block.fn = do_no_restart_syscall; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Enforce that sigcontext is like pt_regs, and doesn't mess | 54 | * Enforce that sigcontext is like pt_regs, and doesn't mess |
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index 1c5b2a83046a..e04114c4fcd9 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h | |||
@@ -22,7 +22,6 @@ struct thread_info { | |||
22 | mm_segment_t addr_limit; /* thread address space: | 22 | mm_segment_t addr_limit; /* thread address space: |
23 | 0-0xBFFFFFFF for user | 23 | 0-0xBFFFFFFF for user |
24 | 0-0xFFFFFFFF for kernel */ | 24 | 0-0xFFFFFFFF for kernel */ |
25 | struct restart_block restart_block; | ||
26 | struct thread_info *real_thread; /* Points to non-IRQ stack */ | 25 | struct thread_info *real_thread; /* Points to non-IRQ stack */ |
27 | }; | 26 | }; |
28 | 27 | ||
@@ -34,9 +33,6 @@ struct thread_info { | |||
34 | .cpu = 0, \ | 33 | .cpu = 0, \ |
35 | .preempt_count = INIT_PREEMPT_COUNT, \ | 34 | .preempt_count = INIT_PREEMPT_COUNT, \ |
36 | .addr_limit = KERNEL_DS, \ | 35 | .addr_limit = KERNEL_DS, \ |
37 | .restart_block = { \ | ||
38 | .fn = do_no_restart_syscall, \ | ||
39 | }, \ | ||
40 | .real_thread = NULL, \ | 36 | .real_thread = NULL, \ |
41 | } | 37 | } |
42 | 38 | ||
diff --git a/arch/unicore32/include/asm/thread_info.h b/arch/unicore32/include/asm/thread_info.h index af36d8eabdf1..63e2839dfeb8 100644 --- a/arch/unicore32/include/asm/thread_info.h +++ b/arch/unicore32/include/asm/thread_info.h | |||
@@ -79,7 +79,6 @@ struct thread_info { | |||
79 | #ifdef CONFIG_UNICORE_FPU_F64 | 79 | #ifdef CONFIG_UNICORE_FPU_F64 |
80 | struct fp_state fpstate __attribute__((aligned(8))); | 80 | struct fp_state fpstate __attribute__((aligned(8))); |
81 | #endif | 81 | #endif |
82 | struct restart_block restart_block; | ||
83 | }; | 82 | }; |
84 | 83 | ||
85 | #define INIT_THREAD_INFO(tsk) \ | 84 | #define INIT_THREAD_INFO(tsk) \ |
@@ -89,9 +88,6 @@ struct thread_info { | |||
89 | .flags = 0, \ | 88 | .flags = 0, \ |
90 | .preempt_count = INIT_PREEMPT_COUNT, \ | 89 | .preempt_count = INIT_PREEMPT_COUNT, \ |
91 | .addr_limit = KERNEL_DS, \ | 90 | .addr_limit = KERNEL_DS, \ |
92 | .restart_block = { \ | ||
93 | .fn = do_no_restart_syscall, \ | ||
94 | }, \ | ||
95 | } | 91 | } |
96 | 92 | ||
97 | #define init_thread_info (init_thread_union.thread_info) | 93 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c index 7c8fb7018dc6..d329f85766cc 100644 --- a/arch/unicore32/kernel/signal.c +++ b/arch/unicore32/kernel/signal.c | |||
@@ -105,7 +105,7 @@ asmlinkage int __sys_rt_sigreturn(struct pt_regs *regs) | |||
105 | struct rt_sigframe __user *frame; | 105 | struct rt_sigframe __user *frame; |
106 | 106 | ||
107 | /* Always make any pending restarted system calls return -EINTR */ | 107 | /* Always make any pending restarted system calls return -EINTR */ |
108 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 108 | current->restart_block.fn = do_no_restart_syscall; |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * Since we stacked the signal on a 64-bit boundary, | 111 | * Since we stacked the signal on a 64-bit boundary, |
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index f9e181aaba97..d0165c9a2932 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -169,7 +169,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, | |||
169 | u32 tmp; | 169 | u32 tmp; |
170 | 170 | ||
171 | /* Always make any pending restarted system calls return -EINTR */ | 171 | /* Always make any pending restarted system calls return -EINTR */ |
172 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 172 | current->restart_block.fn = do_no_restart_syscall; |
173 | 173 | ||
174 | get_user_try { | 174 | get_user_try { |
175 | /* | 175 | /* |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index e82e95abc92b..1d4e4f279a32 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -31,7 +31,6 @@ struct thread_info { | |||
31 | __u32 cpu; /* current CPU */ | 31 | __u32 cpu; /* current CPU */ |
32 | int saved_preempt_count; | 32 | int saved_preempt_count; |
33 | mm_segment_t addr_limit; | 33 | mm_segment_t addr_limit; |
34 | struct restart_block restart_block; | ||
35 | void __user *sysenter_return; | 34 | void __user *sysenter_return; |
36 | unsigned int sig_on_uaccess_error:1; | 35 | unsigned int sig_on_uaccess_error:1; |
37 | unsigned int uaccess_err:1; /* uaccess failed */ | 36 | unsigned int uaccess_err:1; /* uaccess failed */ |
@@ -45,9 +44,6 @@ struct thread_info { | |||
45 | .cpu = 0, \ | 44 | .cpu = 0, \ |
46 | .saved_preempt_count = INIT_PREEMPT_COUNT, \ | 45 | .saved_preempt_count = INIT_PREEMPT_COUNT, \ |
47 | .addr_limit = KERNEL_DS, \ | 46 | .addr_limit = KERNEL_DS, \ |
48 | .restart_block = { \ | ||
49 | .fn = do_no_restart_syscall, \ | ||
50 | }, \ | ||
51 | } | 47 | } |
52 | 48 | ||
53 | #define init_thread_info (init_thread_union.thread_info) | 49 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 2a33c8f68319..e5042463c1bc 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -69,7 +69,7 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, | |||
69 | unsigned int err = 0; | 69 | unsigned int err = 0; |
70 | 70 | ||
71 | /* Always make any pending restarted system calls return -EINTR */ | 71 | /* Always make any pending restarted system calls return -EINTR */ |
72 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 72 | current->restart_block.fn = do_no_restart_syscall; |
73 | 73 | ||
74 | get_user_try { | 74 | get_user_try { |
75 | 75 | ||
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index 79d824551c1a..0c8c32bfd792 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c | |||
@@ -157,7 +157,7 @@ static int copy_sc_from_user(struct pt_regs *regs, | |||
157 | int err, pid; | 157 | int err, pid; |
158 | 158 | ||
159 | /* Always make any pending restarted system calls return -EINTR */ | 159 | /* Always make any pending restarted system calls return -EINTR */ |
160 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 160 | current->restart_block.fn = do_no_restart_syscall; |
161 | 161 | ||
162 | err = copy_from_user(&sc, from, sizeof(sc)); | 162 | err = copy_from_user(&sc, from, sizeof(sc)); |
163 | if (err) | 163 | if (err) |
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h index 470153e8547c..a9b5d3ba196c 100644 --- a/arch/xtensa/include/asm/thread_info.h +++ b/arch/xtensa/include/asm/thread_info.h | |||
@@ -51,7 +51,6 @@ struct thread_info { | |||
51 | __s32 preempt_count; /* 0 => preemptable,< 0 => BUG*/ | 51 | __s32 preempt_count; /* 0 => preemptable,< 0 => BUG*/ |
52 | 52 | ||
53 | mm_segment_t addr_limit; /* thread address space */ | 53 | mm_segment_t addr_limit; /* thread address space */ |
54 | struct restart_block restart_block; | ||
55 | 54 | ||
56 | unsigned long cpenable; | 55 | unsigned long cpenable; |
57 | 56 | ||
@@ -72,7 +71,6 @@ struct thread_info { | |||
72 | #define TI_CPU 0x00000010 | 71 | #define TI_CPU 0x00000010 |
73 | #define TI_PRE_COUNT 0x00000014 | 72 | #define TI_PRE_COUNT 0x00000014 |
74 | #define TI_ADDR_LIMIT 0x00000018 | 73 | #define TI_ADDR_LIMIT 0x00000018 |
75 | #define TI_RESTART_BLOCK 0x000001C | ||
76 | 74 | ||
77 | #endif | 75 | #endif |
78 | 76 | ||
@@ -90,9 +88,6 @@ struct thread_info { | |||
90 | .cpu = 0, \ | 88 | .cpu = 0, \ |
91 | .preempt_count = INIT_PREEMPT_COUNT, \ | 89 | .preempt_count = INIT_PREEMPT_COUNT, \ |
92 | .addr_limit = KERNEL_DS, \ | 90 | .addr_limit = KERNEL_DS, \ |
93 | .restart_block = { \ | ||
94 | .fn = do_no_restart_syscall, \ | ||
95 | }, \ | ||
96 | } | 91 | } |
97 | 92 | ||
98 | #define init_thread_info (init_thread_union.thread_info) | 93 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index 4612321c73cc..3d733ba16f28 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -245,7 +245,7 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3, | |||
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | /* Always make any pending restarted system calls return -EINTR */ | 247 | /* Always make any pending restarted system calls return -EINTR */ |
248 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 248 | current->restart_block.fn = do_no_restart_syscall; |
249 | 249 | ||
250 | if (regs->depc > 64) | 250 | if (regs->depc > 64) |
251 | panic("rt_sigreturn in double exception!\n"); | 251 | panic("rt_sigreturn in double exception!\n"); |
diff --git a/fs/select.c b/fs/select.c index 467bb1cb3ea5..f684c750e08a 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -971,7 +971,7 @@ SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds, | |||
971 | if (ret == -EINTR) { | 971 | if (ret == -EINTR) { |
972 | struct restart_block *restart_block; | 972 | struct restart_block *restart_block; |
973 | 973 | ||
974 | restart_block = ¤t_thread_info()->restart_block; | 974 | restart_block = ¤t->restart_block; |
975 | restart_block->fn = do_restart_poll; | 975 | restart_block->fn = do_restart_poll; |
976 | restart_block->poll.ufds = ufds; | 976 | restart_block->poll.ufds = ufds; |
977 | restart_block->poll.nfds = nfds; | 977 | restart_block->poll.nfds = nfds; |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 3037fc085e8e..d3d43ecf148c 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -193,6 +193,9 @@ extern struct task_group root_task_group; | |||
193 | .nr_cpus_allowed= NR_CPUS, \ | 193 | .nr_cpus_allowed= NR_CPUS, \ |
194 | .mm = NULL, \ | 194 | .mm = NULL, \ |
195 | .active_mm = &init_mm, \ | 195 | .active_mm = &init_mm, \ |
196 | .restart_block = { \ | ||
197 | .fn = do_no_restart_syscall, \ | ||
198 | }, \ | ||
196 | .se = { \ | 199 | .se = { \ |
197 | .group_node = LIST_HEAD_INIT(tsk.se.group_node), \ | 200 | .group_node = LIST_HEAD_INIT(tsk.se.group_node), \ |
198 | }, \ | 201 | }, \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8db31ef98d2f..22ee0d5d7f8c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1370,6 +1370,8 @@ struct task_struct { | |||
1370 | 1370 | ||
1371 | unsigned long atomic_flags; /* Flags needing atomic access. */ | 1371 | unsigned long atomic_flags; /* Flags needing atomic access. */ |
1372 | 1372 | ||
1373 | struct restart_block restart_block; | ||
1374 | |||
1373 | pid_t pid; | 1375 | pid_t pid; |
1374 | pid_t tgid; | 1376 | pid_t tgid; |
1375 | 1377 | ||
diff --git a/kernel/compat.c b/kernel/compat.c index ebb3c369d03d..24f00610c575 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -276,8 +276,7 @@ COMPAT_SYSCALL_DEFINE2(nanosleep, struct compat_timespec __user *, rqtp, | |||
276 | * core implementation decides to return random nonsense. | 276 | * core implementation decides to return random nonsense. |
277 | */ | 277 | */ |
278 | if (ret == -ERESTART_RESTARTBLOCK) { | 278 | if (ret == -ERESTART_RESTARTBLOCK) { |
279 | struct restart_block *restart | 279 | struct restart_block *restart = ¤t->restart_block; |
280 | = ¤t_thread_info()->restart_block; | ||
281 | 280 | ||
282 | restart->fn = compat_nanosleep_restart; | 281 | restart->fn = compat_nanosleep_restart; |
283 | restart->nanosleep.compat_rmtp = rmtp; | 282 | restart->nanosleep.compat_rmtp = rmtp; |
@@ -860,7 +859,7 @@ COMPAT_SYSCALL_DEFINE4(clock_nanosleep, clockid_t, which_clock, int, flags, | |||
860 | return -EFAULT; | 859 | return -EFAULT; |
861 | 860 | ||
862 | if (err == -ERESTART_RESTARTBLOCK) { | 861 | if (err == -ERESTART_RESTARTBLOCK) { |
863 | restart = ¤t_thread_info()->restart_block; | 862 | restart = ¤t->restart_block; |
864 | restart->fn = compat_clock_nanosleep_restart; | 863 | restart->fn = compat_clock_nanosleep_restart; |
865 | restart->nanosleep.compat_rmtp = rmtp; | 864 | restart->nanosleep.compat_rmtp = rmtp; |
866 | } | 865 | } |
diff --git a/kernel/futex.c b/kernel/futex.c index 4eeb63de7e54..2a5e3830e953 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -2217,7 +2217,7 @@ retry: | |||
2217 | if (!abs_time) | 2217 | if (!abs_time) |
2218 | goto out; | 2218 | goto out; |
2219 | 2219 | ||
2220 | restart = ¤t_thread_info()->restart_block; | 2220 | restart = ¤t->restart_block; |
2221 | restart->fn = futex_wait_restart; | 2221 | restart->fn = futex_wait_restart; |
2222 | restart->futex.uaddr = uaddr; | 2222 | restart->futex.uaddr = uaddr; |
2223 | restart->futex.val = val; | 2223 | restart->futex.val = val; |
diff --git a/kernel/signal.c b/kernel/signal.c index 16a305295256..33a52759cc0e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2501,7 +2501,7 @@ EXPORT_SYMBOL(unblock_all_signals); | |||
2501 | */ | 2501 | */ |
2502 | SYSCALL_DEFINE0(restart_syscall) | 2502 | SYSCALL_DEFINE0(restart_syscall) |
2503 | { | 2503 | { |
2504 | struct restart_block *restart = ¤t_thread_info()->restart_block; | 2504 | struct restart_block *restart = ¤t->restart_block; |
2505 | return restart->fn(restart); | 2505 | return restart->fn(restart); |
2506 | } | 2506 | } |
2507 | 2507 | ||
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index a7077d3ae52f..1b001ed1edb9 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c | |||
@@ -788,7 +788,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags, | |||
788 | goto out; | 788 | goto out; |
789 | } | 789 | } |
790 | 790 | ||
791 | restart = ¤t_thread_info()->restart_block; | 791 | restart = ¤t->restart_block; |
792 | restart->fn = alarm_timer_nsleep_restart; | 792 | restart->fn = alarm_timer_nsleep_restart; |
793 | restart->nanosleep.clockid = type; | 793 | restart->nanosleep.clockid = type; |
794 | restart->nanosleep.expires = exp.tv64; | 794 | restart->nanosleep.expires = exp.tv64; |
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 3f5e183c3d97..bee0c1f78091 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -1583,7 +1583,7 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp, | |||
1583 | goto out; | 1583 | goto out; |
1584 | } | 1584 | } |
1585 | 1585 | ||
1586 | restart = ¤t_thread_info()->restart_block; | 1586 | restart = ¤t->restart_block; |
1587 | restart->fn = hrtimer_nanosleep_restart; | 1587 | restart->fn = hrtimer_nanosleep_restart; |
1588 | restart->nanosleep.clockid = t.timer.base->clockid; | 1588 | restart->nanosleep.clockid = t.timer.base->clockid; |
1589 | restart->nanosleep.rmtp = rmtp; | 1589 | restart->nanosleep.rmtp = rmtp; |
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c index a16b67859e2a..0075da74abf0 100644 --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c | |||
@@ -1334,8 +1334,7 @@ static long posix_cpu_nsleep_restart(struct restart_block *restart_block); | |||
1334 | static int posix_cpu_nsleep(const clockid_t which_clock, int flags, | 1334 | static int posix_cpu_nsleep(const clockid_t which_clock, int flags, |
1335 | struct timespec *rqtp, struct timespec __user *rmtp) | 1335 | struct timespec *rqtp, struct timespec __user *rmtp) |
1336 | { | 1336 | { |
1337 | struct restart_block *restart_block = | 1337 | struct restart_block *restart_block = ¤t->restart_block; |
1338 | ¤t_thread_info()->restart_block; | ||
1339 | struct itimerspec it; | 1338 | struct itimerspec it; |
1340 | int error; | 1339 | int error; |
1341 | 1340 | ||