Skip to content

Commit

Permalink
[IA64] Fix rwsem: RWSEM_WAITING_BIAS must not be unsigned.
Browse files Browse the repository at this point in the history
Some nice improvements were made to rwsem in commit:

 424acaa
 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 <tony.luck@intel.com>
  • Loading branch information
Tony Luck committed Aug 12, 2010
1 parent 5af568c commit b680f09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/ia64/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b680f09

Please sign in to comment.