aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-04-21 08:08:47 -0400
committerMichal Simek <monstr@monstr.eu>2009-04-23 10:27:33 -0400
commit2921e2bd679949a7892d308b414e6a3b3c705260 (patch)
tree4be639979e46583a1c6e2d12b26a78b989a8c49c /arch/microblaze
parent6dfb79aa114ac69032f3931235ffc90799e9630b (diff)
microblaze: Add STATE_SAVE_ARG_SPACE for noMMU kernel too
For noMMU kernel this change nothing bring but this change helps with MMU synchronization. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/include/asm/entry.h3
-rw-r--r--arch/microblaze/include/asm/processor.h2
-rw-r--r--arch/microblaze/kernel/signal.c14
3 files changed, 15 insertions, 4 deletions
diff --git a/arch/microblaze/include/asm/entry.h b/arch/microblaze/include/asm/entry.h
index 1019d88b8129..e4c3aef884df 100644
--- a/arch/microblaze/include/asm/entry.h
+++ b/arch/microblaze/include/asm/entry.h
@@ -31,4 +31,7 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
31DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */ 31DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
32# endif /* __ASSEMBLY__ */ 32# endif /* __ASSEMBLY__ */
33 33
34/* noMMU hasn't any space for args */
35# define STATE_SAVE_ARG_SPACE (0)
36
34#endif /* _ASM_MICROBLAZE_ENTRY_H */ 37#endif /* _ASM_MICROBLAZE_ENTRY_H */
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h
index 89aa3956929b..9329029d2614 100644
--- a/arch/microblaze/include/asm/processor.h
+++ b/arch/microblaze/include/asm/processor.h
@@ -15,6 +15,8 @@
15#include <asm/setup.h> 15#include <asm/setup.h>
16#include <asm/registers.h> 16#include <asm/registers.h>
17#include <asm/segment.h> 17#include <asm/segment.h>
18#include <asm/entry.h>
19#include <asm/current.h>
18 20
19# ifndef __ASSEMBLY__ 21# ifndef __ASSEMBLY__
20/* from kernel/cpu/mb.c */ 22/* from kernel/cpu/mb.c */
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index 3889cf45fa71..40d36931e363 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -178,7 +178,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p)
178 178
179asmlinkage int sys_sigreturn(struct pt_regs *regs) 179asmlinkage int sys_sigreturn(struct pt_regs *regs)
180{ 180{
181 struct sigframe *frame = (struct sigframe *)regs->r1; 181 struct sigframe *frame =
182 (struct sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE);
183
182 sigset_t set; 184 sigset_t set;
183 int rval; 185 int rval;
184 186
@@ -209,7 +211,9 @@ badframe:
209 211
210asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) 212asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
211{ 213{
212 struct rt_sigframe *frame = (struct rt_sigframe *)regs->r1; 214 struct rt_sigframe *frame =
215 (struct rt_sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE);
216
213 sigset_t set; 217 sigset_t set;
214 stack_t st; 218 stack_t st;
215 int rval; 219 int rval;
@@ -336,7 +340,8 @@ static void setup_frame(int sig, struct k_sigaction *ka,
336 goto give_sigsegv; 340 goto give_sigsegv;
337 341
338 /* Set up registers for signal handler */ 342 /* Set up registers for signal handler */
339 regs->r1 = (unsigned long) frame; 343 regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;
344
340 /* Signal handler args: */ 345 /* Signal handler args: */
341 regs->r5 = signal; /* Arg 0: signum */ 346 regs->r5 = signal; /* Arg 0: signum */
342 regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */ 347 regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */
@@ -414,7 +419,8 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
414 goto give_sigsegv; 419 goto give_sigsegv;
415 420
416 /* Set up registers for signal handler */ 421 /* Set up registers for signal handler */
417 regs->r1 = (unsigned long) frame; 422 regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;
423
418 /* Signal handler args: */ 424 /* Signal handler args: */
419 regs->r5 = signal; /* arg 0: signum */ 425 regs->r5 = signal; /* arg 0: signum */
420 regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */ 426 regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */