* [PATCH][v850] Make v850 __delay function handle a loop count of zero
@ 2004-02-06 7:54 Miles Bader
0 siblings, 0 replies; 2+ messages in thread
From: Miles Bader @ 2004-02-06 7:54 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
[In practice, this only seems to occur in odd debugging
situations, but it's quite annoying then.]
diff -ruN -X../cludes linux-2.6.2-uc0/include/asm-v850/delay.h linux-2.6.2-uc0-v850-20040206/include/asm-v850/delay.h
--- linux-2.6.2-uc0/include/asm-v850/delay.h 2002-11-05 11:25:31.000000000 +0900
+++ linux-2.6.2-uc0-v850-20040206/include/asm-v850/delay.h 2004-02-06 14:02:30.000000000 +0900
@@ -2,8 +2,8 @@
* include/asm-v850/delay.h -- Delay routines, using a pre-computed
* "loops_per_second" value
*
- * Copyright (C) 2001 NEC Corporation
- * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ * Copyright (C) 2001,03 NEC Corporation
+ * Copyright (C) 2001,03 Miles Bader <miles@gnu.org>
* Copyright (C) 1994 Hamish Macdonald
*
* This file is subject to the terms and conditions of the GNU General
@@ -18,8 +18,9 @@
extern __inline__ void __delay(unsigned long loops)
{
- __asm__ __volatile__ ("1: add -1, %0; bnz 1b"
- : "=r" (loops) : "0" (loops));
+ if (loops)
+ __asm__ __volatile__ ("1: add -1, %0; bnz 1b"
+ : "=r" (loops) : "0" (loops));
}
/*
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH][v850] Make v850 __delay function handle a loop count of zero
@ 2003-10-10 9:22 Miles Bader
0 siblings, 0 replies; 2+ messages in thread
From: Miles Bader @ 2003-10-10 9:22 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
Linus, please apply.
[In practice, this only seems to occur in odd debugging
situations, but it's quite annoying then.]
diff -ruN -X../cludes linux-2.6.0-test7-moo/include/asm-v850/delay.h linux-2.6.0-test7-moo-v850-20031010/include/asm-v850/delay.h
--- linux-2.6.0-test7-moo/include/asm-v850/delay.h 2002-11-05 11:25:31.000000000 +0900
+++ linux-2.6.0-test7-moo-v850-20031010/include/asm-v850/delay.h 2003-10-10 16:48:23.000000000 +0900
@@ -2,8 +2,8 @@
* include/asm-v850/delay.h -- Delay routines, using a pre-computed
* "loops_per_second" value
*
- * Copyright (C) 2001 NEC Corporation
- * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ * Copyright (C) 2001,03 NEC Corporation
+ * Copyright (C) 2001,03 Miles Bader <miles@gnu.org>
* Copyright (C) 1994 Hamish Macdonald
*
* This file is subject to the terms and conditions of the GNU General
@@ -18,8 +18,9 @@
extern __inline__ void __delay(unsigned long loops)
{
- __asm__ __volatile__ ("1: add -1, %0; bnz 1b"
- : "=r" (loops) : "0" (loops));
+ if (loops)
+ __asm__ __volatile__ ("1: add -1, %0; bnz 1b"
+ : "=r" (loops) : "0" (loops));
}
/*
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-06 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06 7:54 [PATCH][v850] Make v850 __delay function handle a loop count of zero Miles Bader
-- strict thread matches above, loose matches on Subject: below --
2003-10-10 9:22 Miles Bader
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®