Skip to content

Commit

Permalink
rwsem: Remove redundant asmregparm annotation
Browse files Browse the repository at this point in the history
Peter Zijlstra pointed out, that the only user of asmregparm (x86) is
compiling the kernel already with -mregparm=3. So the annotation of
the rwsem functions is redundant. Remove it.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: David Howells <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: David Miller <[email protected]>
Cc: Chris Zankel <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Jan 27, 2011
1 parent aac7227 commit d123375
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions include/linux/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ struct rw_semaphore {
#endif
};

extern asmregparm struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
extern asmregparm struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
extern asmregparm struct rw_semaphore *rwsem_wake(struct rw_semaphore *);
extern asmregparm struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *);
extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);

/* Include the arch specific part */
#include <asm/rwsem.h>
Expand Down
10 changes: 4 additions & 6 deletions lib/rwsem.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ rwsem_down_failed_common(struct rw_semaphore *sem,
/*
* wait for the read lock to be granted
*/
asmregparm struct rw_semaphore __sched *
rwsem_down_read_failed(struct rw_semaphore *sem)
struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
{
return rwsem_down_failed_common(sem, RWSEM_WAITING_FOR_READ,
-RWSEM_ACTIVE_READ_BIAS);
Expand All @@ -232,8 +231,7 @@ rwsem_down_read_failed(struct rw_semaphore *sem)
/*
* wait for the write lock to be granted
*/
asmregparm struct rw_semaphore __sched *
rwsem_down_write_failed(struct rw_semaphore *sem)
struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
{
return rwsem_down_failed_common(sem, RWSEM_WAITING_FOR_WRITE,
-RWSEM_ACTIVE_WRITE_BIAS);
Expand All @@ -243,7 +241,7 @@ rwsem_down_write_failed(struct rw_semaphore *sem)
* handle waking up a waiter on the semaphore
* - up_read/up_write has decremented the active part of count if we come here
*/
asmregparm struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
{
unsigned long flags;

Expand All @@ -263,7 +261,7 @@ asmregparm struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
* - caller incremented waiting part of count and discovered it still negative
* - just wake up any readers at the front of the queue
*/
asmregparm struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
{
unsigned long flags;

Expand Down

0 comments on commit d123375

Please sign in to comment.