summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch')
-rw-r--r--meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch b/meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch
new file mode 100644
index 0000000000..3ff0c07c18
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch
@@ -0,0 +1,48 @@
1From f5b973489beb1a1239dfad53e3ad6e36ff7ee958 Mon Sep 17 00:00:00 2001
2From: Segher Boessenkool <segher@kernel.crashing.org>
3Date: Thu, 9 Oct 2008 21:18:27 +0100
4Subject: [PATCH] fix-gcc-4.3-false-modulo-optimization.patch
5
6I tried to compile the current stable kernel
7(a2ef813d2f439a3e9f377d33a2e5baad098afb7e)
8and get the following errors:
9
10kernel/built-in.o: In function `timespec_add_ns':
11/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174:
12undefined reference to `__aeabi_uldivmod'
13/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179:
14undefined reference to `__aeabi_uldivmod'
15/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174:
16undefined reference to `__aeabi_uldivmod'
17/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179:
18undefined reference to `__aeabi_uldivmod'
19
20applying the following patch solved the problem:
21--------
22Prevent gcc-4.3 form "optimizing" the while loop into a costly modulo operation.
23Patch found at http://lkml.org/lkml/2008/2/22/464.
24
25Reported-by: Sven Rebhan <odinshorse@googlemail.com>
26Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
27---
28 include/linux/time.h | 4 ++++
29 1 files changed, 4 insertions(+), 0 deletions(-)
30
31diff --git a/include/linux/time.h b/include/linux/time.h
32index b04136d..3e8fd9e 100644
33--- a/include/linux/time.h
34+++ b/include/linux/time.h
35@@ -173,6 +173,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
36 {
37 ns += a->tv_nsec;
38 while(unlikely(ns >= NSEC_PER_SEC)) {
39+ /* The following asm() prevents the compiler from
40+ * optimising this loop into a modulo operation. */
41+ asm("" : "+r"(ns));
42+
43 ns -= NSEC_PER_SEC;
44 a->tv_sec++;
45 }
46--
471.5.6.5
48