All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sc
@ 1998-08-19 20:03 Ulf Carlsson
  1998-08-19 20:16 ` Alex deVries
  0 siblings, 1 reply; 4+ messages in thread
From: Ulf Carlsson @ 1998-08-19 20:03 UTC (permalink / raw)
  To: linux

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

Hi,

Here's the patch for SC, still some BUS Errors when using the network device
(bootp doesn't work), sometimes even without obvious reason.

- Ulf

[-- Attachment #2: /home/grim/sc-patch.diff --]
[-- Type: text/plain, Size: 1695 bytes --]

--- head.S	Thu Jul  9 19:51:48 1998
+++ sgi-lin/linux/arch/mips/kernel/head.S	Tue Aug 18 22:34:35 1998
@@ -5,6 +5,7 @@
  *  Copyright (C) 1996, 1997, 1998 Ralf Baechle
  *  Modified for DECStation and hence R3000 support by Paul M. Antoine
  *  Further modifications by David S. Miller
+ *  Modified for R4000SC/R44000SC support by Ulf Carlsson
  *
  *  Head.S contains the MIPS exception handler and startup code.
  */
@@ -22,6 +23,7 @@
 #include <asm/stackframe.h>
 #include <asm/bootinfo.h>
 #include <asm/cpu.h>
+#include <asm/cacheops.h>
 
 	.text
 	/*
@@ -315,16 +317,46 @@
 	NESTED(except_vec3_r4000, 0, sp)
 	.set	noat
 	mfc0	k1, CP0_CAUSE
-
-	/* XXX Have to check for VCE's _before_ we do a load or store. */
-
-	la	k0, exception_handlers
 	andi	k1, k1, 0x7c
+	li	k0, 31<<2
+	beq	k1, k0, handle_vced
+	 li	k0, 14<<2
+	beq	k1, k0, handle_vcei
+	 la	k0, exception_handlers
 	addu	k0, k0, k1
 	lw	k0, (k0)
 	nop
 	jr	k0
 	 nop
+
+/*
+ * Big shit, we now may have two dirty primary cache lines for the same
+ * physical address.  We can savely invalidate the line pointed to by
+ * c0_badvaddr because after return from this exception handler the load /
+ * store will be re-executed.
+ *
+ * XXX should bitch on console.
+ */
+handle_vced:
+	mfc0	k0, CP0_BADVADDR
+	mtc0	zero, CP0_TAGLO
+	nop;nop
+	cache	Index_Store_Tag_D,(k0)
+	nop;nop
+	cache	Hit_Writeback_Inv_SD,(k0)
+	eret
+
+/*
+ * VCEI is simpler and should never happen unless userland is doing something
+ * really stupid.  It's actually worth a SIGFRY.
+ *
+ * XXX should bitch on console.
+ */
+handle_vcei:
+	mfc0	k0, CP0_BADVADDR
+	cache	Hit_Invalidate_SD,(k0)		# also cleans pi
+	eret
+
 	END(except_vec3_r4000)
 	.set	at
 

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

* Re: [PATCH] sc
  1998-08-19 20:03 [PATCH] sc Ulf Carlsson
@ 1998-08-19 20:16 ` Alex deVries
  1998-08-20  0:07   ` ralf
  0 siblings, 1 reply; 4+ messages in thread
From: Alex deVries @ 1998-08-19 20:16 UTC (permalink / raw)
  To: Ulf Carlsson; +Cc: linux


If there's no objections from the MIPS kernel hackers here, I'll apply
this to the CVS.

- Alex

-- 
Alex deVries, puffin on LinuxNet.
http://www.engsoc.carleton.ca/~adevries/ .



On Wed, 19 Aug 1998, Ulf Carlsson wrote:

> Date: Wed, 19 Aug 1998 22:03:05 +0200 (CEST)
> From: Ulf Carlsson <grim@zigzegv.ml.org>
> To: linux@cthulhu.engr.sgi.com
> Subject: [PATCH] sc
> 
> Hi,
> 
> Here's the patch for SC, still some BUS Errors when using the network device
> (bootp doesn't work), sometimes even without obvious reason.
> 
> - Ulf
> 

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

* Re: [PATCH] sc
  1998-08-19 20:16 ` Alex deVries
@ 1998-08-20  0:07   ` ralf
  1998-08-20  4:55     ` Ulf Carlsson
  0 siblings, 1 reply; 4+ messages in thread
From: ralf @ 1998-08-20  0:07 UTC (permalink / raw)
  To: Alex deVries, Ulf Carlsson; +Cc: linux

On Wed, Aug 19, 1998 at 04:16:52PM -0400, Alex deVries wrote:

> If there's no objections from the MIPS kernel hackers here, I'll apply
> this to the CVS.

Don't, it wont work for non-SC CPUs.

  Ralf

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

* Re: [PATCH] sc
  1998-08-20  0:07   ` ralf
@ 1998-08-20  4:55     ` Ulf Carlsson
  0 siblings, 0 replies; 4+ messages in thread
From: Ulf Carlsson @ 1998-08-20  4:55 UTC (permalink / raw)
  To: ralf; +Cc: adevries, grim, linux


Oups, I'll fix that later today.

> Don't, it wont work for non-SC CPUs.

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

end of thread, other threads:[~1998-08-20  4:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-19 20:03 [PATCH] sc Ulf Carlsson
1998-08-19 20:16 ` Alex deVries
1998-08-20  0:07   ` ralf
1998-08-20  4:55     ` Ulf Carlsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.