]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- buildfix for kernel 2.6.17 with new gcc (it is needed on ti,
authorpawelz <pawelz@pld-linux.org>
Sun, 7 Dec 2008 02:58:00 +0000 (02:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  but not on ac)

Changed files:
    kernel-2.6.17-sumversion-buildfix.patch -> 1.1
    kernel-2.6.17-thread_info-buildfix.patch -> 1.1

kernel-2.6.17-sumversion-buildfix.patch [new file with mode: 0644]
kernel-2.6.17-thread_info-buildfix.patch [new file with mode: 0644]

diff --git a/kernel-2.6.17-sumversion-buildfix.patch b/kernel-2.6.17-sumversion-buildfix.patch
new file mode 100644 (file)
index 0000000..c72e81f
--- /dev/null
@@ -0,0 +1,51 @@
+From: Akio Takebe <takebe_akio <at> jp.fujitsu.com>
+Subject: [Patch] fix compilation
+Newsgroups: gmane.comp.emulators.xen.devel
+Date: 2008-06-02 03:09:10 GMT (26 weeks, 5 days, 19 hours and 43 minutes ago)
+
+Hi,
+
+I got the following compilation error.
+This patch fix the error, I think it is needed for xen-testing tree.
+
+/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c: In function 
+'get_src_version':
+/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error: 
+'PATH_MAX' undeclared (first use in this function)
+/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error: 
+(Each undeclared identifier is reported only once
+/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error: 
+for each function it appears in.)
+/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: 
+warning: unused variable 'filelist'
+make[7]: *** [scripts/mod/sumversion.o] Error 1
+make[6]: *** [scripts/mod] Error 2
+make[5]: *** [scripts] Error 2
+make[4]: *** [modules] Error 2
+make[3]: *** [modules] Error 2
+make[3]: Leaving directory `/root/unstable/xen-unstable.hg/build-linux-2.
+6.18-xen_x86_32'
+make[2]: *** [build] Error 1
+make[2]: Leaving directory `/root/unstable/xen-unstable.hg'
+make[1]: *** [linux-2.6-xen-install] Error 2
+make[1]: Leaving directory `/root/unstable/xen-unstable.hg'
+make: *** [install-kernels] Error 1
+
+Signed-off-by: Akio Takebe <takebe_akio <at> jp.fujitsu.com>
+
+Best Regards,
+
+Akio Takebe
+
+---
+diff -r 557a4a0a5eac scripts/mod/sumversion.c
+--- a/scripts/mod/sumversion.c Fri May 30 19:08:50 2008 +0100
++++ b/scripts/mod/sumversion.c Mon Jun 02 19:47:43 2008 +0900
+@@ -8,6 +8,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include "modpost.h"
++#include <linux/limits.h>
+
+ /*
+  * Stolen form Cryptographic API.
diff --git a/kernel-2.6.17-thread_info-buildfix.patch b/kernel-2.6.17-thread_info-buildfix.patch
new file mode 100644 (file)
index 0000000..97cd275
--- /dev/null
@@ -0,0 +1,45 @@
+
+From: Chuck Ebbert <76306.1226@compuserve.com>
+
+Using C code for current_thread_info() lets the compiler optimize it.
+With gcc 4.0.2, kernel is smaller:
+
+    text           data     bss     dec     hex filename
+ 3645212         555556  312024 4512792  44dc18 2.6.17-rc6-nb-post/vmlinux
+ 3647276         555556  312024 4514856  44e428 2.6.17-rc6-nb/vmlinux
+ -------
+   -2064
+
+Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+---
+
+ include/asm-i386/thread_info.h |   10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff -puN include/asm-i386/thread_info.h~i386-use-c-code-for-current_thread_info include/asm-i386/thread_info.h
+--- a/include/asm-i386/thread_info.h~i386-use-c-code-for-current_thread_info
++++ a/include/asm-i386/thread_info.h
+@@ -83,17 +83,15 @@ struct thread_info {
+ #define init_stack            (init_thread_union.stack)
++/* how to get the current stack pointer from C */
++register unsigned long current_stack_pointer asm("esp") __attribute_used__;
++
+ /* how to get the thread information struct from C */
+ static inline struct thread_info *current_thread_info(void)
+ {
+-      struct thread_info *ti;
+-      __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1)));
+-      return ti;
++      return (struct thread_info *)(current_stack_pointer & ~(THREAD_SIZE - 1));
+ }
+-/* how to get the current stack pointer from C */
+-register unsigned long current_stack_pointer asm("esp") __attribute_used__;
+-
+ /* thread information allocation */
+ #ifdef CONFIG_DEBUG_STACK_USAGE
+ #define alloc_thread_info(tsk)                                        \
+_
This page took 0.364012 seconds and 4 git commands to generate.