diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-05-27 15:38:08 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-27 15:38:08 (GMT) |
commit | a58bdba749b36069ec372da9c9fd16017b6c0b47 (patch) | |
tree | 95c79448427425d1c05712a7c7fb98ed42e41539 /arch/mips/lib/delay.c | |
parent | 00a6d7b6762c27d441e9ac8faff36384bc0fc180 (diff) | |
parent | 51fa31d462f32e1ffdf957802dcab1dc20d2f243 (diff) | |
download | linux-a58bdba749b36069ec372da9c9fd16017b6c0b47.tar.xz |
Merge branch 'topic/firewire' into for-next
This is a merge of big firewire audio stack updates by Takashi Sakamoto.
Diffstat (limited to 'arch/mips/lib/delay.c')
-rw-r--r-- | arch/mips/lib/delay.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 44713af..705cfb7 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c @@ -6,7 +6,7 @@ * Copyright (C) 1994 by Waldorf Electronics * Copyright (C) 1995 - 2000, 01, 03 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. - * Copyright (C) 2007 Maciej W. Rozycki + * Copyright (C) 2007, 2014 Maciej W. Rozycki */ #include <linux/module.h> #include <linux/param.h> @@ -15,6 +15,12 @@ #include <asm/compiler.h> #include <asm/war.h> +#ifndef CONFIG_CPU_DADDI_WORKAROUNDS +#define GCC_DADDI_IMM_ASM() "I" +#else +#define GCC_DADDI_IMM_ASM() "r" +#endif + void __delay(unsigned long loops) { __asm__ __volatile__ ( @@ -22,13 +28,13 @@ void __delay(unsigned long loops) " .align 3 \n" "1: bnez %0, 1b \n" #if BITS_PER_LONG == 32 - " subu %0, 1 \n" + " subu %0, %1 \n" #else - " dsubu %0, 1 \n" + " dsubu %0, %1 \n" #endif " .set reorder \n" : "=r" (loops) - : "0" (loops)); + : GCC_DADDI_IMM_ASM() (1), "0" (loops)); } EXPORT_SYMBOL(__delay); |