patch-2.1.36 linux/arch/m68k/kernel/entry.S

Next file: linux/arch/m68k/kernel/head.S
Previous file: linux/arch/m68k/kernel/console.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/arch/m68k/kernel/entry.S linux/arch/m68k/kernel/entry.S
@@ -52,6 +52,10 @@
 #include <linux/linkage.h>
 #include <asm/setup.h>
 #include <asm/segment.h>
+#ifdef CONFIG_KGDB
+#include <asm/kgdb.h>
+.globl SYMBOL_NAME(kgdb_registers)
+#endif
 
 LENOSYS = 38
 
@@ -66,7 +70,7 @@
 LTASK_FLAGS	= 20
 
 /* the following macro is used when enabling interrupts */
-#if defined(CONFIG_ATARI_ONLY)
+#if defined(MACH_ATARI_ONLY)
 	/* block out HSYNC on the atari */
 #define ALLOWINT 0xfbff
 #define	MAX_NOINT_IPL	3
@@ -87,11 +91,23 @@
  * regs are a2-a6 and d6-d7 preserved by C code
  * the kernel doesn't mess with usp unless it needs to
  */
+#ifndef CONFIG_KGDB
 #define SAVE_ALL			\
 	clrl	%sp@-;    /* stk_adj */	\
 	movel	%d0,%sp@-; /* orig d0 */	\
 	movel	%d0,%sp@-; /* d0 */	\
 	moveml	%d1-%d5/%a0-%a1,%sp@-
+#else
+/* Need to save the "missing" registers for kgdb...
+ */
+#define SAVE_ALL						\
+	clrl	%sp@-;    /* stk_adj */				\
+	movel	%d0,%sp@-; /* orig d0 */			\
+	movel	%d0,%sp@-; /* d0 */				\
+	moveml	%d1-%d5/%a0-%a1,%sp@-;				\
+	moveml	%d6-%d7,SYMBOL_NAME(kgdb_registers)+GDBOFFA_D6;	\
+	moveml	%a2-%a6,SYMBOL_NAME(kgdb_registers)+GDBOFFA_A2
+#endif
 
 #define RESTORE_ALL			\
 	moveml	%sp@+,%a0-%a1/%d1-%d5;	\
@@ -244,7 +260,7 @@
 	movel	%d0,%sp@(LORIG_D0)	| a -1 in the ORIG_D0 field
 					| signifies that the stack frame
 					| is NOT for syscall
-	addql	#1,SYMBOL_NAME(intr_count)
+	addql	#1,SYMBOL_NAME(local_irq_count)
 					|  put exception # in d0
 	bfextu %sp@(LFORMATVEC){#4,#10},%d0
 
@@ -255,27 +271,26 @@
 
 SYMBOL_NAME_LABEL(ret_from_interrupt)
 	/* check if we need to do software interrupts */
-1:
-	movel	SYMBOL_NAME(intr_count),%d1
+	movel	SYMBOL_NAME(local_irq_count),%d1
 	subql	#1,%d1
 	jne	4f
-	bfextu  %sp@(LSR){#5,#3},%d0    | Check for nested interrupt.
+#if 0
+		bfextu  %sp@(LSR){#5,#3},%d0    | Check for nested interrupt.
 #if MAX_NOINT_IPL > 0
 	cmpiw	#MAX_NOINT_IPL,%d0
 #endif
 	jhi	4f
-2:
+#endif
 	movel	SYMBOL_NAME(bh_active),%d0
 	andl	SYMBOL_NAME(bh_mask),%d0
-	jne	3f
+	jeq	3f
 
-	clrl	SYMBOL_NAME(intr_count)	| deliver signals, reschedule etc..
-	jra	SYMBOL_NAME(ret_from_exception)
-3:	
 	jbsr	SYMBOL_NAME(do_bottom_half)
-	jbra	2b
+3:	
+	clrl	SYMBOL_NAME(local_irq_count)
+	jra	SYMBOL_NAME(ret_from_exception)
 4:
-	movel	%d1,SYMBOL_NAME(intr_count)
+	movel	%d1,SYMBOL_NAME(local_irq_count)
 	RESTORE_ALL
 
 
@@ -339,8 +354,10 @@
 	/* save sr */
 	movew	%sr,%a0@(LTSS_SR)
 
+#if 0
 	/* disable interrupts */
 	oriw	#0x0700,%sr
+#endif
 
 	/* save fs (sfc,%dfc) (may be pointing to kernel memory) */
 	movec	%sfc,%d0
@@ -361,18 +378,18 @@
 	fsave	%a0@(LTSS_FPCTXT+27*4)
 
 #if defined(CONFIG_M68060)
-#if !defined(CONFIG_M68060_ONLY)
+#if !defined(CPU_M68060_ONLY)
 	btst	#3,SYMBOL_NAME(m68k_cputype)+3
 	beqs	1f
 #endif
 	/* The 060 FPU keeps status in bits 15-8 of the first longword */
 	tstb	%a0@(LTSS_FPCTXT+27*4+2)
 	jeq	3f
-#if !defined(CONFIG_M68060_ONLY)
+#if !defined(CPU_M68060_ONLY)
 	jra	2f
 #endif
 #endif /* CONFIG_M68060 */
-#if !defined(CONFIG_M68060_ONLY)
+#if !defined(CPU_M68060_ONLY)
 1:	tstb	%a0@(LTSS_FPCTXT+27*4)
 	jeq	3f
 #endif
@@ -388,12 +405,12 @@
 	tstb	%d2
 	jne	4f
 
-#if defined(CONFIG_M68020_OR_M68030) && defined(CONFIG_M68040_OR_M68060)
+#if defined(CPU_M68020_OR_M68030) && defined(CPU_M68040_OR_M68060)
 	/* 68040 or 68060 ? */
 	tstl	SYMBOL_NAME(m68k_is040or060)
 	bnes	1f
 #endif
-#if defined(CONFIG_M68020_OR_M68030)
+#if defined(CPU_M68020_OR_M68030)
 	/*
 	 * switch address space
 	 */
@@ -407,11 +424,11 @@
 	pmove	%a1@(LTSS_CRP),%crp
 #endif
 
-#if defined(CONFIG_M68020_OR_M68030) && defined(CONFIG_M68040_OR_M68060)
+#if defined(CPU_M68020_OR_M68030) && defined(CPU_M68040_OR_M68060)
 	jra	2f	/* skip m68040 stuff */
 1:
 #endif
-#if defined(CONFIG_M68040_OR_M68060)
+#if defined(CPU_M68040_OR_M68060)
 	/*
 	 * switch address space
 	 */
@@ -434,24 +451,24 @@
 	movec	%d0,%cacr
 #endif /* CONFIG_M68060 */
 	.chip	68k
-#endif /* CONFIG_M68040_OR_M68060 */
+#endif /* CPU_M68040_OR_M68060 */
 2:
 4:
 	/* restore floating point context */
 
 #if defined(CONFIG_M68060)
-#if !defined(CONFIG_M68060_ONLY)
+#if !defined(CPU_M68060_ONLY)
 	btst	#3,SYMBOL_NAME(m68k_cputype)+3
 	beqs	1f
 #endif
 	/* The 060 FPU keeps status in bits 15-8 of the first longword */
 	tstb	%a1@(LTSS_FPCTXT+27*4+2)
 	jeq	3f
-#if !defined(CONFIG_M68060_ONLY)
+#if !defined(CPU_M68060_ONLY)
 	jra	2f
 #endif
 #endif /* CONFIG_M68060 */
-#if !defined(CONFIG_M68060_ONLY)
+#if !defined(CPU_M68060_ONLY)
 1:	tstb	%a1@(LTSS_FPCTXT+27*4)
 	jeq	3f
 #endif	
@@ -647,8 +664,11 @@
 	.long SYMBOL_NAME(sys_nanosleep)
 	.long SYMBOL_NAME(sys_mremap)
 	.long SYMBOL_NAME(sys_setresuid)
-	.long SYMBOL_NAME(sys_getresuid)
+	.long SYMBOL_NAME(sys_getresuid)	/* 165 */
 	.long SYMBOL_NAME(sys_ni_syscall)	/* for vm86 */
+	.long SYMBOL_NAME(sys_query_module)
+	.long SYMBOL_NAME(sys_poll)
+	.long SYMBOL_NAME(sys_nfsservctl)
 	.rept NR_syscalls-(.-SYMBOL_NAME(sys_call_table))/4
 		.long SYMBOL_NAME(sys_ni_syscall)
 	.endr

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov