Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 85106 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.6.11.3/include/asm-alpha/signal.h (+8 lines)
Lines 24-30 Link Here
24
/* Here we must cater to libcs that poke about in kernel headers.  */
24
/* Here we must cater to libcs that poke about in kernel headers.  */
25
25
26
#define NSIG		32
26
#define NSIG		32
27
#ifndef __sigset_t_defined
27
typedef unsigned long sigset_t;
28
typedef unsigned long sigset_t;
29
#endif
28
30
29
#endif /* __KERNEL__ */
31
#endif /* __KERNEL__ */
30
32
Lines 158-163 Link Here
158
#else
160
#else
159
/* Here we must cater to libcs that poke about in kernel headers.  */
161
/* Here we must cater to libcs that poke about in kernel headers.  */
160
162
163
#ifndef _SIGNAL_H
161
struct sigaction {
164
struct sigaction {
162
	union {
165
	union {
163
	  __sighandler_t	_sa_handler;
166
	  __sighandler_t	_sa_handler;
Lines 166-191 Link Here
166
	sigset_t	sa_mask;
169
	sigset_t	sa_mask;
167
	int		sa_flags;
170
	int		sa_flags;
168
};
171
};
172
#endif
169
173
170
#define sa_handler	_u._sa_handler
174
#define sa_handler	_u._sa_handler
171
#define sa_sigaction	_u._sa_sigaction
175
#define sa_sigaction	_u._sa_sigaction
172
176
173
#endif /* __KERNEL__ */
177
#endif /* __KERNEL__ */
174
178
179
#ifndef _SIGNAL_H
175
typedef struct sigaltstack {
180
typedef struct sigaltstack {
176
	void __user *ss_sp;
181
	void __user *ss_sp;
177
	int ss_flags;
182
	int ss_flags;
178
	size_t ss_size;
183
	size_t ss_size;
179
} stack_t;
184
} stack_t;
185
#endif
180
186
181
/* sigstack(2) is deprecated, and will be withdrawn in a future version
187
/* sigstack(2) is deprecated, and will be withdrawn in a future version
182
   of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
188
   of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
183
   implemented here for OSF/1 compatibility.  */
189
   implemented here for OSF/1 compatibility.  */
184
190
191
#ifndef _SIGNAL_H
185
struct sigstack {
192
struct sigstack {
186
	void __user *ss_sp;
193
	void __user *ss_sp;
187
	int ss_onstack;
194
	int ss_onstack;
188
};
195
};
196
#endif
189
197
190
#ifdef __KERNEL__
198
#ifdef __KERNEL__
191
#include <asm/sigcontext.h>
199
#include <asm/sigcontext.h>
(-)linux-2.6.11.3/include/asm-generic/siginfo.h (-3 / +6 lines)
Lines 5-14 Link Here
5
#include <linux/types.h>
5
#include <linux/types.h>
6
#include <linux/resource.h>
6
#include <linux/resource.h>
7
7
8
#ifndef _SIGNAL_H
8
typedef union sigval {
9
typedef union sigval {
9
	int sival_int;
10
	int sival_int;
10
	void __user *sival_ptr;
11
	void __user *sival_ptr;
11
} sigval_t;
12
} sigval_t;
13
#endif
12
14
13
/*
15
/*
14
 * This is the size (including padding) of the part of the
16
 * This is the size (including padding) of the part of the
Lines 37-43 Link Here
37
#endif
39
#endif
38
40
39
#ifndef HAVE_ARCH_SIGINFO_T
41
#ifndef HAVE_ARCH_SIGINFO_T
40
42
#ifndef _SIGNAL_H
41
typedef struct siginfo {
43
typedef struct siginfo {
42
	int si_signo;
44
	int si_signo;
43
	int si_errno;
45
	int si_errno;
Lines 92-98 Link Here
92
		} _sigpoll;
94
		} _sigpoll;
93
	} _sifields;
95
	} _sifields;
94
} siginfo_t;
96
} siginfo_t;
95
97
#endif
96
#endif
98
#endif
97
99
98
/*
100
/*
Lines 242-247 Link Here
242
#define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 3)
244
#define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 3)
243
#endif
245
#endif
244
246
247
#ifndef _SIGNAL_H
245
typedef struct sigevent {
248
typedef struct sigevent {
246
	sigval_t sigev_value;
249
	sigval_t sigev_value;
247
	int sigev_signo;
250
	int sigev_signo;
Lines 256-262 Link Here
256
		} _sigev_thread;
259
		} _sigev_thread;
257
	} _sigev_un;
260
	} _sigev_un;
258
} sigevent_t;
261
} sigevent_t;
259
262
#endif
260
#define sigev_notify_function	_sigev_un._sigev_thread._function
263
#define sigev_notify_function	_sigev_un._sigev_thread._function
261
#define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
264
#define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
262
#define sigev_notify_thread_id	 _sigev_un._tid
265
#define sigev_notify_thread_id	 _sigev_un._tid
(-)linux-2.6.11.3/include/asm-i386/cache.h (+4 lines)
Lines 7-13 Link Here
7
#include <linux/config.h>
7
#include <linux/config.h>
8
8
9
/* L1 cache line size */
9
/* L1 cache line size */
10
#ifndef CONFIG_X86_L1_CACHE_SHIFT
11
#define L1_CACHE_SHIFT 7  /* 7 is given with X86_GENERIC kernel config */
12
#else
10
#define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
13
#define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
14
#endif
11
#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
15
#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
12
16
13
#define L1_CACHE_SHIFT_MAX 7	/* largest L1 which this arch supports */
17
#define L1_CACHE_SHIFT_MAX 7	/* largest L1 which this arch supports */
(-)linux-2.6.11.3/include/asm-i386/ipc.h (+2 lines)
Lines 6-11 Link Here
6
 *
6
 *
7
 * See arch/i386/kernel/sys_i386.c for ugly details..
7
 * See arch/i386/kernel/sys_i386.c for ugly details..
8
 */
8
 */
9
10
#include <linux/compiler.h>
9
struct ipc_kludge {
11
struct ipc_kludge {
10
	struct msgbuf __user *msgp;
12
	struct msgbuf __user *msgp;
11
	long msgtyp;
13
	long msgtyp;
(-)linux-2.6.11.3/include/asm-i386/mpspec.h (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
#include <linux/cpumask.h>
4
#include <linux/cpumask.h>
5
#include <asm/mpspec_def.h>
5
#include <asm/mpspec_def.h>
6
#include <mach_mpspec.h>
6
#include <asm/mach-generic/mach_mpspec.h>
7
7
8
extern int mp_bus_id_to_type [MAX_MP_BUSSES];
8
extern int mp_bus_id_to_type [MAX_MP_BUSSES];
9
extern int mp_bus_id_to_node [MAX_MP_BUSSES];
9
extern int mp_bus_id_to_node [MAX_MP_BUSSES];
(-)linux-2.6.11.3/include/asm-i386/processor.h (-2 / +8 lines)
Lines 8-14 Link Here
8
#define __ASM_I386_PROCESSOR_H
8
#define __ASM_I386_PROCESSOR_H
9
9
10
#include <asm/vm86.h>
10
#include <asm/vm86.h>
11
#ifdef __KERNEL__
11
#include <asm/math_emu.h>
12
#include <asm/math_emu.h>
13
#endif
12
#include <asm/segment.h>
14
#include <asm/segment.h>
13
#include <asm/page.h>
15
#include <asm/page.h>
14
#include <asm/types.h>
16
#include <asm/types.h>
Lines 415-422 Link Here
415
	/*
417
	/*
416
	 * .. and then another 0x100 bytes for emergency kernel stack
418
	 * .. and then another 0x100 bytes for emergency kernel stack
417
	 */
419
	 */
418
	unsigned long stack[64];
420
	#ifndef stack /* LVM2-Userspace defines this as a function... */
419
} __attribute__((packed));
421
		unsigned long stack[64];
422
	#endif
423
}  __attribute__((packed));
420
424
421
#define ARCH_MIN_TASKALIGN	16
425
#define ARCH_MIN_TASKALIGN	16
422
426
Lines 504-510 Link Here
504
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
508
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
505
509
506
extern unsigned long thread_saved_pc(struct task_struct *tsk);
510
extern unsigned long thread_saved_pc(struct task_struct *tsk);
511
#ifdef __KERNEL__
507
void show_trace(struct task_struct *task, unsigned long *stack);
512
void show_trace(struct task_struct *task, unsigned long *stack);
513
#endif
508
514
509
unsigned long get_wchan(struct task_struct *p);
515
unsigned long get_wchan(struct task_struct *p);
510
516
(-)linux-2.6.11.3/include/asm-i386/semaphore.h (-3 lines)
Lines 3-10 Link Here
3
3
4
#include <linux/linkage.h>
4
#include <linux/linkage.h>
5
5
6
#ifdef __KERNEL__
7
8
/*
6
/*
9
 * SMP- and interrupt-safe semaphores..
7
 * SMP- and interrupt-safe semaphores..
10
 *
8
 *
Lines 196-199 Link Here
196
}
194
}
197
195
198
#endif
196
#endif
199
#endif
(-)linux-2.6.11.3/include/asm-i386/signal.h (+6 lines)
Lines 27-33 Link Here
27
/* Here we must cater to libcs that poke about in kernel headers.  */
27
/* Here we must cater to libcs that poke about in kernel headers.  */
28
28
29
#define NSIG		32
29
#define NSIG		32
30
#ifndef __sigset_t_defined
30
typedef unsigned long sigset_t;
31
typedef unsigned long sigset_t;
32
#endif
31
33
32
#endif /* __KERNEL__ */
34
#endif /* __KERNEL__ */
33
35
Lines 160-165 Link Here
160
#else
162
#else
161
/* Here we must cater to libcs that poke about in kernel headers.  */
163
/* Here we must cater to libcs that poke about in kernel headers.  */
162
164
165
#ifndef _SIGNAL_H
163
struct sigaction {
166
struct sigaction {
164
	union {
167
	union {
165
	  __sighandler_t _sa_handler;
168
	  __sighandler_t _sa_handler;
Lines 169-185 Link Here
169
	unsigned long sa_flags;
172
	unsigned long sa_flags;
170
	void (*sa_restorer)(void);
173
	void (*sa_restorer)(void);
171
};
174
};
175
#endif
172
176
173
#define sa_handler	_u._sa_handler
177
#define sa_handler	_u._sa_handler
174
#define sa_sigaction	_u._sa_sigaction
178
#define sa_sigaction	_u._sa_sigaction
175
179
176
#endif /* __KERNEL__ */
180
#endif /* __KERNEL__ */
177
181
182
#ifndef _SIGNAL_H
178
typedef struct sigaltstack {
183
typedef struct sigaltstack {
179
	void __user *ss_sp;
184
	void __user *ss_sp;
180
	int ss_flags;
185
	int ss_flags;
181
	size_t ss_size;
186
	size_t ss_size;
182
} stack_t;
187
} stack_t;
188
#endif
183
189
184
#ifdef __KERNEL__
190
#ifdef __KERNEL__
185
#include <asm/sigcontext.h>
191
#include <asm/sigcontext.h>
(-)linux-2.6.11.3/include/asm-i386/smp.h (-1 / +1 lines)
Lines 70-76 Link Here
70
#ifdef APIC_DEFINITION
70
#ifdef APIC_DEFINITION
71
extern int hard_smp_processor_id(void);
71
extern int hard_smp_processor_id(void);
72
#else
72
#else
73
#include <mach_apicdef.h>
73
#include <asm/mach-generic/mach_apicdef.h>
74
static inline int hard_smp_processor_id(void)
74
static inline int hard_smp_processor_id(void)
75
{
75
{
76
	/* we don't want to mark this access volatile - bad code generation */
76
	/* we don't want to mark this access volatile - bad code generation */
(-)linux-2.6.11.3/include/asm-i386/system.h (-4 / +4 lines)
Lines 244-269 Link Here
244
#endif
244
#endif
245
245
246
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
246
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
247
				      unsigned long new, int size)
247
				      unsigned long _new, int size)
248
{
248
{
249
	unsigned long prev;
249
	unsigned long prev;
250
	switch (size) {
250
	switch (size) {
251
	case 1:
251
	case 1:
252
		__asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
252
		__asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
253
				     : "=a"(prev)
253
				     : "=a"(prev)
254
				     : "q"(new), "m"(*__xg(ptr)), "0"(old)
254
				     : "q"(_new), "m"(*__xg(ptr)), "0"(old)
255
				     : "memory");
255
				     : "memory");
256
		return prev;
256
		return prev;
257
	case 2:
257
	case 2:
258
		__asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
258
		__asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
259
				     : "=a"(prev)
259
				     : "=a"(prev)
260
				     : "q"(new), "m"(*__xg(ptr)), "0"(old)
260
				     : "q"(_new), "m"(*__xg(ptr)), "0"(old)
261
				     : "memory");
261
				     : "memory");
262
		return prev;
262
		return prev;
263
	case 4:
263
	case 4:
264
		__asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
264
		__asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
265
				     : "=a"(prev)
265
				     : "=a"(prev)
266
				     : "q"(new), "m"(*__xg(ptr)), "0"(old)
266
				     : "q"(_new), "m"(*__xg(ptr)), "0"(old)
267
				     : "memory");
267
				     : "memory");
268
		return prev;
268
		return prev;
269
	}
269
	}
(-)linux-2.6.11.3/include/asm-ia64/fpu.h (+7 lines)
Lines 53-65 Link Here
53
			 | FPSR_S3 (FPSF_DEFAULT | FPSF_TD))
53
			 | FPSR_S3 (FPSF_DEFAULT | FPSF_TD))
54
54
55
# ifndef __ASSEMBLY__
55
# ifndef __ASSEMBLY__
56
#   ifndef __KERNEL__
57
#     include <dlfcn.h>
58
      /* Versioning, newer glibc's declare ia64_fpreg without telling us
59
           -- plasmaroo */
60
#   endif
56
61
62
#   if !defined(RTLD_DEEPBIND) || !defined(_BITS_SIGCONTEXT_H) || defined(__KERNEL__)
57
struct ia64_fpreg {
63
struct ia64_fpreg {
58
	union {
64
	union {
59
		unsigned long bits[2];
65
		unsigned long bits[2];
60
		long double __dummy;	/* force 16-byte alignment */
66
		long double __dummy;	/* force 16-byte alignment */
61
	} u;
67
	} u;
62
};
68
};
69
#   endif
63
70
64
# endif /* __ASSEMBLY__ */
71
# endif /* __ASSEMBLY__ */
65
72
(-)linux-2.6.11.3/include/asm-ia64/unistd.h (-1 / +1 lines)
Lines 121-127 Link Here
121
#define __NR_setdomainname		1129
121
#define __NR_setdomainname		1129
122
#define __NR_uname			1130
122
#define __NR_uname			1130
123
#define __NR_adjtimex			1131
123
#define __NR_adjtimex			1131
124
/* 1132 was __NR_create_module */
124
#define __NR_create_module		1132
125
#define __NR_init_module		1133
125
#define __NR_init_module		1133
126
#define __NR_delete_module		1134
126
#define __NR_delete_module		1134
127
/* 1135 was __NR_get_kernel_syms */
127
/* 1135 was __NR_get_kernel_syms */
(-)linux-2.6.11.3/include/asm-parisc/bitops.h (-7 / +5 lines)
Lines 203-210 Link Here
203
	return !!(*addr & mask);
203
	return !!(*addr & mask);
204
}
204
}
205
205
206
#ifdef __KERNEL__
207
208
/**
206
/**
209
 * __ffs - find first bit in word. returns 0 to "BITS_PER_LONG-1".
207
 * __ffs - find first bit in word. returns 0 to "BITS_PER_LONG-1".
210
 * @word: The word to search
208
 * @word: The word to search
Lines 224-229 Link Here
224
 * cycles for each mispredicted branch.
222
 * cycles for each mispredicted branch.
225
 */
223
 */
226
224
225
#ifndef __ffs_X
227
static __inline__ unsigned long __ffs(unsigned long x)
226
static __inline__ unsigned long __ffs(unsigned long x)
228
{
227
{
229
	unsigned long ret;
228
	unsigned long ret;
Lines 254-259 Link Here
254
			: "+r" (x), "=r" (ret) );
253
			: "+r" (x), "=r" (ret) );
255
	return ret;
254
	return ret;
256
}
255
}
256
#endif
257
257
258
/* Undefined if no bit is zero. */
258
/* Undefined if no bit is zero. */
259
#define ffz(x)	__ffs(~x)
259
#define ffz(x)	__ffs(~x)
Lines 345-352 Link Here
345
#endif
345
#endif
346
}
346
}
347
347
348
#endif /* __KERNEL__ */
349
350
/*
348
/*
351
 * This implementation of find_{first,next}_zero_bit was stolen from
349
 * This implementation of find_{first,next}_zero_bit was stolen from
352
 * Linus' asm-alpha/bitops.h.
350
 * Linus' asm-alpha/bitops.h.
Lines 486-492 Link Here
486
	size -= result;
484
	size -= result;
487
	offset &= 31UL;
485
	offset &= 31UL;
488
	if (offset) {
486
	if (offset) {
489
		tmp = cpu_to_le32p(p++);
487
		tmp = __cpu_to_le32p(p++);
490
		tmp |= ~0UL >> (32-offset);
488
		tmp |= ~0UL >> (32-offset);
491
		if (size < 32)
489
		if (size < 32)
492
			goto found_first;
490
			goto found_first;
Lines 496-509 Link Here
496
		result += 32;
494
		result += 32;
497
	}
495
	}
498
	while (size >= 32) {
496
	while (size >= 32) {
499
		if ((tmp = cpu_to_le32p(p++)) != ~0U)
497
		if ((tmp = __cpu_to_le32p(p++)) != ~0U)
500
			goto found_middle;
498
			goto found_middle;
501
		result += 32;
499
		result += 32;
502
		size -= 32;
500
		size -= 32;
503
	}
501
	}
504
	if (!size)
502
	if (!size)
505
		return result;
503
		return result;
506
	tmp = cpu_to_le32p(p);
504
	tmp = __cpu_to_le32p(p);
507
found_first:
505
found_first:
508
	tmp |= ~0U << size;
506
	tmp |= ~0U << size;
509
found_middle:
507
found_middle:
(-)linux-2.6.11.3/include/asm-parisc/hardware.h (-32 / +32 lines)
Lines 45-85 Link Here
45
struct parisc_driver;
45
struct parisc_driver;
46
46
47
struct io_module {
47
struct io_module {
48
        volatile uint32_t nothing;		/* reg 0 */
48
        volatile __u32 nothing;		/* reg 0 */
49
        volatile uint32_t io_eim;
49
        volatile __u32 io_eim;
50
        volatile uint32_t io_dc_adata;
50
        volatile __u32 io_dc_adata;
51
        volatile uint32_t io_ii_cdata;
51
        volatile __u32 io_ii_cdata;
52
        volatile uint32_t io_dma_link;		/* reg 4 */
52
        volatile __u32 io_dma_link;		/* reg 4 */
53
        volatile uint32_t io_dma_command;
53
        volatile __u32 io_dma_command;
54
        volatile uint32_t io_dma_address;
54
        volatile __u32 io_dma_address;
55
        volatile uint32_t io_dma_count;
55
        volatile __u32 io_dma_count;
56
        volatile uint32_t io_flex;		/* reg 8 */
56
        volatile __u32 io_flex;		/* reg 8 */
57
        volatile uint32_t io_spa_address;
57
        volatile __u32 io_spa_address;
58
        volatile uint32_t reserved1[2];
58
        volatile __u32 reserved1[2];
59
        volatile uint32_t io_command;		/* reg 12 */
59
        volatile __u32 io_command;		/* reg 12 */
60
        volatile uint32_t io_status;
60
        volatile __u32 io_status;
61
        volatile uint32_t io_control;
61
        volatile __u32 io_control;
62
        volatile uint32_t io_data;
62
        volatile __u32 io_data;
63
        volatile uint32_t reserved2;		/* reg 16 */
63
        volatile __u32 reserved2;		/* reg 16 */
64
        volatile uint32_t chain_addr;
64
        volatile __u32 chain_addr;
65
        volatile uint32_t sub_mask_clr;
65
        volatile __u32 sub_mask_clr;
66
        volatile uint32_t reserved3[13];
66
        volatile __u32 reserved3[13];
67
        volatile uint32_t undefined[480];
67
        volatile __u32 undefined[480];
68
        volatile uint32_t unpriv[512];
68
        volatile __u32 unpriv[512];
69
};
69
};
70
70
71
struct bc_module {
71
struct bc_module {
72
        volatile uint32_t unused1[12];
72
        volatile __u32 unused1[12];
73
        volatile uint32_t io_command;
73
        volatile __u32 io_command;
74
        volatile uint32_t io_status;
74
        volatile __u32 io_status;
75
        volatile uint32_t io_control;
75
        volatile __u32 io_control;
76
        volatile uint32_t unused2[1];
76
        volatile __u32 unused2[1];
77
        volatile uint32_t io_err_resp;
77
        volatile __u32 io_err_resp;
78
        volatile uint32_t io_err_info;
78
        volatile __u32 io_err_info;
79
        volatile uint32_t io_err_req;
79
        volatile __u32 io_err_req;
80
        volatile uint32_t unused3[11];
80
        volatile __u32 unused3[11];
81
        volatile uint32_t io_io_low;
81
        volatile __u32 io_io_low;
82
        volatile uint32_t io_io_high;
82
        volatile __u32 io_io_high;
83
};
83
};
84
84
85
#define HPHW_NPROC     0 
85
#define HPHW_NPROC     0 
(-)linux-2.6.11.3/include/asm-parisc/processor.h (-1 / +1 lines)
Lines 12-22 Link Here
12
#include <linux/config.h>
12
#include <linux/config.h>
13
#include <linux/threads.h>
13
#include <linux/threads.h>
14
14
15
#include <asm/types.h>
15
#include <asm/hardware.h>
16
#include <asm/hardware.h>
16
#include <asm/page.h>
17
#include <asm/page.h>
17
#include <asm/pdc.h>
18
#include <asm/pdc.h>
18
#include <asm/ptrace.h>
19
#include <asm/ptrace.h>
19
#include <asm/types.h>
20
#include <asm/system.h>
20
#include <asm/system.h>
21
#endif /* __ASSEMBLY__ */
21
#endif /* __ASSEMBLY__ */
22
22
(-)linux-2.6.11.3/include/asm-parisc/types.h (-1 / +1 lines)
Lines 19-25 Link Here
19
typedef __signed__ int __s32;
19
typedef __signed__ int __s32;
20
typedef unsigned int __u32;
20
typedef unsigned int __u32;
21
21
22
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
22
#if defined(__GNUC__)
23
typedef __signed__ long long __s64;
23
typedef __signed__ long long __s64;
24
typedef unsigned long long __u64;
24
typedef unsigned long long __u64;
25
#endif
25
#endif
(-)linux-2.6.11.3/include/asm-ppc/bitops.h (-2 / +7 lines)
Lines 2-10 Link Here
2
 * bitops.h: Bit string operations on the ppc
2
 * bitops.h: Bit string operations on the ppc
3
 */
3
 */
4
4
5
#ifdef __KERNEL__
6
#ifndef _PPC_BITOPS_H
5
#ifndef _PPC_BITOPS_H
7
#define _PPC_BITOPS_H
6
#define _PPC_BITOPS_H
7
#ifdef __KERNEL__
8
8
9
#include <linux/config.h>
9
#include <linux/config.h>
10
#include <linux/compiler.h>
10
#include <linux/compiler.h>
Lines 251-256 Link Here
251
	return __ilog2(x & -x) + 1;
251
	return __ilog2(x & -x) + 1;
252
}
252
}
253
253
254
#endif /* __KERNEL__ */
255
254
/*
256
/*
255
 * fls: find last (most-significant) bit set.
257
 * fls: find last (most-significant) bit set.
256
 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
258
 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
Lines 263-268 Link Here
263
	return 32 - lz;
265
	return 32 - lz;
264
}
266
}
265
267
268
#ifdef __KERNEL__
269
266
/*
270
/*
267
 * hweightN: returns the hamming weight (i.e. the number
271
 * hweightN: returns the hamming weight (i.e. the number
268
 * of bits set) of a N-bit word
272
 * of bits set) of a N-bit word
Lines 456-460 Link Here
456
#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
460
#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
457
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
461
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
458
462
459
#endif /* _PPC_BITOPS_H */
460
#endif /* __KERNEL__ */
463
#endif /* __KERNEL__ */
464
#endif /* _PPC_BITOPS_H */
465
(-)linux-2.6.11.3/include/asm-ppc/signal.h (+25 lines)
Lines 17-25 Link Here
17
17
18
typedef unsigned long old_sigset_t;		/* at least 32 bits */
18
typedef unsigned long old_sigset_t;		/* at least 32 bits */
19
19
20
#ifndef __sigset_t_defined
20
typedef struct {
21
typedef struct {
21
	unsigned long sig[_NSIG_WORDS];
22
	unsigned long sig[_NSIG_WORDS];
22
} sigset_t;
23
} sigset_t;
24
#endif
23
25
24
#define SIGHUP		 1
26
#define SIGHUP		 1
25
#define SIGINT		 2
27
#define SIGINT		 2
Lines 129-156 Link Here
129
#define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
131
#define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
130
132
131
struct old_sigaction {
133
struct old_sigaction {
134
#ifdef __USE_POSIX199309
135
#	ifdef sa_handler
136
#		undef sa_handler
137
#	endif
138
#	ifdef sa_sigaction
139
#		undef sa_sigaction
140
#	endif
141
	union
142
	{
143
		/* Used if SA_SIGINFO is not set.  */
144
			__sighandler_t sa_handler;
145
		/* Used if SA_SIGINFO is set.  */
146
			void (*sa_sigaction) (int, siginfo_t *, void *);
147
	}
148
	__sigaction_handler;
149
#	define sa_handler	__sigaction_handler.sa_handler
150
#	define sa_sigaction	__sigaction_handler.sa_sigaction
151
#else
132
	__sighandler_t sa_handler;
152
	__sighandler_t sa_handler;
153
#endif
133
	old_sigset_t sa_mask;
154
	old_sigset_t sa_mask;
134
	unsigned long sa_flags;
155
	unsigned long sa_flags;
135
	__sigrestore_t sa_restorer;
156
	__sigrestore_t sa_restorer;
136
};
157
};
137
158
159
#ifndef _SIGNAL_H
138
struct sigaction {
160
struct sigaction {
139
	__sighandler_t sa_handler;
161
	__sighandler_t sa_handler;
140
	unsigned long sa_flags;
162
	unsigned long sa_flags;
141
	__sigrestore_t sa_restorer;
163
	__sigrestore_t sa_restorer;
142
	sigset_t sa_mask;		/* mask last for extensibility */
164
	sigset_t sa_mask;		/* mask last for extensibility */
143
};
165
};
166
#endif
144
167
145
struct k_sigaction {
168
struct k_sigaction {
146
	struct sigaction sa;
169
	struct sigaction sa;
147
};
170
};
148
171
172
#ifndef _SIGNAL_H
149
typedef struct sigaltstack {
173
typedef struct sigaltstack {
150
	void __user *ss_sp;
174
	void __user *ss_sp;
151
	int ss_flags;
175
	int ss_flags;
152
	size_t ss_size;
176
	size_t ss_size;
153
} stack_t;
177
} stack_t;
178
#endif
154
179
155
#ifdef __KERNEL__
180
#ifdef __KERNEL__
156
#include <asm/sigcontext.h>
181
#include <asm/sigcontext.h>
(-)linux-2.6.11.3/include/asm-ppc/unaligned.h (-2 lines)
Lines 1-4 Link Here
1
#ifdef __KERNEL__
2
#ifndef __PPC_UNALIGNED_H
1
#ifndef __PPC_UNALIGNED_H
3
#define __PPC_UNALIGNED_H
2
#define __PPC_UNALIGNED_H
4
3
Lines 15-18 Link Here
15
#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
14
#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
16
15
17
#endif
16
#endif
18
#endif /* __KERNEL__ */
(-)linux-2.6.11.3/include/asm-ppc64/page.h (-2 / +6 lines)
Lines 91-96 Link Here
91
/* to align the pointer to the (next) page boundary */
91
/* to align the pointer to the (next) page boundary */
92
#define PAGE_ALIGN(addr)	_ALIGN(addr, PAGE_SIZE)
92
#define PAGE_ALIGN(addr)	_ALIGN(addr, PAGE_SIZE)
93
93
94
#ifdef STRICT_MM_TYPECHECKS
95
typedef struct { unsigned long pte; } pte_t;
96
#else
97
typedef unsigned long pte_t;
98
#endif
99
94
#ifdef __KERNEL__
100
#ifdef __KERNEL__
95
#ifndef __ASSEMBLY__
101
#ifndef __ASSEMBLY__
96
#include <asm/cache.h>
102
#include <asm/cache.h>
Lines 129-135 Link Here
129
 * These are used to make use of C type-checking.  
135
 * These are used to make use of C type-checking.  
130
 * Entries in the pte table are 64b, while entries in the pgd & pmd are 32b.
136
 * Entries in the pte table are 64b, while entries in the pgd & pmd are 32b.
131
 */
137
 */
132
typedef struct { unsigned long pte; } pte_t;
133
typedef struct { unsigned int  pmd; } pmd_t;
138
typedef struct { unsigned int  pmd; } pmd_t;
134
typedef struct { unsigned int  pgd; } pgd_t;
139
typedef struct { unsigned int  pgd; } pgd_t;
135
typedef struct { unsigned long pgprot; } pgprot_t;
140
typedef struct { unsigned long pgprot; } pgprot_t;
Lines 148-154 Link Here
148
/*
153
/*
149
 * .. while these make it easier on the compiler
154
 * .. while these make it easier on the compiler
150
 */
155
 */
151
typedef unsigned long pte_t;
152
typedef unsigned int  pmd_t;
156
typedef unsigned int  pmd_t;
153
typedef unsigned int  pgd_t;
157
typedef unsigned int  pgd_t;
154
typedef unsigned long pgprot_t;
158
typedef unsigned long pgprot_t;
(-)linux-2.6.11.3/include/asm-ppc64/processor.h (-2 / +2 lines)
Lines 565-573 Link Here
565
	unsigned long	pad[3];		/* was saved_msr, saved_softe */
565
	unsigned long	pad[3];		/* was saved_msr, saved_softe */
566
#ifdef CONFIG_ALTIVEC
566
#ifdef CONFIG_ALTIVEC
567
	/* Complete AltiVec register set */
567
	/* Complete AltiVec register set */
568
	vector128	vr[32] __attribute((aligned(16)));
568
	__vector128	vr[32] __attribute((aligned(16)));
569
	/* AltiVec status */
569
	/* AltiVec status */
570
	vector128	vscr __attribute((aligned(16)));
570
	__vector128	vscr __attribute((aligned(16)));
571
	unsigned long	vrsave;
571
	unsigned long	vrsave;
572
	int		used_vr;	/* set if process has used altivec */
572
	int		used_vr;	/* set if process has used altivec */
573
#endif /* CONFIG_ALTIVEC */
573
#endif /* CONFIG_ALTIVEC */
(-)linux-2.6.11.3/include/asm-ppc64/spinlock.h (-1 / +2 lines)
Lines 35-43 Link Here
35
#endif
35
#endif
36
} rwlock_t;
36
} rwlock_t;
37
37
38
#ifdef __KERNEL__
39
#define SPIN_LOCK_UNLOCKED	(spinlock_t) { 0 }
38
#define SPIN_LOCK_UNLOCKED	(spinlock_t) { 0 }
40
39
40
#ifdef __KERNEL__
41
41
#define spin_is_locked(x)	((x)->lock != 0)
42
#define spin_is_locked(x)	((x)->lock != 0)
42
#define spin_lock_init(x)	do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
43
#define spin_lock_init(x)	do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
43
44
(-)linux-2.6.11.3/include/asm-sparc/signal.h (+2 lines)
Lines 106-112 Link Here
106
106
107
#ifndef __ASSEMBLY__
107
#ifndef __ASSEMBLY__
108
108
109
#ifndef __sigset_t_defined
109
typedef unsigned long __old_sigset_t;
110
typedef unsigned long __old_sigset_t;
111
#endif
110
112
111
typedef struct {
113
typedef struct {
112
	unsigned long	sig[_NSIG_WORDS];
114
	unsigned long	sig[_NSIG_WORDS];
(-)linux-2.6.11.3/include/asm-sparc64/signal.h (+2 lines)
Lines 110-116 Link Here
110
110
111
#ifndef __ASSEMBLY__
111
#ifndef __ASSEMBLY__
112
112
113
#ifndef __sigset_t_defined
113
typedef unsigned long __old_sigset_t;            /* at least 32 bits */
114
typedef unsigned long __old_sigset_t;            /* at least 32 bits */
115
#endif
114
116
115
typedef struct {
117
typedef struct {
116
       unsigned long sig[_NSIG_WORDS];
118
       unsigned long sig[_NSIG_WORDS];
(-)linux-2.6.11.3/include/asm-x86_64/bitops.h (-4 lines)
Lines 384-391 Link Here
384
384
385
#endif /* __KERNEL__ */
385
#endif /* __KERNEL__ */
386
386
387
#ifdef __KERNEL__
388
389
#define ext2_set_bit(nr,addr) \
387
#define ext2_set_bit(nr,addr) \
390
	__test_and_set_bit((nr),(unsigned long*)addr)
388
	__test_and_set_bit((nr),(unsigned long*)addr)
391
#define ext2_set_bit_atomic(lock,nr,addr) \
389
#define ext2_set_bit_atomic(lock,nr,addr) \
Lines 413-418 Link Here
413
411
414
#define ARCH_HAS_ATOMIC_UNSIGNED 1
412
#define ARCH_HAS_ATOMIC_UNSIGNED 1
415
413
416
#endif /* __KERNEL__ */
417
418
#endif /* _X86_64_BITOPS_H */
414
#endif /* _X86_64_BITOPS_H */
(-)linux-2.6.11.3/include/asm-x86_64/pda.h (-1 / +1 lines)
Lines 35-41 Link Here
35
 * have to mention %fs/%gs.  So it needs to be done this Torvaldian way.
35
 * have to mention %fs/%gs.  So it needs to be done this Torvaldian way.
36
 */ 
36
 */ 
37
#define sizeof_field(type,field)  (sizeof(((type *)0)->field))
37
#define sizeof_field(type,field)  (sizeof(((type *)0)->field))
38
#define typeof_field(type,field)  typeof(((type *)0)->field)
38
#define typeof_field(type,field)  __typeof__(((type *)0)->field)
39
39
40
extern void __bad_pda_field(void);
40
extern void __bad_pda_field(void);
41
41
(-)linux-2.6.11.3/include/asm-x86_64/processor.h (-22 / +22 lines)
Lines 183-199 Link Here
183
#define INVALID_IO_BITMAP_OFFSET 0x8000
183
#define INVALID_IO_BITMAP_OFFSET 0x8000
184
184
185
struct i387_fxsave_struct {
185
struct i387_fxsave_struct {
186
	u16	cwd;
186
	__u16	cwd;
187
	u16	swd;
187
	__u16	swd;
188
	u16	twd;
188
	__u16	twd;
189
	u16	fop;
189
	__u16	fop;
190
	u64	rip;
190
	__u64	rip;
191
	u64	rdp; 
191
	__u64	rdp; 
192
	u32	mxcsr;
192
	__u32	mxcsr;
193
	u32	mxcsr_mask;
193
	__u32	mxcsr_mask;
194
	u32	st_space[32];	/* 8*16 bytes for each FP-reg = 128 bytes */
194
	__u32	st_space[32];	/* 8*16 bytes for each FP-reg = 128 bytes */
195
	u32	xmm_space[64];	/* 16*16 bytes for each XMM-reg = 128 bytes */
195
	__u32	xmm_space[64];	/* 16*16 bytes for each XMM-reg = 128 bytes */
196
	u32	padding[24];
196
	__u32	padding[24];
197
} __attribute__ ((aligned (16)));
197
} __attribute__ ((aligned (16)));
198
198
199
union i387_union {
199
union i387_union {
Lines 201-216 Link Here
201
};
201
};
202
202
203
struct tss_struct {
203
struct tss_struct {
204
	u32 reserved1;
204
	__u32 reserved1;
205
	u64 rsp0;	
205
	__u64 rsp0;	
206
	u64 rsp1;
206
	__u64 rsp1;
207
	u64 rsp2;
207
	__u64 rsp2;
208
	u64 reserved2;
208
	__u64 reserved2;
209
	u64 ist[7];
209
	__u64 ist[7];
210
	u32 reserved3;
210
	__u32 reserved3;
211
	u32 reserved4;
211
	__u32 reserved4;
212
	u16 reserved5;
212
	__u16 reserved5;
213
	u16 io_bitmap_base;
213
	__u16 io_bitmap_base;
214
	/*
214
	/*
215
	 * The extra 1 is there because the CPU will access an
215
	 * The extra 1 is there because the CPU will access an
216
	 * additional byte beyond the end of the IO permission
216
	 * additional byte beyond the end of the IO permission
Lines 252-258 Link Here
252
	unsigned long	*io_bitmap_ptr;
252
	unsigned long	*io_bitmap_ptr;
253
	unsigned io_bitmap_max;
253
	unsigned io_bitmap_max;
254
/* cached TLS descriptors. */
254
/* cached TLS descriptors. */
255
	u64 tls_array[GDT_ENTRY_TLS_ENTRIES];
255
	__u64 tls_array[GDT_ENTRY_TLS_ENTRIES];
256
} __attribute__((aligned(16)));
256
} __attribute__((aligned(16)));
257
257
258
#define INIT_THREAD  {}
258
#define INIT_THREAD  {}
(-)linux-2.6.11.3/include/asm-x86_64/sigcontext.h (+8 lines)
Lines 7-12 Link Here
7
/* FXSAVE frame */
7
/* FXSAVE frame */
8
/* Note: reserved1/2 may someday contain valuable data. Always save/restore
8
/* Note: reserved1/2 may someday contain valuable data. Always save/restore
9
   them when you change signal frames. */
9
   them when you change signal frames. */
10
11
#ifndef __KERNEL__
12
#include <signal.h> /* Pulls in <bits/sigcontext.h> which contains both /*
13
                    /* of these structures... */
14
#else
15
#ifndef _SIGNAL_H
10
struct _fpstate {
16
struct _fpstate {
11
	__u16	cwd;
17
	__u16	cwd;
12
	__u16	swd;
18
	__u16	swd;
Lines 53-55 Link Here
53
};
59
};
54
60
55
#endif
61
#endif
62
#endif
63
#endif
(-)linux-2.6.11.3/include/asm-x86_64/system.h (-24 / +26 lines)
Lines 4-9 Link Here
4
#include <linux/config.h>
4
#include <linux/config.h>
5
#include <linux/kernel.h>
5
#include <linux/kernel.h>
6
#include <asm/segment.h>
6
#include <asm/segment.h>
7
#include <linux/bitops.h> /* for LOCK_PREFIX... */
8
9
/*
10
 * Alternative inline assembly with input.
11
 * 
12
 * Pecularities:
13
 * No memory clobber here. 
14
 * Argument numbers start with 1.
15
 * Best is to use constraints that are fixed size (like (%1) ... "r")
16
 * If you use variable sized constraints like "m" or "g" in the 
17
 * replacement maake sure to pad to the worst case length.
18
 */
19
20
#define alternative_input(oldinstr, newinstr, feature, input)		\
21
	asm volatile ("661:\n\t" oldinstr "\n662:\n"			\
22
		      ".section .altinstructions,\"a\"\n"		\
23
		      "  .align 8\n"					\
24
		      "  .quad 661b\n"            /* label */		\
25
		      "  .quad 663f\n"		  /* new instruction */	\
26
		      "  .byte %c0\n"             /* feature bit */	\
27
		      "  .byte 662b-661b\n"       /* sourcelen */	\
28
		      "  .byte 664f-663f\n"       /* replacementlen */	\
29
		      ".previous\n"					\
30
		      ".section .altinstr_replacement,\"ax\"\n"		\
31
		      "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
32
		      ".previous" :: "i" (feature), input)
7
33
8
#ifdef __KERNEL__
34
#ifdef __KERNEL__
9
35
Lines 114-143 Link Here
114
		      ".previous" :: "i" (feature) : "memory")  
140
		      ".previous" :: "i" (feature) : "memory")  
115
141
116
/*
142
/*
117
 * Alternative inline assembly with input.
118
 * 
119
 * Pecularities:
120
 * No memory clobber here. 
121
 * Argument numbers start with 1.
122
 * Best is to use constraints that are fixed size (like (%1) ... "r")
123
 * If you use variable sized constraints like "m" or "g" in the 
124
 * replacement maake sure to pad to the worst case length.
125
 */
126
#define alternative_input(oldinstr, newinstr, feature, input...)	\
127
	asm volatile ("661:\n\t" oldinstr "\n662:\n"			\
128
		      ".section .altinstructions,\"a\"\n"		\
129
		      "  .align 8\n"					\
130
		      "  .quad 661b\n"            /* label */		\
131
		      "  .quad 663f\n"		  /* new instruction */	\
132
		      "  .byte %c0\n"             /* feature bit */	\
133
		      "  .byte 662b-661b\n"       /* sourcelen */	\
134
		      "  .byte 664f-663f\n"       /* replacementlen */	\
135
		      ".previous\n"					\
136
		      ".section .altinstr_replacement,\"ax\"\n"		\
137
		      "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
138
		      ".previous" :: "i" (feature), ##input)
139
140
/*
141
 * Clear and set 'TS' bit respectively
143
 * Clear and set 'TS' bit respectively
142
 */
144
 */
143
#define clts() __asm__ __volatile__ ("clts")
145
#define clts() __asm__ __volatile__ ("clts")
(-)linux-2.6.11.3/include/linux/audit.h (+1 lines)
Lines 97-102 Link Here
97
#define AUDIT_FAIL_PANIC	2
97
#define AUDIT_FAIL_PANIC	2
98
98
99
#ifndef __KERNEL__
99
#ifndef __KERNEL__
100
#include <linux/netlink.h>
100
struct audit_message {
101
struct audit_message {
101
	struct nlmsghdr nlh;
102
	struct nlmsghdr nlh;
102
	char		data[1200];
103
	char		data[1200];
(-)linux-2.6.11.3/include/linux/bitmap.h (-1 / +2 lines)
Lines 1-6 Link Here
1
#ifndef __LINUX_BITMAP_H
1
#ifndef __LINUX_BITMAP_H
2
#define __LINUX_BITMAP_H
2
#define __LINUX_BITMAP_H
3
3
4
#ifdef __KERNEL__
4
#ifndef __ASSEMBLY__
5
#ifndef __ASSEMBLY__
5
6
6
#include <linux/types.h>
7
#include <linux/types.h>
Lines 251-255 Link Here
251
}
252
}
252
253
253
#endif /* __ASSEMBLY__ */
254
#endif /* __ASSEMBLY__ */
254
255
#endif /* __KERNEL__ */
255
#endif /* __LINUX_BITMAP_H */
256
#endif /* __LINUX_BITMAP_H */
(-)linux-2.6.11.3/include/linux/buffer_head.h (+4 lines)
Lines 37-42 Link Here
37
37
38
#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
38
#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
39
39
40
#ifdef __KERNEL__
41
40
struct page;
42
struct page;
41
struct buffer_head;
43
struct buffer_head;
42
struct address_space;
44
struct address_space;
Lines 283-288 Link Here
283
		__wait_on_buffer(bh);
285
		__wait_on_buffer(bh);
284
}
286
}
285
287
288
#endif /* __KERNEL__ */
289
286
static inline void lock_buffer(struct buffer_head *bh)
290
static inline void lock_buffer(struct buffer_head *bh)
287
{
291
{
288
	might_sleep();
292
	might_sleep();
(-)linux-2.6.11.3/include/linux/capi.h (+1 lines)
Lines 17-22 Link Here
17
#ifndef __KERNEL__
17
#ifndef __KERNEL__
18
#include <linux/kernelcapi.h>
18
#include <linux/kernelcapi.h>
19
#endif
19
#endif
20
#include <linux/compiler.h>
20
21
21
/*
22
/*
22
 * CAPI_REGISTER
23
 * CAPI_REGISTER
(-)linux-2.6.11.3/include/linux/compiler-gcc2.h (+2 lines)
Lines 12-18 Link Here
12
# define __builtin_expect(x, expected_value) (x)
12
# define __builtin_expect(x, expected_value) (x)
13
#endif
13
#endif
14
14
15
#ifndef __attribute_used__
15
#define __attribute_used__	__attribute__((__unused__))
16
#define __attribute_used__	__attribute__((__unused__))
17
#endif
16
18
17
/*
19
/*
18
 * The attribute `pure' is not implemented in GCC versions earlier
20
 * The attribute `pure' is not implemented in GCC versions earlier
(-)linux-2.6.11.3/include/linux/compiler.h (-3 / +24 lines)
Lines 31-36 Link Here
31
# define __release(x) (void)0
31
# define __release(x) (void)0
32
# define __cond_lock(x) (x)
32
# define __cond_lock(x) (x)
33
#endif
33
#endif
34
#endif
35
36
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
37
#define inline          __inline__
38
#define __inline__      __inline__
39
#define __inline        __inline__
40
#ifndef asm
41
#  define asm           __asm__
42
#endif
43
#ifndef volatile
44
#  define volatile      __volatile__
45
#endif
46
#endif
34
47
35
#ifdef __KERNEL__
48
#ifdef __KERNEL__
36
49
Lines 62-68 Link Here
62
75
63
/* Optimization barrier */
76
/* Optimization barrier */
64
#ifndef barrier
77
#ifndef barrier
65
# define barrier() __memory_barrier()
78
# ifdef mb
79
#   define barrier() mb()
80
# else
81
#   define barrier() __asm__ __volatile__ ("" : : : "memory")
82
# endif
66
#endif
83
#endif
67
84
68
#ifndef RELOC_HIDE
85
#ifndef RELOC_HIDE
Lines 74-81 Link Here
74
91
75
#endif /* __ASSEMBLY__ */
92
#endif /* __ASSEMBLY__ */
76
93
77
#endif /* __KERNEL__ */
78
79
/*
94
/*
80
 * Allow us to mark functions as 'deprecated' and have gcc emit a nice
95
 * Allow us to mark functions as 'deprecated' and have gcc emit a nice
81
 * warning for each use, in hopes of speeding the functions removal.
96
 * warning for each use, in hopes of speeding the functions removal.
Lines 145-148 Link Here
145
#define __always_inline inline
160
#define __always_inline inline
146
#endif
161
#endif
147
162
163
#ifdef __cplusplus
164
#define __cast__(_to) (_to)
165
#else
166
#define __cast__(_to)
167
#endif
168
148
#endif /* __LINUX_COMPILER_H */
169
#endif /* __LINUX_COMPILER_H */
(-)linux-2.6.11.3/include/linux/cpumask.h (+2 lines)
Lines 1-5 Link Here
1
#ifndef __LINUX_CPUMASK_H
1
#ifndef __LINUX_CPUMASK_H
2
#define __LINUX_CPUMASK_H
2
#define __LINUX_CPUMASK_H
3
#ifdef __KERNEL__
3
4
4
/*
5
/*
5
 * Cpumasks provide a bitmap suitable for representing the
6
 * Cpumasks provide a bitmap suitable for representing the
Lines 374-377 Link Here
374
#define for_each_online_cpu(cpu)  for_each_cpu_mask((cpu), cpu_online_map)
375
#define for_each_online_cpu(cpu)  for_each_cpu_mask((cpu), cpu_online_map)
375
#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
376
#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
376
377
378
#endif /* __KERNEL__ */
377
#endif /* __LINUX_CPUMASK_H */
379
#endif /* __LINUX_CPUMASK_H */
(-)linux-2.6.11.3/include/linux/crc-ccitt.h (-3 / +3 lines)
Lines 4-14 Link Here
4
4
5
#include <linux/types.h>
5
#include <linux/types.h>
6
6
7
extern u16 const crc_ccitt_table[256];
7
extern __u16 const crc_ccitt_table[256];
8
8
9
extern u16 crc_ccitt(u16 crc, const u8 *buffer, size_t len);
9
extern __u16 crc_ccitt(__u16 crc, const __u8 *buffer, size_t len);
10
10
11
static inline u16 crc_ccitt_byte(u16 crc, const u8 c)
11
static inline __u16 crc_ccitt_byte(__u16 crc, const __u8 c)
12
{
12
{
13
	return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
13
	return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
14
}
14
}
(-)linux-2.6.11.3/include/linux/ext2_fs_sb.h (-2 / +2 lines)
Lines 46-54 Link Here
46
	int s_inode_size;
46
	int s_inode_size;
47
	int s_first_ino;
47
	int s_first_ino;
48
	spinlock_t s_next_gen_lock;
48
	spinlock_t s_next_gen_lock;
49
	u32 s_next_generation;
49
	__u32 s_next_generation;
50
	unsigned long s_dir_count;
50
	unsigned long s_dir_count;
51
	u8 *s_debts;
51
	__u8 *s_debts;
52
	struct percpu_counter s_freeblocks_counter;
52
	struct percpu_counter s_freeblocks_counter;
53
	struct percpu_counter s_freeinodes_counter;
53
	struct percpu_counter s_freeinodes_counter;
54
	struct percpu_counter s_dirs_counter;
54
	struct percpu_counter s_dirs_counter;
(-)linux-2.6.11.3/include/linux/gfp.h (+2 lines)
Lines 59-64 Link Here
59
59
60
#define GFP_DMA		__GFP_DMA
60
#define GFP_DMA		__GFP_DMA
61
61
62
#ifdef __KERNEL__
62
63
63
/*
64
/*
64
 * There is only one page-allocator function, and two main namespaces to
65
 * There is only one page-allocator function, and two main namespaces to
Lines 131-134 Link Here
131
132
132
void page_alloc_init(void);
133
void page_alloc_init(void);
133
134
135
#endif /* __KERNEL__ */
134
#endif /* __LINUX_GFP_H */
136
#endif /* __LINUX_GFP_H */
(-)linux-2.6.11.3/include/linux/hiddev.h (+2 lines)
Lines 33-38 Link Here
33
 * The event structure itself
33
 * The event structure itself
34
 */
34
 */
35
35
36
#define HID_MAX_USAGES 1024 /* From: drivers/usb/input/hid.h */
37
36
struct hiddev_event {
38
struct hiddev_event {
37
	unsigned hid;
39
	unsigned hid;
38
	signed int value;
40
	signed int value;
(-)linux-2.6.11.3/include/linux/i2c.h (-2 / +12 lines)
Lines 28-38 Link Here
28
#ifndef _LINUX_I2C_H
28
#ifndef _LINUX_I2C_H
29
#define _LINUX_I2C_H
29
#define _LINUX_I2C_H
30
30
31
#include <linux/module.h>
31
#ifdef __KERNEL__
32
#include <linux/types.h>
32
#	include <linux/module.h>
33
#	include <linux/types.h>
34
#else
35
#	define __KERNEL__
36
#	include <linux/types.h>
37
#	undef __KERNEL__
38
#endif
33
#include <linux/i2c-id.h>
39
#include <linux/i2c-id.h>
40
#ifdef __KERNEL__
34
#include <linux/device.h>	/* for struct device */
41
#include <linux/device.h>	/* for struct device */
35
#include <asm/semaphore.h>
42
#include <asm/semaphore.h>
43
#endif
36
44
37
/* --- General options ------------------------------------------------	*/
45
/* --- General options ------------------------------------------------	*/
38
46
Lines 101-106 Link Here
101
 * events.
109
 * events.
102
 */
110
 */
103
111
112
#ifdef __KERNEL__
104
struct i2c_driver {
113
struct i2c_driver {
105
	struct module *owner;
114
	struct module *owner;
106
	char name[32];
115
	char name[32];
Lines 260-265 Link Here
260
{
269
{
261
	dev_set_drvdata (&dev->dev, data);
270
	dev_set_drvdata (&dev->dev, data);
262
}
271
}
272
#endif
263
273
264
/*flags for the driver struct: */
274
/*flags for the driver struct: */
265
#define I2C_DF_NOTIFY	0x01		/* notify on bus (de/a)ttaches 	*/
275
#define I2C_DF_NOTIFY	0x01		/* notify on bus (de/a)ttaches 	*/
(-)linux-2.6.11.3/include/linux/jiffies.h (-4 / +4 lines)
Lines 81-95 Link Here
81
 * without sampling the sequence number in xtime_lock.
81
 * without sampling the sequence number in xtime_lock.
82
 * get_jiffies_64() will do this for you as appropriate.
82
 * get_jiffies_64() will do this for you as appropriate.
83
 */
83
 */
84
extern u64 __jiffy_data jiffies_64;
84
extern __u64 __jiffy_data jiffies_64;
85
extern unsigned long volatile __jiffy_data jiffies;
85
extern unsigned long volatile __jiffy_data jiffies;
86
86
87
#if (BITS_PER_LONG < 64)
87
#if (BITS_PER_LONG < 64)
88
u64 get_jiffies_64(void);
88
__u64 get_jiffies_64(void);
89
#else
89
#else
90
static inline u64 get_jiffies_64(void)
90
static inline __u64 get_jiffies_64(void)
91
{
91
{
92
	return (u64)jiffies;
92
	return (__u64)jiffies;
93
}
93
}
94
#endif
94
#endif
95
95
(-)linux-2.6.11.3/include/linux/list.h (-32 / +29 lines)
Lines 1-8 Link Here
1
#ifndef _LINUX_LIST_H
1
#ifndef _LINUX_LIST_H
2
#define _LINUX_LIST_H
2
#define _LINUX_LIST_H
3
3
4
#ifdef __KERNEL__
5
6
#include <linux/stddef.h>
4
#include <linux/stddef.h>
7
#include <linux/prefetch.h>
5
#include <linux/prefetch.h>
8
#include <asm/system.h>
6
#include <asm/system.h>
Lines 38-57 Link Here
38
	(ptr)->next = (ptr); (ptr)->prev = (ptr); \
36
	(ptr)->next = (ptr); (ptr)->prev = (ptr); \
39
} while (0)
37
} while (0)
40
38
39
#if defined(__KERNEL__) || defined(__LINUX_KEYBOARD_H)
40
41
/*
41
/*
42
 * Insert a new entry between two known consecutive entries.
42
 * Insert a new entry between two known consecutive entries.
43
 *
43
 *
44
 * This is only for internal list manipulation where we know
44
 * This is only for internal list manipulation where we know
45
 * the prev/next entries already!
45
 * the prev/next entries already!
46
 */
46
 */
47
static inline void __list_add(struct list_head *new,
47
static inline void __list_add(struct list_head *_new,
48
			      struct list_head *prev,
48
			      struct list_head *prev,
49
			      struct list_head *next)
49
			      struct list_head *next)
50
{
50
{
51
	next->prev = new;
51
	next->prev = _new;
52
	new->next = next;
52
	_new->next = next;
53
	new->prev = prev;
53
	_new->prev = prev;
54
	prev->next = new;
54
	prev->next = _new;
55
}
55
}
56
56
57
/**
57
/**
Lines 62-70 Link Here
62
 * Insert a new entry after the specified head.
62
 * Insert a new entry after the specified head.
63
 * This is good for implementing stacks.
63
 * This is good for implementing stacks.
64
 */
64
 */
65
static inline void list_add(struct list_head *new, struct list_head *head)
65
static inline void list_add(struct list_head *_new, struct list_head *head)
66
{
66
{
67
	__list_add(new, head, head->next);
67
	__list_add(_new, head, head->next);
68
}
68
}
69
69
70
/**
70
/**
Lines 75-83 Link Here
75
 * Insert a new entry before the specified head.
75
 * Insert a new entry before the specified head.
76
 * This is useful for implementing queues.
76
 * This is useful for implementing queues.
77
 */
77
 */
78
static inline void list_add_tail(struct list_head *new, struct list_head *head)
78
static inline void list_add_tail(struct list_head *_new, struct list_head *head)
79
{
79
{
80
	__list_add(new, head->prev, head);
80
	__list_add(_new, head->prev, head);
81
}
81
}
82
82
83
/*
83
/*
Lines 86-99 Link Here
86
 * This is only for internal list manipulation where we know
86
 * This is only for internal list manipulation where we know
87
 * the prev/next entries already!
87
 * the prev/next entries already!
88
 */
88
 */
89
static inline void __list_add_rcu(struct list_head * new,
89
static inline void __list_add_rcu(struct list_head * _new,
90
		struct list_head * prev, struct list_head * next)
90
		struct list_head * prev, struct list_head * next)
91
{
91
{
92
	new->next = next;
92
	_new->next = next;
93
	new->prev = prev;
93
	_new->prev = prev;
94
	smp_wmb();
94
	smp_wmb();
95
	next->prev = new;
95
	next->prev = _new;
96
	prev->next = new;
96
	prev->next = _new;
97
}
97
}
98
98
99
/**
99
/**
Lines 112-120 Link Here
112
 * the _rcu list-traversal primitives, such as
112
 * the _rcu list-traversal primitives, such as
113
 * list_for_each_entry_rcu().
113
 * list_for_each_entry_rcu().
114
 */
114
 */
115
static inline void list_add_rcu(struct list_head *new, struct list_head *head)
115
static inline void list_add_rcu(struct list_head *_new, struct list_head *head)
116
{
116
{
117
	__list_add_rcu(new, head, head->next);
117
	__list_add_rcu(_new, head, head->next);
118
}
118
}
119
119
120
/**
120
/**
Lines 133-142 Link Here
133
 * the _rcu list-traversal primitives, such as
133
 * the _rcu list-traversal primitives, such as
134
 * list_for_each_entry_rcu().
134
 * list_for_each_entry_rcu().
135
 */
135
 */
136
static inline void list_add_tail_rcu(struct list_head *new,
136
static inline void list_add_tail_rcu(struct list_head *_new,
137
					struct list_head *head)
137
					struct list_head *head)
138
{
138
{
139
	__list_add_rcu(new, head->prev, head);
139
	__list_add_rcu(_new, head->prev, head);
140
}
140
}
141
141
142
/*
142
/*
Lines 161-168 Link Here
161
static inline void list_del(struct list_head *entry)
161
static inline void list_del(struct list_head *entry)
162
{
162
{
163
	__list_del(entry->prev, entry->next);
163
	__list_del(entry->prev, entry->next);
164
	entry->next = LIST_POISON1;
164
	entry->next = __cast__(list_head*) LIST_POISON1;
165
	entry->prev = LIST_POISON2;
165
	entry->prev = __cast__(list_head*) LIST_POISON2;
166
}
166
}
167
167
168
/**
168
/**
Lines 192-198 Link Here
192
static inline void list_del_rcu(struct list_head *entry)
192
static inline void list_del_rcu(struct list_head *entry)
193
{
193
{
194
	__list_del(entry->prev, entry->next);
194
	__list_del(entry->prev, entry->next);
195
	entry->prev = LIST_POISON2;
195
	entry->prev = __cast__(list_head*) LIST_POISON2;
196
}
196
}
197
197
198
/*
198
/*
Lines 513-520 Link Here
513
513
514
static inline void __hlist_del(struct hlist_node *n)
514
static inline void __hlist_del(struct hlist_node *n)
515
{
515
{
516
	struct hlist_node *next = n->next;
516
	struct hlist_node *next = __cast__(hlist_node*) n->next;
517
	struct hlist_node **pprev = n->pprev;
517
	struct hlist_node **pprev = __cast__(hlist_node**) n->pprev;
518
	*pprev = next;
518
	*pprev = next;
519
	if (next)
519
	if (next)
520
		next->pprev = pprev;
520
		next->pprev = pprev;
Lines 523-530 Link Here
523
static inline void hlist_del(struct hlist_node *n)
523
static inline void hlist_del(struct hlist_node *n)
524
{
524
{
525
	__hlist_del(n);
525
	__hlist_del(n);
526
	n->next = LIST_POISON1;
526
	n->next = __cast__(hlist_node*) LIST_POISON1;
527
	n->pprev = LIST_POISON2;
527
	n->pprev = __cast__(hlist_node**) LIST_POISON2;
528
}
528
}
529
529
530
/**
530
/**
Lines 549-555 Link Here
549
static inline void hlist_del_rcu(struct hlist_node *n)
549
static inline void hlist_del_rcu(struct hlist_node *n)
550
{
550
{
551
	__hlist_del(n);
551
	__hlist_del(n);
552
	n->pprev = LIST_POISON2;
552
	n->pprev = __cast__(hlist_node**) LIST_POISON2;
553
}
553
}
554
554
555
static inline void hlist_del_init(struct hlist_node *n)
555
static inline void hlist_del_init(struct hlist_node *n)
Lines 700-707 Link Here
700
	     pos && ({ prefetch(pos->next); 1;}) &&			 \
700
	     pos && ({ prefetch(pos->next); 1;}) &&			 \
701
		({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
701
		({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
702
	     pos = rcu_dereference(pos->next))
702
	     pos = rcu_dereference(pos->next))
703
703
#endif
704
#else
705
#warning "don't include kernel headers in userspace"
706
#endif /* __KERNEL__ */
707
#endif
704
#endif
(-)linux-2.6.11.3/include/linux/mod_devicetable.h (-1 / +2 lines)
Lines 8-13 Link Here
8
#define LINUX_MOD_DEVICETABLE_H
8
#define LINUX_MOD_DEVICETABLE_H
9
9
10
#ifdef __KERNEL__
10
#ifdef __KERNEL__
11
#ifndef __KERNEL_ULONG_T__
11
#include <linux/types.h>
12
#include <linux/types.h>
12
typedef unsigned long kernel_ulong_t;
13
typedef unsigned long kernel_ulong_t;
13
#endif
14
#endif
Lines 164-168 Link Here
164
	} devs[PNP_MAX_DEVICES];
165
	} devs[PNP_MAX_DEVICES];
165
};
166
};
166
167
167
168
#endif /* __KERNEL__ */
168
#endif /* LINUX_MOD_DEVICETABLE_H */
169
#endif /* LINUX_MOD_DEVICETABLE_H */
(-)linux-2.6.11.3/include/linux/mroute.h (+1 lines)
Lines 1-6 Link Here
1
#ifndef __LINUX_MROUTE_H
1
#ifndef __LINUX_MROUTE_H
2
#define __LINUX_MROUTE_H
2
#define __LINUX_MROUTE_H
3
3
4
#include <linux/types.h>
4
#include <linux/sockios.h>
5
#include <linux/sockios.h>
5
#include <linux/in.h>
6
#include <linux/in.h>
6
7
(-)linux-2.6.11.3/include/linux/percpu.h (+1 lines)
Lines 1-5 Link Here
1
#ifndef __LINUX_PERCPU_H
1
#ifndef __LINUX_PERCPU_H
2
#define __LINUX_PERCPU_H
2
#define __LINUX_PERCPU_H
3
#include <linux/gfp.h>
3
#include <linux/spinlock.h> /* For preempt_disable() */
4
#include <linux/spinlock.h> /* For preempt_disable() */
4
#include <linux/slab.h> /* For kmalloc() */
5
#include <linux/slab.h> /* For kmalloc() */
5
#include <linux/smp.h>
6
#include <linux/smp.h>
(-)linux-2.6.11.3/include/linux/percpu_counter.h (+1 lines)
Lines 6-11 Link Here
6
 * WARNING: these things are HUGE.  4 kbytes per counter on 32-way P4.
6
 * WARNING: these things are HUGE.  4 kbytes per counter on 32-way P4.
7
 */
7
 */
8
8
9
#include <linux/preempt.h>
9
#include <linux/config.h>
10
#include <linux/config.h>
10
#include <linux/spinlock.h>
11
#include <linux/spinlock.h>
11
#include <linux/smp.h>
12
#include <linux/smp.h>
(-)linux-2.6.11.3/include/linux/pid.h (+5 lines)
Lines 1-6 Link Here
1
#ifndef _LINUX_PID_H
1
#ifndef _LINUX_PID_H
2
#define _LINUX_PID_H
2
#define _LINUX_PID_H
3
3
4
#include <asm/atomic.h>
5
4
enum pid_type
6
enum pid_type
5
{
7
{
6
	PIDTYPE_PID,
8
	PIDTYPE_PID,
Lines 30-35 Link Here
30
32
31
extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type));
33
extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type));
32
34
35
#ifdef __KERNEL__
36
33
/*
37
/*
34
 * look up a PID in the hash table. Must be called with the tasklist_lock
38
 * look up a PID in the hash table. Must be called with the tasklist_lock
35
 * held.
39
 * held.
Lines 52-55 Link Here
52
			hlist_unhashed(&(task)->pids[type].pid_chain));	\
56
			hlist_unhashed(&(task)->pids[type].pid_chain));	\
53
	}								\
57
	}								\
54
58
59
#endif /* __KERNEL__ */
55
#endif /* _LINUX_PID_H */
60
#endif /* _LINUX_PID_H */
(-)linux-2.6.11.3/include/linux/preempt.h (+1 lines)
Lines 8-13 Link Here
8
8
9
#include <linux/config.h>
9
#include <linux/config.h>
10
#include <linux/linkage.h>
10
#include <linux/linkage.h>
11
#include <asm/system.h> /* barrier() <--> mb() */
11
12
12
#ifdef CONFIG_DEBUG_PREEMPT
13
#ifdef CONFIG_DEBUG_PREEMPT
13
  extern void fastcall add_preempt_count(int val);
14
  extern void fastcall add_preempt_count(int val);
(-)linux-2.6.11.3/include/linux/prefetch.h (-2 / +3 lines)
Lines 10-15 Link Here
10
#ifndef _LINUX_PREFETCH_H
10
#ifndef _LINUX_PREFETCH_H
11
#define _LINUX_PREFETCH_H
11
#define _LINUX_PREFETCH_H
12
12
13
#include <linux/compiler.h>
13
#include <linux/types.h>
14
#include <linux/types.h>
14
#include <asm/processor.h>
15
#include <asm/processor.h>
15
#include <asm/cache.h>
16
#include <asm/cache.h>
Lines 59-67 Link Here
59
{
60
{
60
#ifdef ARCH_HAS_PREFETCH
61
#ifdef ARCH_HAS_PREFETCH
61
	char *cp;
62
	char *cp;
62
	char *end = addr + len;
63
	char *end = __cast__(char *) addr + len;
63
64
64
	for (cp = addr; cp < end; cp += PREFETCH_STRIDE)
65
	for (cp = __cast__(char *) addr; cp < end; cp += PREFETCH_STRIDE)
65
		prefetch(cp);
66
		prefetch(cp);
66
#endif
67
#endif
67
}
68
}
(-)linux-2.6.11.3/include/linux/radix-tree.h (+3 lines)
Lines 44-49 Link Here
44
	(root)->rnode = NULL;						\
44
	(root)->rnode = NULL;						\
45
} while (0)
45
} while (0)
46
46
47
#ifdef __KERNEL__
48
47
int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
49
int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
48
void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
50
void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
49
void *radix_tree_delete(struct radix_tree_root *, unsigned long);
51
void *radix_tree_delete(struct radix_tree_root *, unsigned long);
Lines 68-71 Link Here
68
	preempt_enable();
70
	preempt_enable();
69
}
71
}
70
72
73
#endif /* __KERNEL__ */
71
#endif /* _LINUX_RADIX_TREE_H */
74
#endif /* _LINUX_RADIX_TREE_H */
(-)linux-2.6.11.3/include/linux/sem.h (+1 lines)
Lines 1-6 Link Here
1
#ifndef _LINUX_SEM_H
1
#ifndef _LINUX_SEM_H
2
#define _LINUX_SEM_H
2
#define _LINUX_SEM_H
3
3
4
#include <linux/compiler.h>
4
#include <linux/ipc.h>
5
#include <linux/ipc.h>
5
#include <asm/atomic.h>
6
#include <asm/atomic.h>
6
7
(-)linux-2.6.11.3/include/linux/smp.h (+3 lines)
Lines 6-11 Link Here
6
 *		Alan Cox. <alan@redhat.com>
6
 *		Alan Cox. <alan@redhat.com>
7
 */
7
 */
8
8
9
10
#ifdef __KERNEL__
9
#include <linux/config.h>
11
#include <linux/config.h>
10
12
11
extern void cpu_idle(void);
13
extern void cpu_idle(void);
Lines 142-145 Link Here
142
#define put_cpu()		preempt_enable()
144
#define put_cpu()		preempt_enable()
143
#define put_cpu_no_resched()	preempt_enable_no_resched()
145
#define put_cpu_no_resched()	preempt_enable_no_resched()
144
146
147
#endif /* __KERNEL__ */
145
#endif /* __LINUX_SMP_H */
148
#endif /* __LINUX_SMP_H */
(-)linux-2.6.11.3/include/linux/socket.h (-2 / +4 lines)
Lines 16-21 Link Here
16
				/* _SS_MAXSIZE value minus size of ss_family */
16
				/* _SS_MAXSIZE value minus size of ss_family */
17
} __attribute__ ((aligned(_K_SS_ALIGNSIZE)));	/* force desired alignment */
17
} __attribute__ ((aligned(_K_SS_ALIGNSIZE)));	/* force desired alignment */
18
18
19
#ifndef _SYS_SOCKET_H
20
typedef unsigned short	sa_family_t;
21
#endif
22
19
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
23
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
20
24
21
#include <linux/config.h>		/* for CONFIG_COMPAT */
25
#include <linux/config.h>		/* for CONFIG_COMPAT */
Lines 26-33 Link Here
26
#include <linux/types.h>		/* pid_t			*/
30
#include <linux/types.h>		/* pid_t			*/
27
#include <linux/compiler.h>		/* __user			*/
31
#include <linux/compiler.h>		/* __user			*/
28
32
29
typedef unsigned short	sa_family_t;
30
31
/*
33
/*
32
 *	1003.1g requires sa_family_t and that sa_data is char.
34
 *	1003.1g requires sa_family_t and that sa_data is char.
33
 */
35
 */
(-)linux-2.6.11.3/include/linux/spinlock.h (+2 lines)
Lines 437-442 Link Here
437
} while (0)
437
} while (0)
438
438
439
#endif /* !SMP */
439
#endif /* !SMP */
440
#ifdef __KERNEL__
440
441
441
/*
442
/*
442
 * Define the various spin_lock and rw_lock methods.  Note we define these
443
 * Define the various spin_lock and rw_lock methods.  Note we define these
Lines 603-606 Link Here
603
 */
604
 */
604
#define spin_can_lock(lock)		(!spin_is_locked(lock))
605
#define spin_can_lock(lock)		(!spin_is_locked(lock))
605
606
607
#endif /* __KERNEL__ */
606
#endif /* __LINUX_SPINLOCK_H */
608
#endif /* __LINUX_SPINLOCK_H */
(-)linux-2.6.11.3/include/linux/time.h (+14 lines)
Lines 7-30 Link Here
7
#include <linux/seqlock.h>
7
#include <linux/seqlock.h>
8
#endif
8
#endif
9
9
10
#ifndef _SYS_TIME_H
10
#ifndef _STRUCT_TIMESPEC
11
#ifndef _STRUCT_TIMESPEC
12
#ifndef __timespec_defined
11
#define _STRUCT_TIMESPEC
13
#define _STRUCT_TIMESPEC
12
struct timespec {
14
struct timespec {
13
	time_t	tv_sec;		/* seconds */
15
	time_t	tv_sec;		/* seconds */
14
	long	tv_nsec;	/* nanoseconds */
16
	long	tv_nsec;	/* nanoseconds */
15
};
17
};
18
#endif /* __timespec_defined */
16
#endif /* _STRUCT_TIMESPEC */
19
#endif /* _STRUCT_TIMESPEC */
17
20
21
#ifndef _STRUCT_TIMEVAL
18
struct timeval {
22
struct timeval {
19
	time_t		tv_sec;		/* seconds */
23
	time_t		tv_sec;		/* seconds */
20
	suseconds_t	tv_usec;	/* microseconds */
24
	suseconds_t	tv_usec;	/* microseconds */
21
};
25
};
26
#endif /* _STRUCT_TIMEVAL */
22
27
23
struct timezone {
28
struct timezone {
24
	int	tz_minuteswest;	/* minutes west of Greenwich */
29
	int	tz_minuteswest;	/* minutes west of Greenwich */
25
	int	tz_dsttime;	/* type of dst correction */
30
	int	tz_dsttime;	/* type of dst correction */
26
};
31
};
27
32
33
#endif /* _SYS_TIME_H */
34
28
#ifdef __KERNEL__
35
#ifdef __KERNEL__
29
36
30
/* Parameters used to convert the timespec values */
37
/* Parameters used to convert the timespec values */
Lines 60-65 Link Here
60
 * machines were long is 32-bit! (However, as time_t is signed, we
67
 * machines were long is 32-bit! (However, as time_t is signed, we
61
 * will already get problems at other places on 2038-01-19 03:14:08)
68
 * will already get problems at other places on 2038-01-19 03:14:08)
62
 */
69
 */
70
71
#ifndef _TIME_H
63
static inline unsigned long
72
static inline unsigned long
64
mktime (unsigned int year, unsigned int mon,
73
mktime (unsigned int year, unsigned int mon,
65
	unsigned int day, unsigned int hour,
74
	unsigned int day, unsigned int hour,
Lines 77-82 Link Here
77
	  )*60 + min /* now have minutes */
86
	  )*60 + min /* now have minutes */
78
	)*60 + sec; /* finally seconds */
87
	)*60 + sec; /* finally seconds */
79
}
88
}
89
#endif
80
90
81
extern struct timespec xtime;
91
extern struct timespec xtime;
82
extern struct timespec wall_to_monotonic;
92
extern struct timespec wall_to_monotonic;
Lines 139-153 Link Here
139
#define	ITIMER_VIRTUAL	1
149
#define	ITIMER_VIRTUAL	1
140
#define	ITIMER_PROF	2
150
#define	ITIMER_PROF	2
141
151
152
#ifndef _TIME_H
142
struct  itimerspec {
153
struct  itimerspec {
143
        struct  timespec it_interval;    /* timer period */
154
        struct  timespec it_interval;    /* timer period */
144
        struct  timespec it_value;       /* timer expiration */
155
        struct  timespec it_value;       /* timer expiration */
145
};
156
};
157
#endif /* _TIME_H */
146
158
159
#ifndef _SYS_TIME_H
147
struct	itimerval {
160
struct	itimerval {
148
	struct	timeval it_interval;	/* timer interval */
161
	struct	timeval it_interval;	/* timer interval */
149
	struct	timeval it_value;	/* current value */
162
	struct	timeval it_value;	/* current value */
150
};
163
};
164
#endif /* _SYS_TIME_H */
151
165
152
166
153
/*
167
/*
(-)linux-2.6.11.3/include/linux/types.h (+16 lines)
Lines 17-28 Link Here
17
17
18
typedef __u32 __kernel_dev_t;
18
typedef __u32 __kernel_dev_t;
19
19
20
#ifndef _SYS_SELECT_H
20
typedef __kernel_fd_set		fd_set;
21
typedef __kernel_fd_set		fd_set;
22
#endif
23
#ifndef __dev_t_defined
21
typedef __kernel_dev_t		dev_t;
24
typedef __kernel_dev_t		dev_t;
25
#endif
26
#ifndef __ino_t_defined
22
typedef __kernel_ino_t		ino_t;
27
typedef __kernel_ino_t		ino_t;
28
#endif
29
#ifndef __mode_t_defined
23
typedef __kernel_mode_t		mode_t;
30
typedef __kernel_mode_t		mode_t;
31
#endif
32
#ifndef __nlink_t_defined
24
typedef __kernel_nlink_t	nlink_t;
33
typedef __kernel_nlink_t	nlink_t;
34
#endif
35
#ifndef __off_t_defined
25
typedef __kernel_off_t		off_t;
36
typedef __kernel_off_t		off_t;
37
#endif
26
typedef __kernel_pid_t		pid_t;
38
typedef __kernel_pid_t		pid_t;
27
typedef __kernel_daddr_t	daddr_t;
39
typedef __kernel_daddr_t	daddr_t;
28
typedef __kernel_key_t		key_t;
40
typedef __kernel_key_t		key_t;
Lines 33-39 Link Here
33
45
34
#ifdef __KERNEL__
46
#ifdef __KERNEL__
35
typedef __kernel_uid32_t	uid_t;
47
typedef __kernel_uid32_t	uid_t;
48
#define __uid_t_defined
36
typedef __kernel_gid32_t	gid_t;
49
typedef __kernel_gid32_t	gid_t;
50
#define __gid_t_defined
37
typedef __kernel_uid16_t        uid16_t;
51
typedef __kernel_uid16_t        uid16_t;
38
typedef __kernel_gid16_t        gid16_t;
52
typedef __kernel_gid16_t        gid16_t;
39
53
Lines 48-54 Link Here
48
 */
62
 */
49
#else
63
#else
50
typedef __kernel_uid_t		uid_t;
64
typedef __kernel_uid_t		uid_t;
65
#define __uid_t_defined
51
typedef __kernel_gid_t		gid_t;
66
typedef __kernel_gid_t		gid_t;
67
#define __gid_t_defined
52
#endif /* __KERNEL__ */
68
#endif /* __KERNEL__ */
53
69
54
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
70
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
(-)linux-2.6.11.3/include/linux/usbdevice_fs.h (+1 lines)
Lines 31-36 Link Here
31
#ifndef _LINUX_USBDEVICE_FS_H
31
#ifndef _LINUX_USBDEVICE_FS_H
32
#define _LINUX_USBDEVICE_FS_H
32
#define _LINUX_USBDEVICE_FS_H
33
33
34
#include <linux/compiler.h>
34
#include <linux/types.h>
35
#include <linux/types.h>
35
36
36
/* --------------------------------------------------------------------- */
37
/* --------------------------------------------------------------------- */
(-)linux-2.6.11.3/include/linux/videodev2.h (+2 lines)
Lines 13-18 Link Here
13
 *		Justin Schoeman
13
 *		Justin Schoeman
14
 *		et al.
14
 *		et al.
15
 */
15
 */
16
17
#include <linux/compiler.h>
16
#ifdef __KERNEL__
18
#ifdef __KERNEL__
17
#include <linux/time.h> /* need struct timeval */
19
#include <linux/time.h> /* need struct timeval */
18
#endif
20
#endif
(-)linux-2.6.11.3/include/linux/wait.h (-4 / +9 lines)
Lines 17-26 Link Here
17
#define P_PID		1
17
#define P_PID		1
18
#define P_PGID		2
18
#define P_PGID		2
19
19
20
#ifdef __KERNEL__
21
22
#include <linux/config.h>
20
#include <linux/config.h>
23
#include <linux/list.h>
21
#include <linux/list.h>
22
#include <linux/pid.h>
24
#include <linux/stddef.h>
23
#include <linux/stddef.h>
25
#include <linux/spinlock.h>
24
#include <linux/spinlock.h>
26
#include <asm/system.h>
25
#include <asm/system.h>
Lines 116-121 Link Here
116
extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait));
115
extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait));
117
extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
116
extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
118
117
118
#ifdef __KERNEL__
119
119
static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
120
static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
120
{
121
{
121
	list_add(&new->task_list, &head->task_list);
122
	list_add(&new->task_list, &head->task_list);
Lines 136-141 Link Here
136
	list_del(&old->task_list);
137
	list_del(&old->task_list);
137
}
138
}
138
139
140
#endif /* __KERNEL__ */
141
139
void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key));
142
void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key));
140
extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode));
143
extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode));
141
extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr));
144
extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr));
Lines 280-285 Link Here
280
	__ret;								\
283
	__ret;								\
281
})
284
})
282
285
286
#ifdef __KERNEL__
287
283
/*
288
/*
284
 * Must be called with the spinlock in the wait_queue_head_t held.
289
 * Must be called with the spinlock in the wait_queue_head_t held.
285
 */
290
 */
Lines 299-304 Link Here
299
	__remove_wait_queue(q,  wait);
304
	__remove_wait_queue(q,  wait);
300
}
305
}
301
306
307
#endif /* __KERNEL__ */
308
302
/*
309
/*
303
 * These are the old interfaces to sleep waiting for an event.
310
 * These are the old interfaces to sleep waiting for an event.
304
 * They are racy.  DO NOT use them, use the wait_event* interfaces above.  
311
 * They are racy.  DO NOT use them, use the wait_event* interfaces above.  
Lines 395-400 Link Here
395
	return out_of_line_wait_on_bit_lock(word, bit, action, mode);
402
	return out_of_line_wait_on_bit_lock(word, bit, action, mode);
396
}
403
}
397
	
404
	
398
#endif /* __KERNEL__ */
399
400
#endif
405
#endif
(-)linux-2.6.11.3/include/linux/workqueue.h (+4 lines)
Lines 5-10 Link Here
5
#ifndef _LINUX_WORKQUEUE_H
5
#ifndef _LINUX_WORKQUEUE_H
6
#define _LINUX_WORKQUEUE_H
6
#define _LINUX_WORKQUEUE_H
7
7
8
#ifdef __KERNEL__
9
8
#include <linux/timer.h>
10
#include <linux/timer.h>
9
#include <linux/linkage.h>
11
#include <linux/linkage.h>
10
#include <linux/bitops.h>
12
#include <linux/bitops.h>
Lines 86-89 Link Here
86
	return ret;
88
	return ret;
87
}
89
}
88
90
91
#endif /* __KERNEL__ */
92
89
#endif
93
#endif
(-)linux-2.6.11.3/scripts/mod/file2alias.c (+2 lines)
Lines 10-15 Link Here
10
 * of the GNU General Public License, incorporated herein by reference.
10
 * of the GNU General Public License, incorporated herein by reference.
11
 */
11
 */
12
12
13
#define __KERNEL__
14
#define __KERNEL_ULONG_T__
13
#include "modpost.h"
15
#include "modpost.h"
14
16
15
/* We use the ELF typedefs for kernel_ulong_t but bite the bullet and
17
/* We use the ELF typedefs for kernel_ulong_t but bite the bullet and

Return to bug 85106