diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:00 -0500 |
commit | d50efc6c40620b2e11648cac64ebf4a824e40382 (patch) | |
tree | daf951117c86f2d4875216eee9e708a0c01c9e4b /include/asm-x86 | |
parent | 3a556b26a2718e48aa2b6ce06ea4875ddcd0778e (diff) |
x86: fix UML and -regparm=3
introduce the "asmregparm" calling convention: for functions
implemented in assembly with a fixed regparm input parameters
calling convention.
mark the semaphore and rwsem slowpath functions with that.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/linkage.h | 5 | ||||
-rw-r--r-- | include/asm-x86/rwsem.h | 12 | ||||
-rw-r--r-- | include/asm-x86/semaphore_32.h | 8 |
3 files changed, 17 insertions, 8 deletions
diff --git a/include/asm-x86/linkage.h b/include/asm-x86/linkage.h index 5a4c95905420..31739c7d66a9 100644 --- a/include/asm-x86/linkage.h +++ b/include/asm-x86/linkage.h | |||
@@ -9,6 +9,11 @@ | |||
9 | #ifdef CONFIG_X86_32 | 9 | #ifdef CONFIG_X86_32 |
10 | #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) | 10 | #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) |
11 | #define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret)) | 11 | #define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret)) |
12 | /* | ||
13 | * For 32-bit UML - mark functions implemented in assembly that use | ||
14 | * regparm input parameters: | ||
15 | */ | ||
16 | #define asmregparm __attribute__((regparm(3))) | ||
12 | #endif | 17 | #endif |
13 | 18 | ||
14 | #ifdef CONFIG_X86_ALIGNMENT_16 | 19 | #ifdef CONFIG_X86_ALIGNMENT_16 |
diff --git a/include/asm-x86/rwsem.h b/include/asm-x86/rwsem.h index a7e7e14cb430..520a379f4b80 100644 --- a/include/asm-x86/rwsem.h +++ b/include/asm-x86/rwsem.h | |||
@@ -44,10 +44,14 @@ | |||
44 | 44 | ||
45 | struct rwsem_waiter; | 45 | struct rwsem_waiter; |
46 | 46 | ||
47 | extern struct rw_semaphore *FASTCALL(rwsem_down_read_failed(struct rw_semaphore *sem)); | 47 | extern asmregparm struct rw_semaphore * |
48 | extern struct rw_semaphore *FASTCALL(rwsem_down_write_failed(struct rw_semaphore *sem)); | 48 | rwsem_down_read_failed(struct rw_semaphore *sem); |
49 | extern struct rw_semaphore *FASTCALL(rwsem_wake(struct rw_semaphore *)); | 49 | extern asmregparm struct rw_semaphore * |
50 | extern struct rw_semaphore *FASTCALL(rwsem_downgrade_wake(struct rw_semaphore *sem)); | 50 | rwsem_down_write_failed(struct rw_semaphore *sem); |
51 | extern asmregparm struct rw_semaphore * | ||
52 | rwsem_wake(struct rw_semaphore *); | ||
53 | extern asmregparm struct rw_semaphore * | ||
54 | rwsem_downgrade_wake(struct rw_semaphore *sem); | ||
51 | 55 | ||
52 | /* | 56 | /* |
53 | * the semaphore definition | 57 | * the semaphore definition |
diff --git a/include/asm-x86/semaphore_32.h b/include/asm-x86/semaphore_32.h index cc826e85323f..ac96d3804d0c 100644 --- a/include/asm-x86/semaphore_32.h +++ b/include/asm-x86/semaphore_32.h | |||
@@ -83,10 +83,10 @@ static inline void init_MUTEX_LOCKED (struct semaphore *sem) | |||
83 | sema_init(sem, 0); | 83 | sema_init(sem, 0); |
84 | } | 84 | } |
85 | 85 | ||
86 | void __down_failed(void /* special register calling convention */); | 86 | extern asmregparm void __down_failed(atomic_t *count_ptr); |
87 | int __down_failed_interruptible(void /* params in registers */); | 87 | extern asmregparm int __down_failed_interruptible(atomic_t *count_ptr); |
88 | int __down_failed_trylock(void /* params in registers */); | 88 | extern asmregparm int __down_failed_trylock(atomic_t *count_ptr); |
89 | void __up_wakeup(void /* special register calling convention */); | 89 | extern asmregparm void __up_wakeup(atomic_t *count_ptr); |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * This is ugly, but we want the default case to fall through. | 92 | * This is ugly, but we want the default case to fall through. |