Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356672
b: refs/heads/master
c: 6ec78be
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Feb 3, 2013
1 parent 9e023ce commit d2fee79
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 79d432103c6dc4ed46adc8e1f53d34e8ba7089c0
refs/heads/master: 6ec78be4cdff4db6e6ea930db9f5d912bc05febc
1 change: 0 additions & 1 deletion trunk/arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ config BLACKFIN
select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK

config GENERIC_CSUM
def_bool y
Expand Down
12 changes: 10 additions & 2 deletions trunk/arch/blackfin/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ struct rt_sigframe {
struct ucontext uc;
};

asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
{
return do_sigaltstack(uss, uoss, rdusp());
}

static inline int
rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *pr0)
{
Expand Down Expand Up @@ -95,7 +100,7 @@ asmlinkage int sys_rt_sigreturn(void)
if (rt_restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0))
goto badframe;

if (restore_altstack(&frame->uc.uc_stack))
if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->usp) == -EFAULT)
goto badframe;

return r0;
Expand Down Expand Up @@ -173,7 +178,10 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info,
/* Create the ucontext. */
err |= __put_user(0, &frame->uc.uc_flags);
err |= __put_user(0, &frame->uc.uc_link);
err |= __save_altstack(&frame->uc.uc_stack, rdusp());
err |=
__put_user((void *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
err |= __put_user(sas_ss_flags(rdusp()), &frame->uc.uc_stack.ss_flags);
err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
err |= rt_setup_sigcontext(&frame->uc.uc_mcontext, regs);
err |= copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/c6x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config C6X
select OF_EARLY_FLATTREE
select GENERIC_CLOCKEVENTS
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK

config MMU
def_bool n
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/c6x/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -598,18 +598,6 @@ ENTRY(enable_exception)
NOP 5
ENDPROC(enable_exception)

ENTRY(sys_sigaltstack)
#ifdef CONFIG_C6X_BIG_KERNEL
MVKL .S1 do_sigaltstack,A0 ; branch to do_sigaltstack
MVKH .S1 do_sigaltstack,A0
B .S2X A0
#else
B .S2 do_sigaltstack
#endif
LDW .D2T1 *+SP(REGS_SP+8),A6
NOP 4
ENDPROC(sys_sigaltstack)

;;
;; Special system calls
;; return address is in B3
Expand Down

0 comments on commit d2fee79

Please sign in to comment.