CVS [email protected]: linux
Quoted 26 lines · [email protected] wrote:
CVSROOT:
/home/cvs
Module name: linux
Changes by: [email protected] 05/01/08 18:00:18Modified files:
include/asm-mips:bitops.hLog message:
Fix int vs. long bugs breaking the non-ll/sc case on 64-bit.diff -urN
linux/include/asm-mips/bitops.hlinux/include/asm-mips/bitops.hinclude/asm-mips/bitops.h +1
-1@@ -92,7 +92,7 @@ __bi_flags; a += nr >>SZLONG_LOG ; - mask =1 << (nr &SZLONG_MASK ); + mask =1UL << (nr &SZLONG_MASK );__bi_local_irq_save (flags); *a |= mask;__bi_local_irq_restore (flags);
include/asm-mips/bitops.h line 391
Quoted 8 lines
include/asm-mips/bitops.h +1
-1@@ -385,7 +385,7 @@ __bi_flags; a += nr >>SZLONG_LOG ; - mask =1 << (nr &SZLONG_MASK ); + mask =1UL << (nr &SZLONG_MASK );__bi_local_irq_save (flags); retval = (mask & *a) !=0 ; *a &= ~mask;
Any reason why same change wasn't applied to rest of bitops functions?
Index: include/asm/bitops.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/bitops.h,v retrieving revision 1.56
asm/bitops.h 8 Jan 2005 20:21:59 -0000 renamed from asm/bitops.h 8 Jan 2005 18:00:18 -0000 1.56 +1 -1
@@ -150,11 +150,11 @@ volatile unsigned long *a = addr; unsigned long mask; __bi_flags; a += nr >> SZLONG_LOG; - mask = 1 << (nr & SZLONG_MASK); + mask = 1UL << (nr & SZLONG_MASK); __bi_local_irq_save(flags); *a &= ~mask; __bi_local_irq_restore(flags); }
}
@@ -212,11 +212,11 @@
volatile unsigned long *a = addr;
unsigned long mask;
__bi_flags;
a += nr >> SZLONG_LOG;
- mask = 1 << (nr & SZLONG_MASK);
+ mask = 1UL << (nr & SZLONG_MASK);
__bi_local_irq_save(flags);
*a ^= mask;
__bi_local_irq_restore(flags);
}
}
@@ -291,11 +291,11 @@
unsigned long mask;
int retval;
__bi_flags;
a += nr >> SZLONG_LOG;
- mask = 1 << (nr & SZLONG_MASK);
+ mask = 1UL << (nr & SZLONG_MASK);
__bi_local_irq_save(flags);
retval = (mask & *a) != 0;
*a |= mask;
__bi_local_irq_restore(flags);@@ -318,11 +318,11 @@
volatile unsigned long *a = addr;
unsigned long mask;
int retval;
a += nr >> SZLONG_LOG;
- mask = 1 << (nr & SZLONG_MASK);
+ mask = 1UL << (nr & SZLONG_MASK);
retval = (mask & *a) != 0;
*a |= mask;
return retval;
}
@@ -472,11 +472,11 @@
volatile unsigned long *a = addr;
unsigned long mask, retval;
__bi_flags;
a += nr >> SZLONG_LOG;
- mask = 1 << (nr & SZLONG_MASK);
+ mask = 1UL << (nr & SZLONG_MASK);
__bi_local_irq_save(flags);
retval = (mask & *a) != 0;
*a ^= mask;
__bi_local_irq_restore(flags);Quoted 5 lines · Ilya A. Volynets-Evenbakh
Quoted 5 lines
Modified files:
include/asm-mips:bitops.hLog message:
Fix int vs. long bugs breaking the non-ll/sc case on 64-bit.
Argh. One of these days ;)
Ralf