[oe-commits] Dmitry Eremin-Solenikov : linux-mainstone: fix building with current gcc

git version control git at git.openembedded.org
Sun Jul 12 21:32:43 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: bd48453a5e2a9361b63c32a68642fea2857017d5
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=bd48453a5e2a9361b63c32a68642fea2857017d5

Author: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Date:   Mon Jul  6 15:31:56 2009 +0400

linux-mainstone: fix building with current gcc

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>

---

 ...vent-the-loop-in-timespec_add_ns-from-bei.patch |   15 +++++++++++++++
 recipes/linux/linux-mainstone_2.6.25.bb            |    3 ++-
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/recipes/linux/linux-mainstone/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/linux-mainstone/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
new file mode 100644
index 0000000..9d7020d
--- /dev/null
+++ b/recipes/linux/linux-mainstone/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++;
+	}
diff --git a/recipes/linux/linux-mainstone_2.6.25.bb b/recipes/linux/linux-mainstone_2.6.25.bb
index d9599ef..f2d972d 100644
--- a/recipes/linux/linux-mainstone_2.6.25.bb
+++ b/recipes/linux/linux-mainstone_2.6.25.bb
@@ -3,11 +3,12 @@ require linux.inc
 SECTION = "kernel"
 DESCRIPTION = "Linux kernel for the Mainstone (PXA270 ref design)"
 LICENSE = "GPL"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
            ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/v2.6.25/patch-2.6.25-rc4.bz2;patch=1 \
            file://mainstone-keypad.patch;patch=1 \
+	   file://0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch;patch=1 \
            file://defconfig"
 
 S = "${WORKDIR}/linux-2.6.24"





More information about the Openembedded-commits mailing list