Re: [Ext2-devel] [PATCH 1/2] ext2/3: Support 2^32-1 blocks(Kernel)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In-Reply-To: <[email protected]>

On Sat, 25 Mar 2006 22:01:15 -0500, Theodore Ts'o wrote:

> Fix the i386 bitmap operations so they are 32-bit clean
...
> --- a/lib/ext2fs/bitops.h     Sat Mar 25 01:42:02 2006 -0500
> +++ b/lib/ext2fs/bitops.h     Sat Mar 25 13:42:45 2006 -0500
...
> @@ -155,9 +179,10 @@
>  {
>       int oldbit;
>  
> +     addr = (void *) (((unsigned char *) addr) + (nr >> 3));
>       __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
>               :"=r" (oldbit),"=m" (EXT2FS_ADDR)
                                ^
  This should be "+" because that data is both read and written
by the assembler instruction.

> -             :"r" (nr));
> +             :"r" (nr & 7));
>       return oldbit;
>  }
>  
> @@ -165,9 +190,10 @@
>  {
>       int oldbit;
>  
> +     addr = (void *) (((unsigned char *) addr) + (nr >> 3));
>       __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
>               :"=r" (oldbit),"=m" (EXT2FS_ADDR)
                                ^
  Same here.

> -             :"r" (nr));
> +             :"r" (nr & 7));
>       return oldbit;
>  }
 
See include/asm-i386/bitops.h where that has already been done (it's still
wrong, but less so than before.)

-- 
Chuck
"Penguins don't come from next door, they come from the Antarctic!"

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux