linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* 4xx - a question and a patch
@ 2001-08-30  7:52 David Gibson
  2001-08-30  8:54 ` HHL 2.0 Journeyman and SuSE Linux Steven Scholz
  2001-09-04 19:50 ` 4xx - a question and a patch Dan Malek
  0 siblings, 2 replies; 10+ messages in thread
From: David Gibson @ 2001-08-30  7:52 UTC (permalink / raw)
  To: linuxppc-embedded


First the question: is there a good reason that set_dec() is a no-op
on 4xx, rather than setting the PIT?  It's not a perfect approximation
to the decrementer, but as far as I can tell it should be close enough
for the next_dec code from arch/ppc/kernel/time.c to work properly.

Second a patch - the below adds floating point emulation to the 4xx.
With this patch I've been able to boot a Walnut to a shell.  Of
course, anything I try to run from the shell dies horribly...

diff -urN ../linuxppc_2_4_devel/arch/ppc/kernel/traps.c linux-bungo/arch/ppc/kernel/traps.c
--- ../linuxppc_2_4_devel/arch/ppc/kernel/traps.c	Wed Aug 29 10:41:56 2001
+++ linux-bungo/arch/ppc/kernel/traps.c	Thu Aug 30 17:02:36 2001
@@ -1,5 +1,5 @@
 /*
- * BK Id: SCCS/s.traps.c 1.23 08/29/01 08:57:35 paulus
+ * BK Id: %F% %I% %G% %U% %#%
  */
 /*
  *  linux/arch/ppc/kernel/traps.c
@@ -265,7 +265,12 @@
 #endif
 		_exception(SIGTRAP, regs);
 	} else {
+#ifdef CONFIG_MATH_EMULATION
+		if (do_mathemu(regs))
+			_exception(SIGILL, regs);
+#else
 		_exception(SIGILL, regs);
+#endif
 	}
 #else
 	if (regs->msr & 0x100000) {


--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-09-06  1:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-30  7:52 4xx - a question and a patch David Gibson
2001-08-30  8:54 ` HHL 2.0 Journeyman and SuSE Linux Steven Scholz
2001-08-30 16:21   ` Tom Rini
2001-08-31  7:48     ` Steven Scholz
2001-09-04 19:50 ` 4xx - a question and a patch Dan Malek
2001-09-05  1:04   ` David Gibson
2001-09-05  4:18     ` Dan Malek
2001-09-05  4:41       ` David Gibson
2001-09-05 15:34         ` Dan Malek
2001-09-06  1:06           ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).