lkml.org 
[lkml]   [2004]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: md raid oops on 2.4.25/alpha
On Sun, Mar 28, 2004 at 07:30:22PM +0200, Thomas Steudten wrote:
> Looks like the well known bad assembler code with gcc.
> On the alpha you see the problem first in the
> raid1_read_balance() code sequence..

Very likely.

> You should use gcc 3.3.2 better 3.3.3.

Also, here is a hack (originally from Jay Estabrook) which
should work around a bug in older compilers.

Ivan.

--- linux.orig/drivers/md/raid1.c Thu Feb 5 14:11:04 2004
+++ linux/drivers/md/raid1.c Sun Mar 28 22:13:33 2004
@@ -487,6 +487,12 @@ static int raid1_read_balance (raid1_con
goto rb_out;


+#if defined(CONFIG_ALPHA) && ((__GNUC__ < 3) || \
+ ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+ /* Work around a compiler bug in older gcc */
+ new_disk = *(volatile int *)&new_disk;
+#endif
+
/* make sure that disk is operational */
while( !conf->mirrors[new_disk].operational) {
if (new_disk <= 0) new_disk = conf->raid_disks;
@@ -544,6 +550,11 @@ static int raid1_read_balance (raid1_con

/* Find the disk which is closest */

+#if defined(CONFIG_ALPHA) && ((__GNUC__ < 3) || \
+ ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+ /* Work around a compiler bug in older gcc */
+ disk = *(volatile int *)&disk;
+#endif
do {
if (disk <= 0)
disk = conf->raid_disks;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.056 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site