Re: CVS Update@xxxxxxxxxxxxxx: linux

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

 






ralf@xxxxxxxxxxxxxx wrote:

CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@xxxxxxxxxxxxxxxxxx	05/01/08 18:00:18

Modified files:
include/asm-mips: bitops.h


Log message:
	Fix int vs. long bugs breaking the non-ll/sc case on 64-bit.

diff -urN linux/include/asm-mips/bitops.h linux/include/asm-mips/bitops.h
--- linux/include/asm-mips/bitops.h	2004/10/12 01:45:51	1.55
+++ linux/include/asm-mips/bitops.h	2005/01/08 18:00:18	1.56
@@ -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);
@@ -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
diff -U5 -r1.56 bitops.h
--- include/asm/bitops.h        8 Jan 2005 18:00:18 -0000       1.56
+++ include/asm/bitops.h        8 Jan 2005 20:21:59 -0000
@@ -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);




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux