Re: Hang when mounting XFS root in 2.6.0 tests on x86-64

From: Chris Meadors
Date: Fri Aug 22 2003 - 14:53:44 EST


On Fri, 2003-08-22 at 05:26, Andi Kleen wrote:

> First at least the comment on top of xfs_lowbit64() is not correct.
> ffs() only handles an 32bit argument, not 64bit. Hope that isn't a problem.
>
> Hmm, one difference is that the x86-64 ffs will return 32 on zero, while
> i386 returns -1.
>
> Does this patch fix it?
>
> --- linux-2.6.0test3-amd64/include/asm-x86_64/bitops.h-o 2003-07-11 13:34:21.000000000 +0200
> +++ linux-2.6.0test3-amd64/include/asm-x86_64/bitops.h 2003-08-22 11:17:53.000000000 +0200
> @@ -466,7 +466,7 @@
>
> __asm__("bsfl %1,%0\n\t"
> "cmovzl %2,%0"
> - : "=r" (r) : "g" (x), "r" (32));
> + : "=r" (r) : "g" (x), "r" (-1));
> return r+1;
> }

Yes, that fixed it. Thanks much.

--
Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/