Resent-Date: Tue, 24 Aug 1999 10:58:15 +0200 (MET DST)
Date: Tue, 24 Aug 1999 10:57:26 +0200 (MET DST)
From: Roman Zippel <zippel@fh-brandenburg.de>
X-Sender: zippel@zeus
To: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: 2.3.14 fix
Resent-From: linux-m68k@phil.uni-sb.de

Hi,

The following patch is needed to do any user space debugging, I
shouldn't have put ret_from_fork into the exit of do_trace. :)

bye, Roman

--- entry.S.org	Fri Aug 20 20:46:56 1999
+++ entry.S	Tue Aug 24 01:00:37 1999
@@ -72,6 +72,16 @@
 	pea	SYMBOL_NAME(ret_from_exception)
 	jmp	SYMBOL_NAME(schedule)
 
+	| After a fork we jump here directly from resume,
+	| so that %d1 contains the previous task
+	| Theoretically only needed on SMP, but let's watch
+	| what happens in schedule_tail() in future...
+ENTRY(ret_from_fork)
+	movel	%d1,%sp@-
+	jsr	SYMBOL_NAME(schedule_tail)
+	addql	#4,%sp
+	jra	SYMBOL_NAME(ret_from_exception)
+
 badsys:
 	movel	#-ENOSYS,PT_D0(%sp)
 	jra	SYMBOL_NAME(ret_from_exception)
@@ -88,16 +98,6 @@
 	subql	#4,%sp			| dummy return address
 	SAVE_SWITCH_STACK
 	jbsr	SYMBOL_NAME(syscall_trace)
-
-	| After a fork we jump here directly from resume,
-	| so that %d1 contains the previous task
-	| Theoretically only needed on SMP, but let's watch
-	| what happens in schedule_tail() in future...
-ENTRY(ret_from_fork)
-	movel	%d1,%sp@-
-	jsr	SYMBOL_NAME(schedule_tail)
-	addql	#4,%sp
-	jra	SYMBOL_NAME(ret_from_exception)
 
 SYMBOL_NAME_LABEL(ret_from_signal)
 	RESTORE_SWITCH_STACK


