summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2009-05-31 00:44:31 +0200
committerAndrea Adami <andrea.adami@gmail.com>2009-05-31 01:22:47 +0200
commit2747ae6c34231fdb5efed4b11f064caadd24214e (patch)
tree86189a8f66c45a0e4b359c407616a549f5c208e9 /recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
parentba3644301f86b1badff7ef4117187aee3776adeb (diff)
linux-rp-2.6.24: fix compilation with gcc-4.3
Since some architectures don't support __udivdi3(). Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Cc: john stultz <johnstul@us.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch')
-rw-r--r--recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
new file mode 100644
index 0000000000..9d7020d9f1
--- /dev/null
+++ b/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
@@ -0,0 +1,15 @@
+Index: linux-2.6.24/include/linux/time.h
+===================================================================
+--- a/include/linux/time.h
++++ b/include/linux/time.h
+@@ -172,6 +172,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
+ {
+ ns += a->tv_nsec;
+ while(unlikely(ns >= NSEC_PER_SEC)) {
++ /* The following asm() prevents the compiler from
++ * optimising this loop into a modulo operation. */
++ asm("" : "+r"(ns));
++
+ ns -= NSEC_PER_SEC;
+ a->tv_sec++;
+ }