Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144148
b: refs/heads/master
c: 2921e2b
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Apr 23, 2009
1 parent 5de4343 commit 05af2a7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 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: 6dfb79aa114ac69032f3931235ffc90799e9630b
refs/heads/master: 2921e2bd679949a7892d308b414e6a3b3c705260
3 changes: 3 additions & 0 deletions trunk/arch/microblaze/include/asm/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
# endif /* __ASSEMBLY__ */

/* noMMU hasn't any space for args */
# define STATE_SAVE_ARG_SPACE (0)

#endif /* _ASM_MICROBLAZE_ENTRY_H */
2 changes: 2 additions & 0 deletions trunk/arch/microblaze/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <asm/setup.h>
#include <asm/registers.h>
#include <asm/segment.h>
#include <asm/entry.h>
#include <asm/current.h>

# ifndef __ASSEMBLY__
/* from kernel/cpu/mb.c */
Expand Down
14 changes: 10 additions & 4 deletions trunk/arch/microblaze/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p)

asmlinkage int sys_sigreturn(struct pt_regs *regs)
{
struct sigframe *frame = (struct sigframe *)regs->r1;
struct sigframe *frame =
(struct sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE);

sigset_t set;
int rval;

Expand Down Expand Up @@ -209,7 +211,9 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)

asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
{
struct rt_sigframe *frame = (struct rt_sigframe *)regs->r1;
struct rt_sigframe *frame =
(struct rt_sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE);

sigset_t set;
stack_t st;
int rval;
Expand Down Expand Up @@ -336,7 +340,8 @@ static void setup_frame(int sig, struct k_sigaction *ka,
goto give_sigsegv;

/* Set up registers for signal handler */
regs->r1 = (unsigned long) frame;
regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;

/* Signal handler args: */
regs->r5 = signal; /* Arg 0: signum */
regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */
Expand Down Expand Up @@ -414,7 +419,8 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
goto give_sigsegv;

/* Set up registers for signal handler */
regs->r1 = (unsigned long) frame;
regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;

/* Signal handler args: */
regs->r5 = signal; /* arg 0: signum */
regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */
Expand Down

0 comments on commit 05af2a7

Please sign in to comment.