projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[MIPS] SMP: Get smp_tune_scheduling to do something useful.
[powerpc.git]
/
arch
/
mips
/
kernel
/
signal.c
diff --git
a/arch/mips/kernel/signal.c
b/arch/mips/kernel/signal.c
index
b2e9ab1
..
f091786
100644
(file)
--- a/
arch/mips/kernel/signal.c
+++ b/
arch/mips/kernel/signal.c
@@
-89,6
+89,9
@@
int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
for (i = 1; i < 32; i++)
err |= __put_user(regs->regs[i], &sc->sc_regs[i]);
for (i = 1; i < 32; i++)
err |= __put_user(regs->regs[i], &sc->sc_regs[i]);
+#ifdef CONFIG_CPU_HAS_SMARTMIPS
+ err |= __put_user(regs->acx, &sc->sc_acx);
+#endif
err |= __put_user(regs->hi, &sc->sc_mdhi);
err |= __put_user(regs->lo, &sc->sc_mdlo);
if (cpu_has_dsp) {
err |= __put_user(regs->hi, &sc->sc_mdhi);
err |= __put_user(regs->lo, &sc->sc_mdlo);
if (cpu_has_dsp) {
@@
-132,6
+135,10
@@
int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
current_thread_info()->restart_block.fn = do_no_restart_syscall;
err |= __get_user(regs->cp0_epc, &sc->sc_pc);
current_thread_info()->restart_block.fn = do_no_restart_syscall;
err |= __get_user(regs->cp0_epc, &sc->sc_pc);
+
+#ifdef CONFIG_CPU_HAS_SMARTMIPS
+ err |= __get_user(regs->acx, &sc->sc_acx);
+#endif
err |= __get_user(regs->hi, &sc->sc_mdhi);
err |= __get_user(regs->lo, &sc->sc_mdlo);
if (cpu_has_dsp) {
err |= __get_user(regs->hi, &sc->sc_mdhi);
err |= __get_user(regs->lo, &sc->sc_mdlo);
if (cpu_has_dsp) {
@@
-398,7
+405,7
@@
badframe:
}
#ifdef CONFIG_TRAD_SIGNALS
}
#ifdef CONFIG_TRAD_SIGNALS
-int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
+
static
int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
int signr, sigset_t *set)
{
struct sigframe __user *frame;
int signr, sigset_t *set)
{
struct sigframe __user *frame;
@@
-443,7
+450,7
@@
give_sigsegv:
}
#endif
}
#endif
-int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
+
static
int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
int signr, sigset_t *set, siginfo_t *info)
{
struct rt_sigframe __user *frame;
int signr, sigset_t *set, siginfo_t *info)
{
struct rt_sigframe __user *frame;
@@
-501,6
+508,14
@@
give_sigsegv:
return -EFAULT;
}
return -EFAULT;
}
+struct mips_abi mips_abi = {
+#ifdef CONFIG_TRAD_SIGNALS
+ .setup_frame = setup_frame,
+#endif
+ .setup_rt_frame = setup_rt_frame,
+ .restart = __NR_restart_syscall
+};
+
static int handle_signal(unsigned long sig, siginfo_t *info,
struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
{
static int handle_signal(unsigned long sig, siginfo_t *info,
struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
{
@@
-539,7
+554,7
@@
static int handle_signal(unsigned long sig, siginfo_t *info,
return ret;
}
return ret;
}
-void do_signal(struct pt_regs *regs)
+
static
void do_signal(struct pt_regs *regs)
{
struct k_sigaction ka;
sigset_t *oldset;
{
struct k_sigaction ka;
sigset_t *oldset;
@@
-589,7
+604,7
@@
void do_signal(struct pt_regs *regs)
regs->cp0_epc -= 8;
}
if (regs->regs[2] == ERESTART_RESTARTBLOCK) {
regs->cp0_epc -= 8;
}
if (regs->regs[2] == ERESTART_RESTARTBLOCK) {
- regs->regs[2] =
__NR_restart_syscall
;
+ regs->regs[2] =
current->thread.abi->restart
;
regs->regs[7] = regs->regs[26];
regs->cp0_epc -= 4;
}
regs->regs[7] = regs->regs[26];
regs->cp0_epc -= 4;
}
@@
-615,5
+630,5
@@
asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
{
/* deal with pending signal delivery */
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
{
/* deal with pending signal delivery */
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
-
current->thread.abi->
do_signal(regs);
+ do_signal(regs);
}
}