aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-07-13 11:28:15 -0400
committerRichard Weinberger <richard@nod.at>2015-04-12 14:58:25 -0400
commit78d156b8d8e5884cb5af07f9e57a45a1ae5d59cf (patch)
tree629cd67b897f8eae391f29dddb4103ddc2ef668e /arch/mn10300
parent6140de5aae4a490e7320215b4197874e37e0969c (diff)
mn10300: Remove signal translation and exec_domain
As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/mn10300')
-rw-r--r--arch/mn10300/include/asm/thread_info.h2
-rw-r--r--arch/mn10300/kernel/asm-offsets.c2
-rw-r--r--arch/mn10300/kernel/signal.c20
3 files changed, 4 insertions, 20 deletions
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h
index c1c374f0ec12..4861a78c7160 100644
--- a/arch/mn10300/include/asm/thread_info.h
+++ b/arch/mn10300/include/asm/thread_info.h
@@ -40,7 +40,6 @@ typedef struct {
40 40
41struct thread_info { 41struct thread_info {
42 struct task_struct *task; /* main task structure */ 42 struct task_struct *task; /* main task structure */
43 struct exec_domain *exec_domain; /* execution domain */
44 struct pt_regs *frame; /* current exception frame */ 43 struct pt_regs *frame; /* current exception frame */
45 unsigned long flags; /* low level flags */ 44 unsigned long flags; /* low level flags */
46 __u32 cpu; /* current CPU */ 45 __u32 cpu; /* current CPU */
@@ -74,7 +73,6 @@ struct thread_info {
74#define INIT_THREAD_INFO(tsk) \ 73#define INIT_THREAD_INFO(tsk) \
75{ \ 74{ \
76 .task = &tsk, \ 75 .task = &tsk, \
77 .exec_domain = &default_exec_domain, \
78 .flags = 0, \ 76 .flags = 0, \
79 .cpu = 0, \ 77 .cpu = 0, \
80 .preempt_count = INIT_PREEMPT_COUNT, \ 78 .preempt_count = INIT_PREEMPT_COUNT, \
diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c
index d780670cbaf3..e5a61c659b5a 100644
--- a/arch/mn10300/kernel/asm-offsets.c
+++ b/arch/mn10300/kernel/asm-offsets.c
@@ -22,7 +22,6 @@ void foo(void)
22 BLANK(); 22 BLANK();
23 23
24 OFFSET(TI_task, thread_info, task); 24 OFFSET(TI_task, thread_info, task);
25 OFFSET(TI_exec_domain, thread_info, exec_domain);
26 OFFSET(TI_frame, thread_info, frame); 25 OFFSET(TI_frame, thread_info, frame);
27 OFFSET(TI_flags, thread_info, flags); 26 OFFSET(TI_flags, thread_info, flags);
28 OFFSET(TI_cpu, thread_info, cpu); 27 OFFSET(TI_cpu, thread_info, cpu);
@@ -85,7 +84,6 @@ void foo(void)
85 DEFINE(SIGCHLD_asm, SIGCHLD); 84 DEFINE(SIGCHLD_asm, SIGCHLD);
86 BLANK(); 85 BLANK();
87 86
88 OFFSET(EXEC_DOMAIN_handler, exec_domain, handler);
89 OFFSET(RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext); 87 OFFSET(RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext);
90 88
91 DEFINE(PAGE_SIZE_asm, PAGE_SIZE); 89 DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c
index 8609845f12c5..dfd0301cf200 100644
--- a/arch/mn10300/kernel/signal.c
+++ b/arch/mn10300/kernel/signal.c
@@ -202,20 +202,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
202 struct pt_regs *regs) 202 struct pt_regs *regs)
203{ 203{
204 struct sigframe __user *frame; 204 struct sigframe __user *frame;
205 int rsig, sig = ksig->sig; 205 int sig = ksig->sig;
206 206
207 frame = get_sigframe(ksig, regs, sizeof(*frame)); 207 frame = get_sigframe(ksig, regs, sizeof(*frame));
208 208
209 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 209 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
210 return -EFAULT; 210 return -EFAULT;
211 211
212 rsig = sig; 212 if (__put_user(sig, &frame->sig) < 0 ||
213 if (sig < 32 &&
214 current_thread_info()->exec_domain &&
215 current_thread_info()->exec_domain->signal_invmap)
216 rsig = current_thread_info()->exec_domain->signal_invmap[sig];
217
218 if (__put_user(rsig, &frame->sig) < 0 ||
219 __put_user(&frame->sc, &frame->psc) < 0) 213 __put_user(&frame->sc, &frame->psc) < 0)
220 return -EFAULT; 214 return -EFAULT;
221 215
@@ -270,20 +264,14 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
270 struct pt_regs *regs) 264 struct pt_regs *regs)
271{ 265{
272 struct rt_sigframe __user *frame; 266 struct rt_sigframe __user *frame;
273 int rsig, sig = ksig->sig; 267 int sig = ksig->sig;
274 268
275 frame = get_sigframe(ksig, regs, sizeof(*frame)); 269 frame = get_sigframe(ksig, regs, sizeof(*frame));
276 270
277 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 271 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
278 return -EFAULT; 272 return -EFAULT;
279 273
280 rsig = sig; 274 if (__put_user(sig, &frame->sig) ||
281 if (sig < 32 &&
282 current_thread_info()->exec_domain &&
283 current_thread_info()->exec_domain->signal_invmap)
284 rsig = current_thread_info()->exec_domain->signal_invmap[sig];
285
286 if (__put_user(rsig, &frame->sig) ||
287 __put_user(&frame->info, &frame->pinfo) || 275 __put_user(&frame->info, &frame->pinfo) ||
288 __put_user(&frame->uc, &frame->puc) || 276 __put_user(&frame->uc, &frame->puc) ||
289 copy_siginfo_to_user(&frame->info, &ksig->info)) 277 copy_siginfo_to_user(&frame->info, &ksig->info))