From: Tony Luck Date: Thu, 12 Aug 2010 16:14:56 +0000 (-0700) Subject: [IA64] Fix rwsem: RWSEM_WAITING_BIAS must not be unsigned. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b680f0979ff571836f3616dfca727b516bcc5d3d;p=mv-sheeva.git [IA64] Fix rwsem: RWSEM_WAITING_BIAS must not be unsigned. Some nice improvements were made to rwsem in commit: 424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 rwsem: wake queued readers when writer blocks on active read lock but this change overlooked that ia64 had defined RWSEM_WAITING_BIAS as an unsigned value, while the new code required a signed value (as it is in every other architecture). This fix suggested by the original patch author: Michel Lespinasse. Signed-off-by: Tony Luck --- diff --git a/arch/ia64/include/asm/rwsem.h b/arch/ia64/include/asm/rwsem.h index e8762688e8e..215d5454c7d 100644 --- a/arch/ia64/include/asm/rwsem.h +++ b/arch/ia64/include/asm/rwsem.h @@ -40,9 +40,9 @@ struct rw_semaphore { }; #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) -#define RWSEM_ACTIVE_BIAS __IA64_UL_CONST(0x0000000000000001) -#define RWSEM_ACTIVE_MASK __IA64_UL_CONST(0x00000000ffffffff) -#define RWSEM_WAITING_BIAS -__IA64_UL_CONST(0x0000000100000000) +#define RWSEM_ACTIVE_BIAS (1L) +#define RWSEM_ACTIVE_MASK (0xffffffffL) +#define RWSEM_WAITING_BIAS (-0x100000000L) #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)