Thread (1 message) 1 message, 1 author, 2002-08-31

Re: OOPS: ext3/sparc badness

From: David S. Miller <hidden>
Date: 2002-08-31 00:18:12

   From: Andrew Beresford [off-list ref]
   Date: Tue, 21 May 2002 09:38:05 +0100

   On Tue, May 21, 2002 at 01:18:58AM -0700, David S. Miller wrote:
   > I don't think so... but please repost the link as I've deleted all of
   > your emails.
   
   The link is;
   
   http://marc.theaimsgroup.com/?l=linux-raid&m=101981888804890&w=2

To recap, the compiler used to build sparc64 kernels miscompiles
drivers/md/raid1.c:raid1_read_balance()

The following appears to be a good workaround for this
bug, Neil could you put this into your tree and would you
mind if I sent this to Marcelo for 2.4.20-preX?
--- drivers/md/raid1.c.~1~	Fri Aug 30 17:03:02 2002
+++ drivers/md/raid1.c	Fri Aug 30 17:17:46 2002
@@ -23,6 +23,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/raid/raid1.h>
 #include <asm/atomic.h>
@@ -522,6 +523,10 @@
 	if (conf->sect_count >= conf->mirrors[new_disk].sect_limit) {
 		conf->sect_count = 0;
 
+#if defined(CONFIG_SPARC64) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 92)
+		/* Work around a compiler bug in egcs-2.92.11 19980921 */
+		new_disk = *(volatile int *)&new_disk;
+#endif
 		do {
 			if (new_disk<=0)
 				new_disk = conf->raid_disks;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help