Commit 2921e2bd authored by Michal Simek's avatar Michal Simek

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: default avatarMichal Simek <monstr@monstr.eu>
parent 6dfb79aa
...@@ -31,4 +31,7 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */ ...@@ -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 */ DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
# endif /* __ASSEMBLY__ */ # endif /* __ASSEMBLY__ */
/* noMMU hasn't any space for args */
# define STATE_SAVE_ARG_SPACE (0)
#endif /* _ASM_MICROBLAZE_ENTRY_H */ #endif /* _ASM_MICROBLAZE_ENTRY_H */
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/registers.h> #include <asm/registers.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/entry.h>
#include <asm/current.h>
# ifndef __ASSEMBLY__ # ifndef __ASSEMBLY__
/* from kernel/cpu/mb.c */ /* from kernel/cpu/mb.c */
......
...@@ -178,7 +178,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p) ...@@ -178,7 +178,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p)
asmlinkage int sys_sigreturn(struct pt_regs *regs) 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; sigset_t set;
int rval; int rval;
...@@ -209,7 +211,9 @@ badframe: ...@@ -209,7 +211,9 @@ badframe:
asmlinkage int sys_rt_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; sigset_t set;
stack_t st; stack_t st;
int rval; int rval;
...@@ -336,7 +340,8 @@ static void setup_frame(int sig, struct k_sigaction *ka, ...@@ -336,7 +340,8 @@ static void setup_frame(int sig, struct k_sigaction *ka,
goto give_sigsegv; goto give_sigsegv;
/* Set up registers for signal handler */ /* Set up registers for signal handler */
regs->r1 = (unsigned long) frame; regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;
/* Signal handler args: */ /* Signal handler args: */
regs->r5 = signal; /* Arg 0: signum */ regs->r5 = signal; /* Arg 0: signum */
regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */ 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,7 +419,8 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
goto give_sigsegv; goto give_sigsegv;
/* Set up registers for signal handler */ /* Set up registers for signal handler */
regs->r1 = (unsigned long) frame; regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;
/* Signal handler args: */ /* Signal handler args: */
regs->r5 = signal; /* arg 0: signum */ regs->r5 = signal; /* arg 0: signum */
regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */ regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment