1 |
Author: dsd |
2 |
Date: 2008-02-24 23:36:34 +0000 (Sun, 24 Feb 2008) |
3 |
New Revision: 1255 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.23/1700_moduleparam.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/2.6.23/0000_README |
9 |
Log: |
10 |
Fix GCC 4.2 compile failure on alpha/ia64/ppc64 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/2.6.23/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/2.6.23/0000_README 2008-02-24 23:29:13 UTC (rev 1254) |
15 |
+++ genpatches-2.6/trunk/2.6.23/0000_README 2008-02-24 23:36:34 UTC (rev 1255) |
16 |
@@ -107,6 +107,10 @@ |
17 |
From: http://bugs.gentoo.org/209460 |
18 |
Desc: Preventative measure against future vmsplice-like security issues |
19 |
|
20 |
+Patch: 1700_moduleparam.patch |
21 |
+From: http://bugs.gentoo.org/187175 |
22 |
+Desc: Fix GCC 4.2 compile failure on alpha/ia64/ppc64 |
23 |
+ |
24 |
Patch: 2200_acpi-concurrent-thermal-checks.patch |
25 |
From: http://bugs.gentoo.org/176615 |
26 |
Desc: Fix stack overflow due to recursive ACPI thermal checks |
27 |
|
28 |
Added: genpatches-2.6/trunk/2.6.23/1700_moduleparam.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/2.6.23/1700_moduleparam.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/2.6.23/1700_moduleparam.patch 2008-02-24 23:36:34 UTC (rev 1255) |
32 |
@@ -0,0 +1,60 @@ |
33 |
+From: Ivan Kokshaysky <ink@×××××××××××××××××.ru> |
34 |
+Date: Wed, 13 Feb 2008 23:03:26 +0000 (-0800) |
35 |
+Subject: moduleparam: fix alpha, ia64 and ppc64 compile failures |
36 |
+X-Git-Tag: v2.6.25-rc2~57 |
37 |
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=91d35dd93e14c34539a8005183ea500f25caad02 |
38 |
+ |
39 |
+moduleparam: fix alpha, ia64 and ppc64 compile failures |
40 |
+ |
41 |
+On alpha, ia64 and ppc64 only relocations to local data can go into |
42 |
+read-only sections. The vast majority of module parameters use the global |
43 |
+generic param_set_*/param_get_* functions, so the 'const' attribute for |
44 |
+struct kernel_param is not only useless, but it also causes compile |
45 |
+failures due to 'section type conflict' in those rare cases where |
46 |
+param_set/get are local functions. |
47 |
+ |
48 |
+This fixes http://bugzilla.kernel.org/show_bug.cgi?id=8964 |
49 |
+ |
50 |
+Signed-off-by: Ivan Kokshaysky <ink@×××××××××××××××××.ru> |
51 |
+Cc: Richard Henderson <rth@×××××××.net> |
52 |
+Cc: "Luck, Tony" <tony.luck@×××××.com> |
53 |
+Cc: Anton Blanchard <anton@×××××.org> |
54 |
+Cc: Paul Mackerras <paulus@×××××.org> |
55 |
+Cc: Adrian Bunk <bunk@××××××.de> |
56 |
+Cc: Kamalesh Babulal <kamalesh@××××××××××××××.com> |
57 |
+Cc: Rusty Russell <rusty@××××××××××××.au> |
58 |
+Signed-off-by: Andrew Morton <akpm@××××××××××××××××.org> |
59 |
+Signed-off-by: Linus Torvalds <torvalds@××××××××××××××××.org> |
60 |
+[dsd@g.o: backport to 2.6.23] |
61 |
+--- |
62 |
+ |
63 |
+Index: linux-2.6.23-gentoo-r4/include/linux/moduleparam.h |
64 |
+=================================================================== |
65 |
+--- linux-2.6.23-gentoo-r4.orig/include/linux/moduleparam.h |
66 |
++++ linux-2.6.23-gentoo-r4/include/linux/moduleparam.h |
67 |
+@@ -58,6 +58,16 @@ struct kparam_array |
68 |
+ void *elem; |
69 |
+ }; |
70 |
+ |
71 |
++/* On alpha, ia64 and ppc64 relocations to global data cannot go into |
72 |
++ read-only sections (which is part of respective UNIX ABI on these |
73 |
++ platforms). So 'const' makes no sense and even causes compile failures |
74 |
++ with some compilers. */ |
75 |
++#if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64) |
76 |
++#define __moduleparam_const |
77 |
++#else |
78 |
++#define __moduleparam_const const |
79 |
++#endif |
80 |
++ |
81 |
+ /* This is the fundamental function for registering boot/module |
82 |
+ parameters. perm sets the visibility in sysfs: 000 means it's |
83 |
+ not there, read bits mean it's readable, write bits mean it's |
84 |
+@@ -67,7 +77,7 @@ struct kparam_array |
85 |
+ static int __param_perm_check_##name __attribute__((unused)) = \ |
86 |
+ BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ |
87 |
+ static char __param_str_##name[] = prefix #name; \ |
88 |
+- static struct kernel_param const __param_##name \ |
89 |
++ static struct kernel_param __moduleparam_const __param_##name \ |
90 |
+ __attribute_used__ \ |
91 |
+ __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ |
92 |
+ = { __param_str_##name, perm, set, get, arg } |
93 |
|
94 |
-- |
95 |
gentoo-commits@l.g.o mailing list |