linux 2.6.23: added time.h.patch to make it build for ARM
authorMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Wed, 21 Oct 2009 10:29:35 +0000 (12:29 +0200)
committerMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Mon, 14 Dec 2009 10:34:59 +0000 (11:34 +0100)
recipes/linux/linux-2.6.23/time.h.patch [new file with mode: 0644]
recipes/linux/linux_2.6.23.bb

diff --git a/recipes/linux/linux-2.6.23/time.h.patch b/recipes/linux/linux-2.6.23/time.h.patch
new file mode 100644 (file)
index 0000000..fd22f3a
--- /dev/null
@@ -0,0 +1,25 @@
+....since some architectures don't support __udivdi3() (and
+ we don't want to use that, anyway).
+ Signed-off-by: Segher Boessenkool 
+ ---
+ include/linux/time.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+
+Index: linux-2.6.24/include/linux/time.h
+===================================================================
+--- linux-2.6.24.orig/include/linux/time.h     2008-06-23 11:17:09.021841180 +0200
++++ linux-2.6.24/include/linux/time.h  2008-06-23 11:18:34.445167140 +0200
+@@ -173,6 +173,11 @@
+ {
+       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++;
+       }
index 1485444..69cdb57 100644 (file)
@@ -23,6 +23,8 @@ SRC_URI += "file://sched-cfs-v2.6.23.12-v24.1.patch;patch=1"
 # Add support for squashfs-lzma (a highly compressed read-only filesystem)
 SRC_URI += "http://kamikaze.waninkoko.info/patches/2.6.23/klight1/broken-out/squashfs-lzma-2.6.23.patch;patch=1"
 
+SRC_URI += "file://time.h.patch;patch=1"
+
 # The Atmel patch doesn't apply against 2.6.23.12  :( 
 SRC_URI_avr32 = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
                  file://defconfig \