diff options
author | Khem Raj <raj.khem@gmail.com> | 2008-05-29 00:53:13 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2008-05-29 00:53:13 +0000 |
commit | db7749c30b3890990b48ef9c52b1d479d86966b0 (patch) | |
tree | 439dd8b7d129d3b73838ab908e3d94efc705e463 /packages | |
parent | c04177964071e8662db0b24bbdf167a906356564 (diff) |
Prevent the loop in timespec_add_ns() to be optimised away
Diffstat (limited to 'packages')
-rw-r--r-- | packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch | 20 | ||||
-rw-r--r-- | packages/linux/linux-omap1_2.6.24-omap1.bb | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch b/packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch new file mode 100644 index 0000000000..4aba897b06 --- /dev/null +++ b/packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch @@ -0,0 +1,20 @@ +Backport of this patch here + +http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg270684.html + +Needed for 2.6.24 to compile with gcc 4.3 +Index: linux-2.6.24/include/linux/time.h +=================================================================== +--- linux-2.6.24.orig/include/linux/time.h 2008-05-28 15:39:46.000000000 -0700 ++++ linux-2.6.24/include/linux/time.h 2008-05-28 15:40:48.000000000 -0700 +@@ -173,6 +173,10 @@ + { + 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++; + } diff --git a/packages/linux/linux-omap1_2.6.24-omap1.bb b/packages/linux/linux-omap1_2.6.24-omap1.bb index f5ed1a43f9..2f2076b923 100644 --- a/packages/linux/linux-omap1_2.6.24-omap1.bb +++ b/packages/linux/linux-omap1_2.6.24-omap1.bb @@ -5,6 +5,7 @@ COMPATIBLE_MACHINE = "omap5912osk" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \ http://www.muru.com/linux/omap/patches/patch-2.6.24-omap1.bz2;patch=1 \ file://binutils-buildid-arm.patch;patch=1 \ + file://timespec_add_ns_avoid_udivdi3.patch;patch=1 \ file://defconfig" S = "${WORKDIR}/linux-2.6.24" |