[kernel] r12968 - in dists/sid/linux-2.6/debian/patches: bugfix/m68k/2.6.28 series
Stephen Marenka
smarenka at alioth.debian.org
Tue Mar 3 23:58:08 UTC 2009
Author: smarenka
Date: Tue Mar 3 23:58:07 2009
New Revision: 12968
Log:
m68k: add git patches
Added:
dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.28/0001-m68k-Fix-atarimouse-init.patch
dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.28/0002-m68k-wire-up-sys_restart_syscall.patch
Modified:
dists/sid/linux-2.6/debian/patches/series/2
Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.28/0001-m68k-Fix-atarimouse-init.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.28/0001-m68k-Fix-atarimouse-init.patch Tue Mar 3 23:58:07 2009
@@ -0,0 +1,30 @@
+From 846615b699baaeb31a93f79ad1a60a517a28c4b4 Mon Sep 17 00:00:00 2001
+From: Michael Schmitz <schmitz at biophys.uni-duesseldorf.de>
+Date: Sun, 28 Dec 2008 23:00:45 +0100
+Subject: [PATCH] m68k: Fix atarimouse init
+
+Atarimouse fails to load as a module (with ENODEV), due to a brown paper
+bag bug, misinterpreting the semantics of atari_keyb_init().
+
+Signed-off-by: Michael Schmitz <schmitz at debian.org>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/input/mouse/atarimouse.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c
+index a57143c..1b5f4dd 100644
+--- a/drivers/input/mouse/atarimouse.c
++++ b/drivers/input/mouse/atarimouse.c
+@@ -118,7 +118,7 @@ static int __init atamouse_init(void)
+ if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
+ return -ENODEV;
+
+- if (!atari_keyb_init())
++ if (atari_keyb_init())
+ return -ENODEV;
+
+ atamouse_dev = input_allocate_device();
+--
+1.5.6.5
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.28/0002-m68k-wire-up-sys_restart_syscall.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.28/0002-m68k-wire-up-sys_restart_syscall.patch Tue Mar 3 23:58:07 2009
@@ -0,0 +1,93 @@
+From 6a85a5b89064303eaa40210897367a745219084d Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab at suse.de>
+Date: Mon, 29 Dec 2008 19:34:57 +0100
+Subject: [PATCH] m68k: wire up sys_restart_syscall
+
+Make restart blocks working, required for proper syscall restarting.
+
+Signed-off-by: Andreas Schwab <schwab at suse.de>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/kernel/entry.S | 2 +-
+ arch/m68k/kernel/signal.c | 15 +++++++++++++++
+ include/asm-m68k/unistd.h | 4 +---
+ 3 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
+index f28404d..5b78082 100644
+--- a/arch/m68k/kernel/entry.S
++++ b/arch/m68k/kernel/entry.S
+@@ -424,7 +424,7 @@ resume:
+ .data
+ ALIGN
+ sys_call_table:
+- .long sys_ni_syscall /* 0 - old "setup()" system call*/
++ .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
+ .long sys_exit
+ .long sys_fork
+ .long sys_read
+diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
+index d1e9220..842bfd9 100644
+--- a/arch/m68k/kernel/signal.c
++++ b/arch/m68k/kernel/signal.c
+@@ -348,6 +348,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u
+ struct sigcontext context;
+ int err;
+
++ /* Always make any pending restarted system calls return -EINTR */
++ current_thread_info()->restart_block.fn = do_no_restart_syscall;
++
+ /* get previous context */
+ if (copy_from_user(&context, usc, sizeof(context)))
+ goto badframe;
+@@ -433,6 +436,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
+ unsigned long usp;
+ int err;
+
++ /* Always make any pending restarted system calls return -EINTR */
++ current_thread_info()->restart_block.fn = do_no_restart_syscall;
++
+ err = __get_user(temp, &uc->uc_mcontext.version);
+ if (temp != MCONTEXT_VERSION)
+ goto badframe;
+@@ -959,6 +965,15 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
+ regs->d0 = -EINTR;
+ break;
+
++ case -ERESTART_RESTARTBLOCK:
++ if (!has_handler) {
++ regs->d0 = __NR_restart_syscall;
++ regs->pc -= 2;
++ break;
++ }
++ regs->d0 = -EINTR;
++ break;
++
+ case -ERESTARTSYS:
+ if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) {
+ regs->d0 = -EINTR;
+diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
+index 965abb8..3c19027 100644
+--- a/include/asm-m68k/unistd.h
++++ b/include/asm-m68k/unistd.h
+@@ -5,6 +5,7 @@
+ * This file contains the system call numbers.
+ */
+
++#define __NR_restart_syscall 0
+ #define __NR_exit 1
+ #define __NR_fork 2
+ #define __NR_read 3
+@@ -359,9 +360,6 @@
+ #define __ARCH_WANT_SYS_SIGPROCMASK
+ #define __ARCH_WANT_SYS_RT_SIGACTION
+
+-/* whitelist for checksyscalls */
+-#define __IGNORE_restart_syscall
+-
+ /*
+ * "Conditional" syscalls
+ *
+--
+1.5.6.5
+
Modified: dists/sid/linux-2.6/debian/patches/series/2
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/2 (original)
+++ dists/sid/linux-2.6/debian/patches/series/2 Tue Mar 3 23:58:07 2009
@@ -141,5 +141,13 @@
+ bugfix/m68k/2.6.28/atafb-panning.diff arch=m68k
# defconfig updates!
-#srm: failed to apply
+#srm: failed to apply, don't need
#+ bugfix/m68k/2.6.28/m68k-update-defconfig-latest.diff arch=m68k
+
+# pick patches from linux-m68k git, 2.6.28 branch
+# http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=m68k-v2.6.28
+
++ bugfix/m68k/2.6.28/0001-m68k-Fix-atarimouse-init.patch arch=m68k
++ bugfix/m68k/2.6.28/0002-m68k-wire-up-sys_restart_syscall.patch arch=m68k
+
+# end m68k
More information about the Kernel-svn-changes
mailing list