aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 03:52:33 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:23 -0500
commit50b3c9e30a53172b627081e7129c03ef53f27319 (patch)
treedf6c605eb279c00ebf114f07b3ead4e8d690fbc0 /arch/unicore32
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
unicore32: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/unicore32')
-rw-r--r--arch/unicore32/Kconfig1
-rw-r--r--arch/unicore32/kernel/entry.S5
-rw-r--r--arch/unicore32/kernel/signal.c12
3 files changed, 3 insertions, 15 deletions
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 60651df5f952..a62786fdcaab 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -16,6 +16,7 @@ config UNICORE32
16 select ARCH_WANT_FRAME_POINTERS 16 select ARCH_WANT_FRAME_POINTERS
17 select GENERIC_IOMAP 17 select GENERIC_IOMAP
18 select MODULES_USE_ELF_REL 18 select MODULES_USE_ELF_REL
19 select GENERIC_SIGALTSTACK
19 help 20 help
20 UniCore-32 is 32-bit Instruction Set Architecture, 21 UniCore-32 is 32-bit Instruction Set Architecture,
21 including a series of low-power-consumption RISC chip 22 including a series of low-power-consumption RISC chip
diff --git a/arch/unicore32/kernel/entry.S b/arch/unicore32/kernel/entry.S
index 581630d91444..bcdedd80890e 100644
--- a/arch/unicore32/kernel/entry.S
+++ b/arch/unicore32/kernel/entry.S
@@ -674,11 +674,6 @@ ENTRY(sys_rt_sigreturn)
674 b __sys_rt_sigreturn 674 b __sys_rt_sigreturn
675ENDPROC(sys_rt_sigreturn) 675ENDPROC(sys_rt_sigreturn)
676 676
677ENTRY(sys_sigaltstack)
678 ldw r2, [sp+], #S_OFF + S_SP
679 b do_sigaltstack
680ENDPROC(sys_sigaltstack)
681
682 __INIT 677 __INIT
683 678
684/* 679/*
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c
index b8b2ffd774d6..6905f0ebdc77 100644
--- a/arch/unicore32/kernel/signal.c
+++ b/arch/unicore32/kernel/signal.c
@@ -123,8 +123,7 @@ asmlinkage int __sys_rt_sigreturn(struct pt_regs *regs)
123 if (restore_sigframe(regs, &frame->sig)) 123 if (restore_sigframe(regs, &frame->sig))
124 goto badframe; 124 goto badframe;
125 125
126 if (do_sigaltstack(&frame->sig.uc.uc_stack, NULL, regs->UCreg_sp) 126 if (restore_altstack(&frame->sig.uc.uc_stack))
127 == -EFAULT)
128 goto badframe; 127 goto badframe;
129 128
130 return regs->UCreg_00; 129 return regs->UCreg_00;
@@ -265,7 +264,6 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
265{ 264{
266 struct rt_sigframe __user *frame = 265 struct rt_sigframe __user *frame =
267 get_sigframe(ka, regs, sizeof(*frame)); 266 get_sigframe(ka, regs, sizeof(*frame));
268 stack_t stack;
269 int err = 0; 267 int err = 0;
270 268
271 if (!frame) 269 if (!frame)
@@ -275,13 +273,7 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
275 273
276 err |= __put_user(0, &frame->sig.uc.uc_flags); 274 err |= __put_user(0, &frame->sig.uc.uc_flags);
277 err |= __put_user(NULL, &frame->sig.uc.uc_link); 275 err |= __put_user(NULL, &frame->sig.uc.uc_link);
278 276 err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp);
279 memset(&stack, 0, sizeof(stack));
280 stack.ss_sp = (void __user *)current->sas_ss_sp;
281 stack.ss_flags = sas_ss_flags(regs->UCreg_sp);
282 stack.ss_size = current->sas_ss_size;
283 err |= __copy_to_user(&frame->sig.uc.uc_stack, &stack, sizeof(stack));
284
285 err |= setup_sigframe(&frame->sig, regs, set); 277 err |= setup_sigframe(&frame->sig, regs, set);
286 if (err == 0) 278 if (err == 0)
287 err |= setup_return(regs, ka, frame->sig.retcode, frame, usig); 279 err |= setup_return(regs, ka, frame->sig.retcode, frame, usig);