[PATCH][2.4.28] gcc34 fastcall mismatch fixes for rwsem-spinlock

From: Mikael Pettersson
Date: Wed Nov 24 2004 - 09:39:51 EST


Kernel 2.4.28 fails to compile with gcc-3.4 when CONFIG_M386=y
because of fastcall mismatches between include/linux/rwsem-spinlock.h
and lib/rwsem-spinlock.c. This patch fixes that.

Signed-off-by: Mikael Pettersson <mikpe@xxxxxxxxx>

lib/rwsem-spinlock.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)

diff -rupN linux-2.4.28/lib/rwsem-spinlock.c linux-2.4.28.gcc34-fastcall-fixes/lib/rwsem-spinlock.c
--- linux-2.4.28/lib/rwsem-spinlock.c 2004-08-08 10:56:31.000000000 +0200
+++ linux-2.4.28.gcc34-fastcall-fixes/lib/rwsem-spinlock.c 2004-11-24 14:41:34.000000000 +0100
@@ -32,7 +32,7 @@ void rwsemtrace(struct rw_semaphore *sem
/*
* initialise the semaphore
*/
-void init_rwsem(struct rw_semaphore *sem)
+void fastcall init_rwsem(struct rw_semaphore *sem)
{
sem->activity = 0;
spin_lock_init(&sem->wait_lock);
@@ -120,7 +120,7 @@ static inline struct rw_semaphore *__rws
/*
* get a read lock on the semaphore
*/
-void __down_read(struct rw_semaphore *sem)
+void fastcall __down_read(struct rw_semaphore *sem)
{
struct rwsem_waiter waiter;
struct task_struct *tsk;
@@ -166,7 +166,7 @@ void __down_read(struct rw_semaphore *se
/*
* trylock for reading -- returns 1 if successful, 0 if contention
*/
-int __down_read_trylock(struct rw_semaphore *sem)
+int fastcall __down_read_trylock(struct rw_semaphore *sem)
{
int ret = 0;
rwsemtrace(sem,"Entering __down_read_trylock");
@@ -189,7 +189,7 @@ int __down_read_trylock(struct rw_semaph
* get a write lock on the semaphore
* - note that we increment the waiting count anyway to indicate an exclusive lock
*/
-void __down_write(struct rw_semaphore *sem)
+void fastcall __down_write(struct rw_semaphore *sem)
{
struct rwsem_waiter waiter;
struct task_struct *tsk;
@@ -235,7 +235,7 @@ void __down_write(struct rw_semaphore *s
/*
* trylock for writing -- returns 1 if successful, 0 if contention
*/
-int __down_write_trylock(struct rw_semaphore *sem)
+int fastcall __down_write_trylock(struct rw_semaphore *sem)
{
int ret = 0;
rwsemtrace(sem,"Entering __down_write_trylock");
@@ -257,7 +257,7 @@ int __down_write_trylock(struct rw_semap
/*
* release a read lock on the semaphore
*/
-void __up_read(struct rw_semaphore *sem)
+void fastcall __up_read(struct rw_semaphore *sem)
{
rwsemtrace(sem,"Entering __up_read");

@@ -274,7 +274,7 @@ void __up_read(struct rw_semaphore *sem)
/*
* release a write lock on the semaphore
*/
-void __up_write(struct rw_semaphore *sem)
+void fastcall __up_write(struct rw_semaphore *sem)
{
rwsemtrace(sem,"Entering __up_write");

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/