Merge git://git.infradead.org/battery-2.6
[pandora-kernel.git] / arch / m32r / kernel / signal.c
index cb33097..a753d79 100644 (file)
  *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/kernel.h>
 #include <linux/signal.h>
 #include <linux/errno.h>
@@ -22,7 +20,7 @@
 #include <linux/unistd.h>
 #include <linux/stddef.h>
 #include <linux/personality.h>
-#include <linux/suspend.h>
+#include <linux/freezer.h>
 #include <asm/cacheflush.h>
 #include <asm/ucontext.h>
 #include <asm/uaccess.h>
@@ -34,7 +32,7 @@
 int do_signal(struct pt_regs *, sigset_t *);
 
 asmlinkage int
-sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
+sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
                  unsigned long r2, unsigned long r3, unsigned long r4,
                  unsigned long r5, unsigned long r6, struct pt_regs *regs)
 {
@@ -79,8 +77,8 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
 struct rt_sigframe
 {
        int sig;
-       struct siginfo *pinfo;
-       void *puc;
+       struct siginfo __user *pinfo;
+       void __user *puc;
        struct siginfo info;
        struct ucontext uc;
 //     struct _fpstate fpstate;
@@ -110,17 +108,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
        COPY(r10);
        COPY(r11);
        COPY(r12);
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
        COPY(acc0h);
        COPY(acc0l);
-       COPY(acc1h);
-       COPY(acc1l);
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
-       COPY(acch);
-       COPY(accl);
-#else
-#error unknown isa configuration
-#endif
+       COPY(acc1h);            /* ISA_DSP_LEVEL2 only */
+       COPY(acc1l);            /* ISA_DSP_LEVEL2 only */
        COPY(psw);
        COPY(bpc);
        COPY(bbpsw);
@@ -195,17 +186,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
        COPY(r10);
        COPY(r11);
        COPY(r12);
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
        COPY(acc0h);
        COPY(acc0l);
-       COPY(acc1h);
-       COPY(acc1l);
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
-       COPY(acch);
-       COPY(accl);
-#else
-#error unknown isa configuration
-#endif
+       COPY(acc1h);            /* ISA_DSP_LEVEL2 only */
+       COPY(acc1l);            /* ISA_DSP_LEVEL2 only */
        COPY(psw);
        COPY(bpc);
        COPY(bbpsw);
@@ -374,7 +358,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
 
        signr = get_signal_to_deliver(&info, &ka, regs, NULL);
        if (signr > 0) {
-               /* Reenable any watchpoints before delivering the
+               /* Re-enable any watchpoints before delivering the
                 * signal to user space. The processor register will
                 * have been cleared if the watchpoint triggered
                 * inside the kernel.