diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2014-04-06 16:42:49 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-30 15:01:08 -0400 |
commit | e496453d3e15ae3e153a03116cb6070e00ec63ee (patch) | |
tree | 8668bb8bdeee94b9db32246eb7729bffd7301d8e /arch/mips | |
parent | 06947aaaf9bf7da0b29e211ee1a44f3ca91c08fa (diff) |
MIPS: __delay ABI-dependent subtraction simplification
This small update to the previous fix to __delay removes a conditional
around the ABI-dependent subtraction operation within an inline asm in
favor to the standard <asm/asm.h> LONG_SUBU macro. No change in code
produced.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6703/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/lib/delay.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 705cfb7c1a74..21d27c6819a2 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
@@ -11,7 +11,9 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/param.h> | 12 | #include <linux/param.h> |
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/stringify.h> | ||
14 | 15 | ||
16 | #include <asm/asm.h> | ||
15 | #include <asm/compiler.h> | 17 | #include <asm/compiler.h> |
16 | #include <asm/war.h> | 18 | #include <asm/war.h> |
17 | 19 | ||
@@ -27,11 +29,7 @@ void __delay(unsigned long loops) | |||
27 | " .set noreorder \n" | 29 | " .set noreorder \n" |
28 | " .align 3 \n" | 30 | " .align 3 \n" |
29 | "1: bnez %0, 1b \n" | 31 | "1: bnez %0, 1b \n" |
30 | #if BITS_PER_LONG == 32 | 32 | " " __stringify(LONG_SUBU) " %0, %1 \n" |
31 | " subu %0, %1 \n" | ||
32 | #else | ||
33 | " dsubu %0, %1 \n" | ||
34 | #endif | ||
35 | " .set reorder \n" | 33 | " .set reorder \n" |
36 | : "=r" (loops) | 34 | : "=r" (loops) |
37 | : GCC_DADDI_IMM_ASM() (1), "0" (loops)); | 35 | : GCC_DADDI_IMM_ASM() (1), "0" (loops)); |