1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
diff -Naur linux-2.6.0/include/linux/blockgroup_lock.h linux-2.6.0/include/linux.plasmaroo/blockgroup_lock.h
--- linux-2.6.0/include/linux/blockgroup_lock.h 2003-12-18 02:58:16.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/blockgroup_lock.h 2003-12-24 11:54:58.000000000 +0000
@@ -5,7 +5,7 @@
*/
#include <linux/config.h>
-#include <linux/spinlock.h>
+#include <linux/spinlock_wrapper.h>
#include <linux/cache.h>
#ifdef CONFIG_SMP
diff -Naur linux-2.6.0/include/linux/ext2_fs_sb.h linux-2.6.0/include/linux.plasmaroo/ext2_fs_sb.h
--- linux-2.6.0/include/linux/ext2_fs_sb.h 2003-12-18 02:59:35.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/ext2_fs_sb.h 2003-12-24 11:55:01.000000000 +0000
@@ -18,6 +18,7 @@
#include <linux/blockgroup_lock.h>
#include <linux/percpu_counter.h>
+#include <linux/redefine_types.h>
/*
* second extended-fs super-block data in memory
diff -Naur linux-2.6.0/include/linux/fb.h linux-2.6.0/include/linux.plasmaroo/fb.h
--- linux-2.6.0/include/linux/fb.h 2003-12-18 02:58:39.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/fb.h 2003-12-24 11:55:01.000000000 +0000
@@ -2,9 +2,7 @@
#define _LINUX_FB_H
#include <linux/tty.h>
-#include <linux/workqueue.h>
#include <asm/types.h>
-#include <asm/io.h>
/* Definitions of frame buffers */
@@ -331,6 +329,8 @@
#define FB_PIXMAP_IO 4 /* memory is iomapped */
#define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */
+#ifdef __KERNEL__
+
struct fb_pixmap {
__u8 *addr; /* pointer to memory */
__u32 size; /* size of buffer in bytes */
@@ -344,7 +344,9 @@
spinlock_t lock; /* spinlock */
atomic_t count;
};
-#ifdef __KERNEL__
+
+#include <linux/workqueue.h>
+#include <asm/io.h>
#include <linux/fs.h>
#include <linux/init.h>
diff -Naur linux-2.6.0/include/linux/fs.h linux-2.6.0/include/linux.plasmaroo/fs.h
--- linux-2.6.0/include/linux/fs.h 2003-12-18 02:58:29.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/fs.h 2003-12-24 11:54:58.000000000 +0000
@@ -17,7 +17,15 @@
#include <linux/dcache.h>
#include <linux/stat.h>
#include <linux/cache.h>
-#include <linux/radix-tree.h>
+
+/* This should fix any ``sys-fs'' items getting spinlocks.
+ $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/files/linux-headers-2.6.0-appCompat.patch,v 1.5 2003/12/26 11:11:38 plasmaroo Exp $
+*/
+
+#ifdef __KERNEL__
+ #include <linux/radix-tree.h>
+#endif
+
#include <linux/kobject.h>
#include <asm/atomic.h>
diff -Naur linux-2.6.0/include/linux/isdn.h linux-2.6.0/include/linux.plasmaroo/isdn.h
--- linux-2.6.0/include/linux/isdn.h 2003-12-18 02:59:58.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/isdn.h 2003-12-24 11:55:00.000000000 +0000
@@ -14,7 +14,13 @@
#define __ISDN_H__
#include <linux/ioctl.h>
-#include <linux/isdn/fsm.h>
+
+/* This should sort out ``ligtop'' from getting spinlocks.
+ $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/files/linux-headers-2.6.0-appCompat.patch,v 1.5 2003/12/26 11:11:38 plasmaroo Exp $
+*/
+#ifdef __KERNEL__
+ #include <linux/isdn/fsm.h>
+#endif
#ifdef CONFIG_COBALT_MICRO_SERVER
/* Save memory */
diff -Naur linux-2.6.0/include/linux/msdos_fs.h linux-2.6.0/include/linux.plasmaroo/msdos_fs.h
--- linux-2.6.0/include/linux/msdos_fs.h 2003-12-18 02:59:18.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/msdos_fs.h 2003-12-24 11:55:00.000000000 +0000
@@ -4,7 +4,14 @@
/*
* The MS-DOS filesystem constants/structures
*/
-#include <linux/buffer_head.h>
+
+/* This should sort out any problems with ``dosfstools''.
+ $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/files/linux-headers-2.6.0-appCompat.patch,v 1.5 2003/12/26 11:11:38 plasmaroo Exp $
+*/
+#ifdef __KERNEL__
+ #include <linux/buffer_head.h>
+#endif
+
#include <linux/string.h>
#include <asm/byteorder.h>
diff -Naur linux-2.6.0/include/linux/percpu_counter.h linux-2.6.0/include/linux.plasmaroo/percpu_counter.h
--- linux-2.6.0/include/linux/percpu_counter.h 2003-12-18 02:58:56.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/percpu_counter.h 2003-12-24 11:55:00.000000000 +0000
@@ -5,10 +5,13 @@
*/
#include <linux/config.h>
-#include <linux/spinlock.h>
-#include <linux/smp.h>
+#include <linux/spinlock_wrapper.h>
#include <linux/threads.h>
+/* <smp.h> was removed as it brought in spinlocks and other
+ bad things - no functionality is lost as all the necessary
+ SMP data is still available. */
+
#ifdef CONFIG_SMP
struct __percpu_counter {
diff -Naur linux-2.6.0/include/linux/redefine_types.h linux-2.6.0/include/linux.plasmaroo/redefine_types.h
--- linux-2.6.0/include/linux/redefine_types.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.0/include/linux.plasmaroo/redefine_types.h 2003-12-24 11:55:01.000000000 +0000
@@ -0,0 +1,46 @@
+/* This is a short macro to redefine any types which weren't included
+ further down the tree as __KERNEL__ might have been unset.
+
+ $> find $path -name types.h -maxdepth 2 | xargs cat | grep \#ifndef | grep \
+ TYPES | sed 's/ifndef/undef/'
+
+ plasmaroo@gentoo.org - This is an "as-is" Public Domain Item with
+ no warranty of any kind */
+
+#ifndef __KERNEL__
+ #define __KERNEL__
+ #define __KERNEL_WAS_DEFINED__
+#endif
+
+#undef __ASSEMBLY__
+#undef _ALPHA_TYPES_H
+#undef __ASM_ARM_TYPES_H
+#undef _ASM_TYPES_H
+#undef __UM_TYPES_H
+#undef _LINUX_TYPES_H
+#undef __BIT_TYPES_DEFINED__
+#undef _ASM_IA64_TYPES_H
+#undef _S390_TYPES_H
+#undef _PPC_TYPES_H
+#undef __ASM_SH_TYPES_H
+#undef _SPARC64_TYPES_H
+#undef _ASM_TYPES_H
+#undef _SPARC_TYPES_H
+#undef _LINUX_RXRPC_TYPES_H
+#undef _PARISC_TYPES_H
+#undef __ASM_ARM_TYPES_H
+#undef _X86_64_TYPES_H
+#undef _ALPHA_TYPES_H
+#undef _M68K_TYPES_H
+#undef __V850_TYPES_H__
+#undef _ETRAX_TYPES_H
+#undef _M68K_TYPES_H
+#undef _I386_TYPES_H
+#undef _H8300_TYPES_H
+#undef _PPC64_TYPES_H
+
+#include <asm/types.h>
+
+#ifdef __KERNEL_WAS_DEFINED__
+ #undef __KERNEL__
+#endif
diff -Naur linux-2.6.0/include/linux/spinlock_wrapper.h linux-2.6.0/include/linux.plasmaroo/spinlock_wrapper.h
--- linux-2.6.0/include/linux/spinlock_wrapper.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.0/include/linux.plasmaroo/spinlock_wrapper.h 2003-12-24 11:54:57.000000000 +0000
@@ -0,0 +1,26 @@
+#ifndef __LINUX_SPINLOCK_H_WRAPPER
+#define __LINUX_SPINLOCK_H_WRAPPER
+
+#include <linux/preempt.h>
+
+#define SPINLOCK_MAGIC 0x1D244B3C
+typedef struct {
+ unsigned long magic;
+ volatile unsigned long lock;
+ volatile unsigned int babble;
+ const char *module;
+ char *owner;
+ int oline;
+} spinlock_t;
+
+#define spin_lock_init(x) \
+ do { \
+ (x)->magic = SPINLOCK_MAGIC; \
+ (x)->lock = 0; \
+ (x)->babble = 5; \
+ (x)->module = __FILE__; \
+ (x)->owner = NULL; \
+ (x)->oline = 0; \
+ } while (0)
+
+#endif
diff -Naur linux-2.6.0/include/linux/videodev.h linux-2.6.0/include/linux.plasmaroo/videodev.h
--- linux-2.6.0/include/linux/videodev.h 2003-12-18 03:00:03.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/videodev.h 2003-12-24 11:54:59.000000000 +0000
@@ -3,7 +3,13 @@
#include <linux/types.h>
#include <linux/version.h>
-#include <linux/device.h>
+
+/* Should sort out ``DirectFB''.
+ $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/files/linux-headers-2.6.0-appCompat.patch,v 1.5 2003/12/26 11:11:38 plasmaroo Exp $
+*/
+#ifdef __KERNEL__
+ #include <linux/device.h>
+#endif
#define HAVE_V4L2 1
#include <linux/videodev2.h>
diff -Naur linux-2.6.0/include/linux/mod_devicetable.h linux-2.6.0/include/linux.plasmaroo/mod_devicetable.h
--- linux-2.6.0/include/linux/mod_devicetable.h 2003-12-18 02:59:53.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/mod_devicetable.h 2003-12-25 16:00:21.000000000 +0000
@@ -9,8 +9,10 @@
#ifdef __KERNEL__
#include <linux/types.h>
-typedef unsigned long kernel_ulong_t;
+#else
+#include <linux/redefine_types.h>
#endif
+typedef unsigned long kernel_ulong_t;
#define PCI_ANY_ID (~0)
diff -Naur linux-2.6.0/include/linux/compiler-gcc2.h linux-2.6.0/include/linux.plasmaroo/compiler-gcc2.h
--- linux-2.6.0/include/linux/compiler-gcc2.h 2003-12-26 11:00:33.000000000 +0000
+++ linux-2.6.0/include/linux.plasmaroo/compiler-gcc2.h 2003-12-26 10:35:10.000000000 +0000
@@ -12,7 +12,9 @@
# define __builtin_expect(x, expected_value) (x)
#endif
+#ifndef __attribute_used__
#define __attribute_used__ __attribute__((__unused__))
+#endif
/*
* The attribute `pure' is not implemented in GCC versions earlier
|