Resent-Date: Thu, 29 Jul 1999 11:23:16 +0200 (MET DST)
Date: Thu, 29 Jul 1999 05:22:57 -0400
From: David Huggins-Daines <dhd@mac.linux-m68k.org>
To: linux-m68k@lists.linux-m68k.org
Subject: head.S vs. CONFIG_FTRACE
Mail-Followup-To: linux-m68k@lists.linux-m68k.org
X-Uname-mrs: Linux 2.2.6 m68k
X-Uptime: 4:56am  up 51 days,  8:55,  1 user,  load average: 0.27, 0.10, 0.08
Resent-From: linux-m68k@phil.uni-sb.de

Hi,

I'm not sure if anyone's noticed this yet, but the 'puts' macros in head.S
don't quite work when ftrace or kgdb are turned on.  This is due to the fact
that __INITDATA is a no-op when those options are set.  On the Mac, at
least, this causes a failure to boot.

Here's the fix I used:

diff -u -r1.10 head.S
--- head.S	1999/07/21 06:09:08	1.10
+++ head.S	1999/07/29 08:52:23
@@ -521,10 +521,18 @@
 
 .macro	puts		string
 #if defined(CONSOLE) || defined(SERIAL_DEBUG)
+/* The __INITDATA stuff is a no-op when ftrace or kgdb are turned on */
+#if defined(CONFIG_FTRACE) || defined(CONFIG_KGDB)
+	bra 1f
+#endif
 	__INITDATA
 .Lstr\@:
 	.string	"\string"
 	__FINIT
+#if defined(CONFIG_FTRACE) || defined(CONFIG_KGDB)
+	.align 2
+1:
+#endif
 	pea	%pc@(.Lstr\@)
 	func_call	puts
 	addql	#4,%sp

-- 
dhd@maclinux.plcom.on.ca (wearing my Linux/m68k+Mac+Debian hat)
  Latest kernels/patches: http://maclinux.plcom.on.ca/pub/

