diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-20 20:46:21 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-20 20:46:21 -0400 |
commit | 70ac4385a13f78bc478f26d317511893741b05bd (patch) | |
tree | dafc7f3018295fc4ee00339889e4f35d5b9d7743 /include/linux | |
parent | d59bf96cdde5b874a57bfd1425faa45da915d0b7 (diff) | |
parent | 077e98945db7e54a9865b5f29a1f02f531eca414 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
include/linux/nfs_fs.h
Fixed up conflict with kernel header updates.
Diffstat (limited to 'include/linux')
169 files changed, 1099 insertions, 1004 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h index 9a66401073fc..3d54fbcf969e 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #define _LINUX_ACCT_H | 16 | #define _LINUX_ACCT_H |
17 | 17 | ||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/jiffies.h> | ||
20 | 19 | ||
21 | #include <asm/param.h> | 20 | #include <asm/param.h> |
22 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
@@ -116,7 +115,6 @@ struct acct_v3 | |||
116 | 115 | ||
117 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
118 | 117 | ||
119 | #include <linux/config.h> | ||
120 | 118 | ||
121 | #ifdef CONFIG_BSD_PROCESS_ACCT | 119 | #ifdef CONFIG_BSD_PROCESS_ACCT |
122 | struct vfsmount; | 120 | struct vfsmount; |
@@ -165,6 +163,7 @@ typedef struct acct acct_t; | |||
165 | #endif /* __KERNEL */ | 163 | #endif /* __KERNEL */ |
166 | 164 | ||
167 | #ifdef __KERNEL__ | 165 | #ifdef __KERNEL__ |
166 | #include <linux/jiffies.h> | ||
168 | /* | 167 | /* |
169 | * Yet another set of HZ to *HZ helper functions. | 168 | * Yet another set of HZ to *HZ helper functions. |
170 | * See <linux/jiffies.h> for the original. | 169 | * See <linux/jiffies.h> for the original. |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d3bc25e6d27d..1cf0b91d05bd 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #ifndef _LINUX_ACPI_H | 25 | #ifndef _LINUX_ACPI_H |
26 | #define _LINUX_ACPI_H | 26 | #define _LINUX_ACPI_H |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #ifdef CONFIG_ACPI | 29 | #ifdef CONFIG_ACPI |
31 | 30 | ||
diff --git a/include/linux/affs_hardblocks.h b/include/linux/affs_hardblocks.h index 3fb869939d82..f1b948c1f592 100644 --- a/include/linux/affs_hardblocks.h +++ b/include/linux/affs_hardblocks.h | |||
@@ -1,45 +1,47 @@ | |||
1 | #ifndef AFFS_HARDBLOCKS_H | 1 | #ifndef AFFS_HARDBLOCKS_H |
2 | #define AFFS_HARDBLOCKS_H | 2 | #define AFFS_HARDBLOCKS_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* Just the needed definitions for the RDB of an Amiga HD. */ | 6 | /* Just the needed definitions for the RDB of an Amiga HD. */ |
5 | 7 | ||
6 | struct RigidDiskBlock { | 8 | struct RigidDiskBlock { |
7 | u32 rdb_ID; | 9 | __u32 rdb_ID; |
8 | __be32 rdb_SummedLongs; | 10 | __be32 rdb_SummedLongs; |
9 | s32 rdb_ChkSum; | 11 | __s32 rdb_ChkSum; |
10 | u32 rdb_HostID; | 12 | __u32 rdb_HostID; |
11 | __be32 rdb_BlockBytes; | 13 | __be32 rdb_BlockBytes; |
12 | u32 rdb_Flags; | 14 | __u32 rdb_Flags; |
13 | u32 rdb_BadBlockList; | 15 | __u32 rdb_BadBlockList; |
14 | __be32 rdb_PartitionList; | 16 | __be32 rdb_PartitionList; |
15 | u32 rdb_FileSysHeaderList; | 17 | __u32 rdb_FileSysHeaderList; |
16 | u32 rdb_DriveInit; | 18 | __u32 rdb_DriveInit; |
17 | u32 rdb_Reserved1[6]; | 19 | __u32 rdb_Reserved1[6]; |
18 | u32 rdb_Cylinders; | 20 | __u32 rdb_Cylinders; |
19 | u32 rdb_Sectors; | 21 | __u32 rdb_Sectors; |
20 | u32 rdb_Heads; | 22 | __u32 rdb_Heads; |
21 | u32 rdb_Interleave; | 23 | __u32 rdb_Interleave; |
22 | u32 rdb_Park; | 24 | __u32 rdb_Park; |
23 | u32 rdb_Reserved2[3]; | 25 | __u32 rdb_Reserved2[3]; |
24 | u32 rdb_WritePreComp; | 26 | __u32 rdb_WritePreComp; |
25 | u32 rdb_ReducedWrite; | 27 | __u32 rdb_ReducedWrite; |
26 | u32 rdb_StepRate; | 28 | __u32 rdb_StepRate; |
27 | u32 rdb_Reserved3[5]; | 29 | __u32 rdb_Reserved3[5]; |
28 | u32 rdb_RDBBlocksLo; | 30 | __u32 rdb_RDBBlocksLo; |
29 | u32 rdb_RDBBlocksHi; | 31 | __u32 rdb_RDBBlocksHi; |
30 | u32 rdb_LoCylinder; | 32 | __u32 rdb_LoCylinder; |
31 | u32 rdb_HiCylinder; | 33 | __u32 rdb_HiCylinder; |
32 | u32 rdb_CylBlocks; | 34 | __u32 rdb_CylBlocks; |
33 | u32 rdb_AutoParkSeconds; | 35 | __u32 rdb_AutoParkSeconds; |
34 | u32 rdb_HighRDSKBlock; | 36 | __u32 rdb_HighRDSKBlock; |
35 | u32 rdb_Reserved4; | 37 | __u32 rdb_Reserved4; |
36 | char rdb_DiskVendor[8]; | 38 | char rdb_DiskVendor[8]; |
37 | char rdb_DiskProduct[16]; | 39 | char rdb_DiskProduct[16]; |
38 | char rdb_DiskRevision[4]; | 40 | char rdb_DiskRevision[4]; |
39 | char rdb_ControllerVendor[8]; | 41 | char rdb_ControllerVendor[8]; |
40 | char rdb_ControllerProduct[16]; | 42 | char rdb_ControllerProduct[16]; |
41 | char rdb_ControllerRevision[4]; | 43 | char rdb_ControllerRevision[4]; |
42 | u32 rdb_Reserved5[10]; | 44 | __u32 rdb_Reserved5[10]; |
43 | }; | 45 | }; |
44 | 46 | ||
45 | #define IDNAME_RIGIDDISK 0x5244534B /* "RDSK" */ | 47 | #define IDNAME_RIGIDDISK 0x5244534B /* "RDSK" */ |
@@ -47,16 +49,16 @@ struct RigidDiskBlock { | |||
47 | struct PartitionBlock { | 49 | struct PartitionBlock { |
48 | __be32 pb_ID; | 50 | __be32 pb_ID; |
49 | __be32 pb_SummedLongs; | 51 | __be32 pb_SummedLongs; |
50 | s32 pb_ChkSum; | 52 | __s32 pb_ChkSum; |
51 | u32 pb_HostID; | 53 | __u32 pb_HostID; |
52 | __be32 pb_Next; | 54 | __be32 pb_Next; |
53 | u32 pb_Flags; | 55 | __u32 pb_Flags; |
54 | u32 pb_Reserved1[2]; | 56 | __u32 pb_Reserved1[2]; |
55 | u32 pb_DevFlags; | 57 | __u32 pb_DevFlags; |
56 | u8 pb_DriveName[32]; | 58 | __u8 pb_DriveName[32]; |
57 | u32 pb_Reserved2[15]; | 59 | __u32 pb_Reserved2[15]; |
58 | __be32 pb_Environment[17]; | 60 | __be32 pb_Environment[17]; |
59 | u32 pb_EReserved[15]; | 61 | __u32 pb_EReserved[15]; |
60 | }; | 62 | }; |
61 | 63 | ||
62 | #define IDNAME_PARTITION 0x50415254 /* "PART" */ | 64 | #define IDNAME_PARTITION 0x50415254 /* "PART" */ |
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 6d59c8efe3be..bfb8ec791b7b 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #ifndef _AGP_H | 27 | #ifndef _AGP_H |
28 | #define _AGP_H 1 | 28 | #define _AGP_H 1 |
29 | 29 | ||
30 | #include <linux/agp_backend.h> | ||
31 | |||
32 | #define AGPIOC_BASE 'A' | 30 | #define AGPIOC_BASE 'A' |
33 | #define AGPIOC_INFO _IOR (AGPIOC_BASE, 0, struct agp_info*) | 31 | #define AGPIOC_INFO _IOR (AGPIOC_BASE, 0, struct agp_info*) |
34 | #define AGPIOC_ACQUIRE _IO (AGPIOC_BASE, 1) | 32 | #define AGPIOC_ACQUIRE _IO (AGPIOC_BASE, 1) |
@@ -112,6 +110,7 @@ typedef struct _agp_unbind { | |||
112 | 110 | ||
113 | #else /* __KERNEL__ */ | 111 | #else /* __KERNEL__ */ |
114 | #include <linux/mutex.h> | 112 | #include <linux/mutex.h> |
113 | #include <linux/agp_backend.h> | ||
115 | 114 | ||
116 | #define AGPGART_MINOR 175 | 115 | #define AGPGART_MINOR 175 |
117 | 116 | ||
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 9cf64b1b688b..29c0448265cf 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * License. See the file COPYING in the main directory of this archive | 9 | * License. See the file COPYING in the main directory of this archive |
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/fb.h> | 12 | #include <linux/fb.h> |
14 | 13 | ||
15 | /* | 14 | /* |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index b203ea82a0a8..1eb238affb12 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -209,7 +209,6 @@ struct atm_cirange { | |||
209 | 209 | ||
210 | #ifdef __KERNEL__ | 210 | #ifdef __KERNEL__ |
211 | 211 | ||
212 | #include <linux/config.h> | ||
213 | #include <linux/wait.h> /* wait_queue_head_t */ | 212 | #include <linux/wait.h> /* wait_queue_head_t */ |
214 | #include <linux/time.h> /* struct timeval */ | 213 | #include <linux/time.h> /* struct timeval */ |
215 | #include <linux/net.h> | 214 | #include <linux/net.h> |
diff --git a/include/linux/audit.h b/include/linux/audit.h index b74c148f14e3..e051ff9c5b50 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -24,8 +24,7 @@ | |||
24 | #ifndef _LINUX_AUDIT_H_ | 24 | #ifndef _LINUX_AUDIT_H_ |
25 | #define _LINUX_AUDIT_H_ | 25 | #define _LINUX_AUDIT_H_ |
26 | 26 | ||
27 | #include <linux/sched.h> | 27 | #include <linux/elf-em.h> |
28 | #include <linux/elf.h> | ||
29 | 28 | ||
30 | /* The netlink messages for the audit system is divided into blocks: | 29 | /* The netlink messages for the audit system is divided into blocks: |
31 | * 1000 - 1099 are for commanding the audit system | 30 | * 1000 - 1099 are for commanding the audit system |
@@ -83,7 +82,12 @@ | |||
83 | #define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */ | 82 | #define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */ |
84 | #define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */ | 83 | #define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */ |
85 | #define AUDIT_CWD 1307 /* Current working directory */ | 84 | #define AUDIT_CWD 1307 /* Current working directory */ |
85 | #define AUDIT_EXECVE 1309 /* execve arguments */ | ||
86 | #define AUDIT_IPC_SET_PERM 1311 /* IPC new permissions record type */ | 86 | #define AUDIT_IPC_SET_PERM 1311 /* IPC new permissions record type */ |
87 | #define AUDIT_MQ_OPEN 1312 /* POSIX MQ open record type */ | ||
88 | #define AUDIT_MQ_SENDRECV 1313 /* POSIX MQ send/receive record type */ | ||
89 | #define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ | ||
90 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ | ||
87 | 91 | ||
88 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 92 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
89 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 93 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -151,6 +155,7 @@ | |||
151 | #define AUDIT_SE_TYPE 15 /* security label type */ | 155 | #define AUDIT_SE_TYPE 15 /* security label type */ |
152 | #define AUDIT_SE_SEN 16 /* security label sensitivity label */ | 156 | #define AUDIT_SE_SEN 16 /* security label sensitivity label */ |
153 | #define AUDIT_SE_CLR 17 /* security label clearance label */ | 157 | #define AUDIT_SE_CLR 17 /* security label clearance label */ |
158 | #define AUDIT_PPID 18 | ||
154 | 159 | ||
155 | /* These are ONLY useful when checking | 160 | /* These are ONLY useful when checking |
156 | * at syscall exit time (AUDIT_AT_EXIT). */ | 161 | * at syscall exit time (AUDIT_AT_EXIT). */ |
@@ -159,6 +164,7 @@ | |||
159 | #define AUDIT_INODE 102 | 164 | #define AUDIT_INODE 102 |
160 | #define AUDIT_EXIT 103 | 165 | #define AUDIT_EXIT 103 |
161 | #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ | 166 | #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ |
167 | #define AUDIT_WATCH 105 | ||
162 | 168 | ||
163 | #define AUDIT_ARG0 200 | 169 | #define AUDIT_ARG0 200 |
164 | #define AUDIT_ARG1 (AUDIT_ARG0+1) | 170 | #define AUDIT_ARG1 (AUDIT_ARG0+1) |
@@ -273,16 +279,21 @@ struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */ | |||
273 | }; | 279 | }; |
274 | 280 | ||
275 | #ifdef __KERNEL__ | 281 | #ifdef __KERNEL__ |
282 | #include <linux/sched.h> | ||
276 | 283 | ||
277 | struct audit_sig_info { | 284 | struct audit_sig_info { |
278 | uid_t uid; | 285 | uid_t uid; |
279 | pid_t pid; | 286 | pid_t pid; |
287 | char ctx[0]; | ||
280 | }; | 288 | }; |
281 | 289 | ||
282 | struct audit_buffer; | 290 | struct audit_buffer; |
283 | struct audit_context; | 291 | struct audit_context; |
284 | struct inode; | 292 | struct inode; |
285 | struct netlink_skb_parms; | 293 | struct netlink_skb_parms; |
294 | struct linux_binprm; | ||
295 | struct mq_attr; | ||
296 | struct mqstat; | ||
286 | 297 | ||
287 | #define AUDITSC_INVALID 0 | 298 | #define AUDITSC_INVALID 0 |
288 | #define AUDITSC_SUCCESS 1 | 299 | #define AUDITSC_SUCCESS 1 |
@@ -297,15 +308,19 @@ extern void audit_syscall_entry(int arch, | |||
297 | int major, unsigned long a0, unsigned long a1, | 308 | int major, unsigned long a0, unsigned long a1, |
298 | unsigned long a2, unsigned long a3); | 309 | unsigned long a2, unsigned long a3); |
299 | extern void audit_syscall_exit(int failed, long return_code); | 310 | extern void audit_syscall_exit(int failed, long return_code); |
300 | extern void audit_getname(const char *name); | 311 | extern void __audit_getname(const char *name); |
301 | extern void audit_putname(const char *name); | 312 | extern void audit_putname(const char *name); |
302 | extern void __audit_inode(const char *name, const struct inode *inode, unsigned flags); | 313 | extern void __audit_inode(const char *name, const struct inode *inode); |
303 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 314 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
304 | unsigned long pino); | 315 | unsigned long pino); |
305 | static inline void audit_inode(const char *name, const struct inode *inode, | 316 | static inline void audit_getname(const char *name) |
306 | unsigned flags) { | 317 | { |
307 | if (unlikely(current->audit_context)) | 318 | if (unlikely(current->audit_context)) |
308 | __audit_inode(name, inode, flags); | 319 | __audit_getname(name); |
320 | } | ||
321 | static inline void audit_inode(const char *name, const struct inode *inode) { | ||
322 | if (unlikely(current->audit_context)) | ||
323 | __audit_inode(name, inode); | ||
309 | } | 324 | } |
310 | static inline void audit_inode_child(const char *dname, | 325 | static inline void audit_inode_child(const char *dname, |
311 | const struct inode *inode, | 326 | const struct inode *inode, |
@@ -320,13 +335,61 @@ extern void auditsc_get_stamp(struct audit_context *ctx, | |||
320 | struct timespec *t, unsigned int *serial); | 335 | struct timespec *t, unsigned int *serial); |
321 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | 336 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); |
322 | extern uid_t audit_get_loginuid(struct audit_context *ctx); | 337 | extern uid_t audit_get_loginuid(struct audit_context *ctx); |
323 | extern int audit_ipc_obj(struct kern_ipc_perm *ipcp); | 338 | extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
324 | extern int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp); | 339 | extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); |
340 | extern int audit_bprm(struct linux_binprm *bprm); | ||
325 | extern int audit_socketcall(int nargs, unsigned long *args); | 341 | extern int audit_socketcall(int nargs, unsigned long *args); |
326 | extern int audit_sockaddr(int len, void *addr); | 342 | extern int audit_sockaddr(int len, void *addr); |
327 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); | 343 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); |
328 | extern void audit_signal_info(int sig, struct task_struct *t); | ||
329 | extern int audit_set_macxattr(const char *name); | 344 | extern int audit_set_macxattr(const char *name); |
345 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); | ||
346 | extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); | ||
347 | extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); | ||
348 | extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); | ||
349 | extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | ||
350 | |||
351 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | ||
352 | { | ||
353 | if (unlikely(current->audit_context)) | ||
354 | return __audit_ipc_obj(ipcp); | ||
355 | return 0; | ||
356 | } | ||
357 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | ||
358 | { | ||
359 | if (unlikely(current->audit_context)) | ||
360 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); | ||
361 | return 0; | ||
362 | } | ||
363 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) | ||
364 | { | ||
365 | if (unlikely(current->audit_context)) | ||
366 | return __audit_mq_open(oflag, mode, u_attr); | ||
367 | return 0; | ||
368 | } | ||
369 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) | ||
370 | { | ||
371 | if (unlikely(current->audit_context)) | ||
372 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); | ||
373 | return 0; | ||
374 | } | ||
375 | static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) | ||
376 | { | ||
377 | if (unlikely(current->audit_context)) | ||
378 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); | ||
379 | return 0; | ||
380 | } | ||
381 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) | ||
382 | { | ||
383 | if (unlikely(current->audit_context)) | ||
384 | return __audit_mq_notify(mqdes, u_notification); | ||
385 | return 0; | ||
386 | } | ||
387 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | ||
388 | { | ||
389 | if (unlikely(current->audit_context)) | ||
390 | return __audit_mq_getsetattr(mqdes, mqstat); | ||
391 | return 0; | ||
392 | } | ||
330 | #else | 393 | #else |
331 | #define audit_alloc(t) ({ 0; }) | 394 | #define audit_alloc(t) ({ 0; }) |
332 | #define audit_free(t) do { ; } while (0) | 395 | #define audit_free(t) do { ; } while (0) |
@@ -334,19 +397,24 @@ extern int audit_set_macxattr(const char *name); | |||
334 | #define audit_syscall_exit(f,r) do { ; } while (0) | 397 | #define audit_syscall_exit(f,r) do { ; } while (0) |
335 | #define audit_getname(n) do { ; } while (0) | 398 | #define audit_getname(n) do { ; } while (0) |
336 | #define audit_putname(n) do { ; } while (0) | 399 | #define audit_putname(n) do { ; } while (0) |
337 | #define __audit_inode(n,i,f) do { ; } while (0) | 400 | #define __audit_inode(n,i) do { ; } while (0) |
338 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 401 | #define __audit_inode_child(d,i,p) do { ; } while (0) |
339 | #define audit_inode(n,i,f) do { ; } while (0) | 402 | #define audit_inode(n,i) do { ; } while (0) |
340 | #define audit_inode_child(d,i,p) do { ; } while (0) | 403 | #define audit_inode_child(d,i,p) do { ; } while (0) |
341 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 404 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
342 | #define audit_get_loginuid(c) ({ -1; }) | 405 | #define audit_get_loginuid(c) ({ -1; }) |
343 | #define audit_ipc_obj(i) ({ 0; }) | 406 | #define audit_ipc_obj(i) ({ 0; }) |
344 | #define audit_ipc_set_perm(q,u,g,m,i) ({ 0; }) | 407 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) |
408 | #define audit_bprm(p) ({ 0; }) | ||
345 | #define audit_socketcall(n,a) ({ 0; }) | 409 | #define audit_socketcall(n,a) ({ 0; }) |
346 | #define audit_sockaddr(len, addr) ({ 0; }) | 410 | #define audit_sockaddr(len, addr) ({ 0; }) |
347 | #define audit_avc_path(dentry, mnt) ({ 0; }) | 411 | #define audit_avc_path(dentry, mnt) ({ 0; }) |
348 | #define audit_signal_info(s,t) do { ; } while (0) | ||
349 | #define audit_set_macxattr(n) do { ; } while (0) | 412 | #define audit_set_macxattr(n) do { ; } while (0) |
413 | #define audit_mq_open(o,m,a) ({ 0; }) | ||
414 | #define audit_mq_timedsend(d,l,p,t) ({ 0; }) | ||
415 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | ||
416 | #define audit_mq_notify(d,n) ({ 0; }) | ||
417 | #define audit_mq_getsetattr(d,s) ({ 0; }) | ||
350 | #endif | 418 | #endif |
351 | 419 | ||
352 | #ifdef CONFIG_AUDIT | 420 | #ifdef CONFIG_AUDIT |
@@ -364,8 +432,11 @@ extern void audit_log_end(struct audit_buffer *ab); | |||
364 | extern void audit_log_hex(struct audit_buffer *ab, | 432 | extern void audit_log_hex(struct audit_buffer *ab, |
365 | const unsigned char *buf, | 433 | const unsigned char *buf, |
366 | size_t len); | 434 | size_t len); |
367 | extern void audit_log_untrustedstring(struct audit_buffer *ab, | 435 | extern const char * audit_log_untrustedstring(struct audit_buffer *ab, |
368 | const char *string); | 436 | const char *string); |
437 | extern const char * audit_log_n_untrustedstring(struct audit_buffer *ab, | ||
438 | size_t n, | ||
439 | const char *string); | ||
369 | extern void audit_log_d_path(struct audit_buffer *ab, | 440 | extern void audit_log_d_path(struct audit_buffer *ab, |
370 | const char *prefix, | 441 | const char *prefix, |
371 | struct dentry *dentry, | 442 | struct dentry *dentry, |
@@ -383,8 +454,8 @@ extern int audit_receive_filter(int type, int pid, int uid, int seq, | |||
383 | #define audit_log_end(b) do { ; } while (0) | 454 | #define audit_log_end(b) do { ; } while (0) |
384 | #define audit_log_hex(a,b,l) do { ; } while (0) | 455 | #define audit_log_hex(a,b,l) do { ; } while (0) |
385 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 456 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
457 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | ||
386 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) | 458 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) |
387 | #define audit_panic(m) do { ; } while (0) | ||
388 | #endif | 459 | #endif |
389 | #endif | 460 | #endif |
390 | #endif | 461 | #endif |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 59e1259b1c40..5d327313a9f7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_BLKDEV_H | 1 | #ifndef _LINUX_BLKDEV_H |
2 | #define _LINUX_BLKDEV_H | 2 | #define _LINUX_BLKDEV_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/major.h> | 4 | #include <linux/major.h> |
6 | #include <linux/genhd.h> | 5 | #include <linux/genhd.h> |
7 | #include <linux/list.h> | 6 | #include <linux/list.h> |
diff --git a/include/linux/blkpg.h b/include/linux/blkpg.h index be5d0f4ad24c..faf8a45af210 100644 --- a/include/linux/blkpg.h +++ b/include/linux/blkpg.h | |||
@@ -24,6 +24,7 @@ | |||
24 | * | 24 | * |
25 | * For today, only the partition stuff - aeb, 990515 | 25 | * For today, only the partition stuff - aeb, 990515 |
26 | */ | 26 | */ |
27 | #include <linux/compiler.h> | ||
27 | #include <linux/ioctl.h> | 28 | #include <linux/ioctl.h> |
28 | 29 | ||
29 | #define BLKPG _IO(0x12,105) | 30 | #define BLKPG _IO(0x12,105) |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index b34d3e73d5ea..eb1a867ed245 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef BLKTRACE_H | 1 | #ifndef BLKTRACE_H |
2 | #define BLKTRACE_H | 2 | #define BLKTRACE_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
6 | #include <linux/relay.h> | 5 | #include <linux/relay.h> |
7 | 6 | ||
diff --git a/include/linux/blockgroup_lock.h b/include/linux/blockgroup_lock.h index 0137ee5dd43c..8607312983bd 100644 --- a/include/linux/blockgroup_lock.h +++ b/include/linux/blockgroup_lock.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Simple hashed spinlocking. | 6 | * Simple hashed spinlocking. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
11 | #include <linux/cache.h> | 10 | #include <linux/cache.h> |
12 | 11 | ||
diff --git a/include/linux/cache.h b/include/linux/cache.h index cc4b3aafad9a..4552504c0228 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __LINUX_CACHE_H | 2 | #define __LINUX_CACHE_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/config.h> | ||
6 | #include <asm/cache.h> | 5 | #include <asm/cache.h> |
7 | 6 | ||
8 | #ifndef L1_CACHE_ALIGN | 7 | #ifndef L1_CACHE_ALIGN |
diff --git a/include/linux/coda.h b/include/linux/coda.h index bbc5afcd7db6..b5cf0780c51a 100644 --- a/include/linux/coda.h +++ b/include/linux/coda.h | |||
@@ -59,7 +59,6 @@ Mellon the rights to redistribute these changes without encumbrance. | |||
59 | #ifndef _CODA_HEADER_ | 59 | #ifndef _CODA_HEADER_ |
60 | #define _CODA_HEADER_ | 60 | #define _CODA_HEADER_ |
61 | 61 | ||
62 | #include <linux/config.h> | ||
63 | 62 | ||
64 | /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */ | 63 | /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */ |
65 | #if defined(__NetBSD__) || \ | 64 | #if defined(__NetBSD__) || \ |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 6d3a654be1ae..dda1697ec753 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -4,7 +4,6 @@ | |||
4 | * These are the type definitions for the architecture specific | 4 | * These are the type definitions for the architecture specific |
5 | * syscall compatibility layer. | 5 | * syscall compatibility layer. |
6 | */ | 6 | */ |
7 | #include <linux/config.h> | ||
8 | 7 | ||
9 | #ifdef CONFIG_COMPAT | 8 | #ifdef CONFIG_COMPAT |
10 | 9 | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index f23d3c6fc2c0..9b4f11094937 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -78,6 +78,7 @@ extern void __chk_io_ptr(void __iomem *); | |||
78 | 78 | ||
79 | #endif /* __ASSEMBLY__ */ | 79 | #endif /* __ASSEMBLY__ */ |
80 | 80 | ||
81 | #ifdef __KERNEL__ | ||
81 | /* | 82 | /* |
82 | * Allow us to mark functions as 'deprecated' and have gcc emit a nice | 83 | * Allow us to mark functions as 'deprecated' and have gcc emit a nice |
83 | * warning for each use, in hopes of speeding the functions removal. | 84 | * warning for each use, in hopes of speeding the functions removal. |
@@ -127,6 +128,16 @@ extern void __chk_io_ptr(void __iomem *); | |||
127 | # define __attribute_pure__ /* unimplemented */ | 128 | # define __attribute_pure__ /* unimplemented */ |
128 | #endif | 129 | #endif |
129 | 130 | ||
131 | #ifndef noinline | ||
132 | #define noinline | ||
133 | #endif | ||
134 | |||
135 | #ifndef __always_inline | ||
136 | #define __always_inline inline | ||
137 | #endif | ||
138 | |||
139 | #endif /* __KERNEL__ */ | ||
140 | |||
130 | /* | 141 | /* |
131 | * From the GCC manual: | 142 | * From the GCC manual: |
132 | * | 143 | * |
@@ -145,12 +156,4 @@ extern void __chk_io_ptr(void __iomem *); | |||
145 | # define __attribute_const__ /* unimplemented */ | 156 | # define __attribute_const__ /* unimplemented */ |
146 | #endif | 157 | #endif |
147 | 158 | ||
148 | #ifndef noinline | ||
149 | #define noinline | ||
150 | #endif | ||
151 | |||
152 | #ifndef __always_inline | ||
153 | #define __always_inline inline | ||
154 | #endif | ||
155 | |||
156 | #endif /* __LINUX_COMPILER_H */ | 159 | #endif /* __LINUX_COMPILER_H */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 17866d7e2b71..5aa95011f7e6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #define _LINUX_CPUFREQ_H | 15 | #define _LINUX_CPUFREQ_H |
16 | 16 | ||
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/config.h> | ||
19 | #include <linux/notifier.h> | 18 | #include <linux/notifier.h> |
20 | #include <linux/threads.h> | 19 | #include <linux/threads.h> |
21 | #include <linux/device.h> | 20 | #include <linux/device.h> |
diff --git a/include/linux/cramfs_fs.h b/include/linux/cramfs_fs.h index a8948f34b776..a41f38428c37 100644 --- a/include/linux/cramfs_fs.h +++ b/include/linux/cramfs_fs.h | |||
@@ -1,13 +1,7 @@ | |||
1 | #ifndef __CRAMFS_H | 1 | #ifndef __CRAMFS_H |
2 | #define __CRAMFS_H | 2 | #define __CRAMFS_H |
3 | 3 | ||
4 | #ifndef __KERNEL__ | 4 | #include <linux/types.h> |
5 | |||
6 | typedef unsigned char u8; | ||
7 | typedef unsigned short u16; | ||
8 | typedef unsigned int u32; | ||
9 | |||
10 | #endif | ||
11 | 5 | ||
12 | #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ | 6 | #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ |
13 | #define CRAMFS_SIGNATURE "Compressed ROMFS" | 7 | #define CRAMFS_SIGNATURE "Compressed ROMFS" |
@@ -33,9 +27,9 @@ typedef unsigned int u32; | |||
33 | * Reasonably terse representation of the inode data. | 27 | * Reasonably terse representation of the inode data. |
34 | */ | 28 | */ |
35 | struct cramfs_inode { | 29 | struct cramfs_inode { |
36 | u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH; | 30 | __u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH; |
37 | /* SIZE for device files is i_rdev */ | 31 | /* SIZE for device files is i_rdev */ |
38 | u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; | 32 | __u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; |
39 | /* NAMELEN is the length of the file name, divided by 4 and | 33 | /* NAMELEN is the length of the file name, divided by 4 and |
40 | rounded up. (cramfs doesn't support hard links.) */ | 34 | rounded up. (cramfs doesn't support hard links.) */ |
41 | /* OFFSET: For symlinks and non-empty regular files, this | 35 | /* OFFSET: For symlinks and non-empty regular files, this |
@@ -44,27 +38,27 @@ struct cramfs_inode { | |||
44 | see README). For non-empty directories it is the offset | 38 | see README). For non-empty directories it is the offset |
45 | (divided by 4) of the inode of the first file in that | 39 | (divided by 4) of the inode of the first file in that |
46 | directory. For anything else, offset is zero. */ | 40 | directory. For anything else, offset is zero. */ |
47 | u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH; | 41 | __u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH; |
48 | }; | 42 | }; |
49 | 43 | ||
50 | struct cramfs_info { | 44 | struct cramfs_info { |
51 | u32 crc; | 45 | __u32 crc; |
52 | u32 edition; | 46 | __u32 edition; |
53 | u32 blocks; | 47 | __u32 blocks; |
54 | u32 files; | 48 | __u32 files; |
55 | }; | 49 | }; |
56 | 50 | ||
57 | /* | 51 | /* |
58 | * Superblock information at the beginning of the FS. | 52 | * Superblock information at the beginning of the FS. |
59 | */ | 53 | */ |
60 | struct cramfs_super { | 54 | struct cramfs_super { |
61 | u32 magic; /* 0x28cd3d45 - random number */ | 55 | __u32 magic; /* 0x28cd3d45 - random number */ |
62 | u32 size; /* length in bytes */ | 56 | __u32 size; /* length in bytes */ |
63 | u32 flags; /* feature flags */ | 57 | __u32 flags; /* feature flags */ |
64 | u32 future; /* reserved for future use */ | 58 | __u32 future; /* reserved for future use */ |
65 | u8 signature[16]; /* "Compressed ROMFS" */ | 59 | __u8 signature[16]; /* "Compressed ROMFS" */ |
66 | struct cramfs_info fsid; /* unique filesystem info */ | 60 | struct cramfs_info fsid; /* unique filesystem info */ |
67 | u8 name[16]; /* user-defined name */ | 61 | __u8 name[16]; /* user-defined name */ |
68 | struct cramfs_inode root; /* root inode data */ | 62 | struct cramfs_inode root; /* root inode data */ |
69 | }; | 63 | }; |
70 | 64 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 0ab1bc1152ca..5a0470e36111 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #ifndef _LINUX_CRYPTO_H | 17 | #ifndef _LINUX_CRYPTO_H |
18 | #define _LINUX_CRYPTO_H | 18 | #define _LINUX_CRYPTO_H |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h index 300d704bdb9a..b88f7f428e58 100644 --- a/include/linux/cyclomx.h +++ b/include/linux/cyclomx.h | |||
@@ -24,7 +24,6 @@ | |||
24 | * 1998/08/08 acme Version 0.0.1 | 24 | * 1998/08/08 acme Version 0.0.1 |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/wanrouter.h> | 27 | #include <linux/wanrouter.h> |
29 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
30 | 29 | ||
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index 1d68428c925d..0fe7cdf326f7 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #ifndef DCOOKIES_H | 9 | #ifndef DCOOKIES_H |
10 | #define DCOOKIES_H | 10 | #define DCOOKIES_H |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | #ifdef CONFIG_PROFILING | 13 | #ifdef CONFIG_PROFILING |
15 | 14 | ||
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index 89810e73d256..0d74a6f22abc 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_DEVFS_FS_KERNEL_H | 2 | #define _LINUX_DEVFS_FS_KERNEL_H |
3 | 3 | ||
4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
5 | #include <linux/config.h> | ||
6 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
7 | #include <linux/types.h> | 6 | #include <linux/types.h> |
8 | 7 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index e8e53b9accc6..b2e5da2b637b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _DEVICE_H_ | 11 | #ifndef _DEVICE_H_ |
12 | #define _DEVICE_H_ | 12 | #define _DEVICE_H_ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
16 | #include <linux/kobject.h> | 15 | #include <linux/kobject.h> |
17 | #include <linux/klist.h> | 16 | #include <linux/klist.h> |
diff --git a/include/linux/divert.h b/include/linux/divert.h index 6919b09133d4..8fb4e9de6843 100644 --- a/include/linux/divert.h +++ b/include/linux/divert.h | |||
@@ -27,10 +27,10 @@ struct divert_blk | |||
27 | { | 27 | { |
28 | int divert; /* are we active */ | 28 | int divert; /* are we active */ |
29 | unsigned int protos; /* protocols */ | 29 | unsigned int protos; /* protocols */ |
30 | u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */ | 30 | __u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */ |
31 | u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */ | 31 | __u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */ |
32 | u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */ | 32 | __u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */ |
33 | u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */ | 33 | __u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */ |
34 | }; | 34 | }; |
35 | 35 | ||
36 | /* | 36 | /* |
@@ -40,12 +40,12 @@ struct divert_blk | |||
40 | 40 | ||
41 | typedef union _divert_cf_arg | 41 | typedef union _divert_cf_arg |
42 | { | 42 | { |
43 | s16 int16; | 43 | __s16 int16; |
44 | u16 uint16; | 44 | __u16 uint16; |
45 | s32 int32; | 45 | __s32 int32; |
46 | u32 uint32; | 46 | __u32 uint32; |
47 | s64 int64; | 47 | __s64 int64; |
48 | u64 uint64; | 48 | __u64 uint64; |
49 | void __user *ptr; | 49 | void __user *ptr; |
50 | } divert_cf_arg; | 50 | } divert_cf_arg; |
51 | 51 | ||
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 64fd6c366604..b2cd2071d432 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __DMI_H__ | 2 | #define __DMI_H__ |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/config.h> | ||
6 | 5 | ||
7 | enum dmi_field { | 6 | enum dmi_field { |
8 | DMI_NONE, | 7 | DMI_NONE, |
diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h index f134a01975c7..102a902b4396 100644 --- a/include/linux/dnotify.h +++ b/include/linux/dnotify.h | |||
@@ -18,7 +18,6 @@ struct dnotify_struct { | |||
18 | 18 | ||
19 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | 21 | ||
23 | #ifdef CONFIG_DNOTIFY | 22 | #ifdef CONFIG_DNOTIFY |
24 | 23 | ||
diff --git a/include/linux/elf-em.h b/include/linux/elf-em.h new file mode 100644 index 000000000000..114a96d25652 --- /dev/null +++ b/include/linux/elf-em.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef _LINUX_ELF_EM_H | ||
2 | #define _LINUX_ELF_EM_H | ||
3 | |||
4 | /* These constants define the various ELF target machines */ | ||
5 | #define EM_NONE 0 | ||
6 | #define EM_M32 1 | ||
7 | #define EM_SPARC 2 | ||
8 | #define EM_386 3 | ||
9 | #define EM_68K 4 | ||
10 | #define EM_88K 5 | ||
11 | #define EM_486 6 /* Perhaps disused */ | ||
12 | #define EM_860 7 | ||
13 | #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ | ||
14 | #define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ | ||
15 | #define EM_PARISC 15 /* HPPA */ | ||
16 | #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ | ||
17 | #define EM_PPC 20 /* PowerPC */ | ||
18 | #define EM_PPC64 21 /* PowerPC64 */ | ||
19 | #define EM_SH 42 /* SuperH */ | ||
20 | #define EM_SPARCV9 43 /* SPARC v9 64-bit */ | ||
21 | #define EM_IA_64 50 /* HP/Intel IA-64 */ | ||
22 | #define EM_X86_64 62 /* AMD x86-64 */ | ||
23 | #define EM_S390 22 /* IBM S/390 */ | ||
24 | #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ | ||
25 | #define EM_V850 87 /* NEC v850 */ | ||
26 | #define EM_M32R 88 /* Renesas M32R */ | ||
27 | #define EM_H8_300 46 /* Renesas H8/300,300H,H8S */ | ||
28 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ | ||
29 | |||
30 | /* | ||
31 | * This is an interim value that we will use until the committee comes | ||
32 | * up with a final number. | ||
33 | */ | ||
34 | #define EM_ALPHA 0x9026 | ||
35 | |||
36 | /* Bogus old v850 magic number, used by old tools. */ | ||
37 | #define EM_CYGNUS_V850 0x9080 | ||
38 | /* Bogus old m32r magic number, used by old tools. */ | ||
39 | #define EM_CYGNUS_M32R 0x9041 | ||
40 | /* This is the old interim value for S/390 architecture */ | ||
41 | #define EM_S390_OLD 0xA390 | ||
42 | |||
43 | |||
44 | #endif /* _LINUX_ELF_EM_H */ | ||
diff --git a/include/linux/elf.h b/include/linux/elf.h index d3bfacb24496..b70d1d2c8d28 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/auxvec.h> | 5 | #include <linux/auxvec.h> |
6 | #include <linux/elf-em.h> | ||
6 | #include <asm/elf.h> | 7 | #include <asm/elf.h> |
7 | 8 | ||
8 | #ifndef elf_read_implies_exec | 9 | #ifndef elf_read_implies_exec |
@@ -55,64 +56,6 @@ typedef __s64 Elf64_Sxword; | |||
55 | #define ET_LOPROC 0xff00 | 56 | #define ET_LOPROC 0xff00 |
56 | #define ET_HIPROC 0xffff | 57 | #define ET_HIPROC 0xffff |
57 | 58 | ||
58 | /* These constants define the various ELF target machines */ | ||
59 | #define EM_NONE 0 | ||
60 | #define EM_M32 1 | ||
61 | #define EM_SPARC 2 | ||
62 | #define EM_386 3 | ||
63 | #define EM_68K 4 | ||
64 | #define EM_88K 5 | ||
65 | #define EM_486 6 /* Perhaps disused */ | ||
66 | #define EM_860 7 | ||
67 | |||
68 | #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ | ||
69 | |||
70 | #define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ | ||
71 | |||
72 | #define EM_PARISC 15 /* HPPA */ | ||
73 | |||
74 | #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ | ||
75 | |||
76 | #define EM_PPC 20 /* PowerPC */ | ||
77 | #define EM_PPC64 21 /* PowerPC64 */ | ||
78 | |||
79 | #define EM_SH 42 /* SuperH */ | ||
80 | |||
81 | #define EM_SPARCV9 43 /* SPARC v9 64-bit */ | ||
82 | |||
83 | #define EM_IA_64 50 /* HP/Intel IA-64 */ | ||
84 | |||
85 | #define EM_X86_64 62 /* AMD x86-64 */ | ||
86 | |||
87 | #define EM_S390 22 /* IBM S/390 */ | ||
88 | |||
89 | #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ | ||
90 | |||
91 | #define EM_V850 87 /* NEC v850 */ | ||
92 | |||
93 | #define EM_M32R 88 /* Renesas M32R */ | ||
94 | |||
95 | #define EM_H8_300 46 /* Renesas H8/300,300H,H8S */ | ||
96 | |||
97 | /* | ||
98 | * This is an interim value that we will use until the committee comes | ||
99 | * up with a final number. | ||
100 | */ | ||
101 | #define EM_ALPHA 0x9026 | ||
102 | |||
103 | /* Bogus old v850 magic number, used by old tools. */ | ||
104 | #define EM_CYGNUS_V850 0x9080 | ||
105 | |||
106 | /* Bogus old m32r magic number, used by old tools. */ | ||
107 | #define EM_CYGNUS_M32R 0x9041 | ||
108 | |||
109 | /* | ||
110 | * This is the old interim value for S/390 architecture | ||
111 | */ | ||
112 | #define EM_S390_OLD 0xA390 | ||
113 | |||
114 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ | ||
115 | |||
116 | /* This is the info that is needed to parse the dynamic section of the file */ | 59 | /* This is the info that is needed to parse the dynamic section of the file */ |
117 | #define DT_NULL 0 | 60 | #define DT_NULL 0 |
118 | #define DT_NEEDED 1 | 61 | #define DT_NEEDED 1 |
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index 174582fedb8b..408118a07763 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h | |||
@@ -21,7 +21,6 @@ struct sock_extended_err | |||
21 | 21 | ||
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <net/ip.h> | 24 | #include <net/ip.h> |
26 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 25 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) |
27 | #include <linux/ipv6.h> | 26 | #include <linux/ipv6.h> |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 93535f093216..cf2abeca92a0 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -15,24 +15,24 @@ | |||
15 | 15 | ||
16 | /* This should work for both 32 and 64 bit userland. */ | 16 | /* This should work for both 32 and 64 bit userland. */ |
17 | struct ethtool_cmd { | 17 | struct ethtool_cmd { |
18 | u32 cmd; | 18 | __u32 cmd; |
19 | u32 supported; /* Features this interface supports */ | 19 | __u32 supported; /* Features this interface supports */ |
20 | u32 advertising; /* Features this interface advertises */ | 20 | __u32 advertising; /* Features this interface advertises */ |
21 | u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ | 21 | __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ |
22 | u8 duplex; /* Duplex, half or full */ | 22 | __u8 duplex; /* Duplex, half or full */ |
23 | u8 port; /* Which connector port */ | 23 | __u8 port; /* Which connector port */ |
24 | u8 phy_address; | 24 | __u8 phy_address; |
25 | u8 transceiver; /* Which transceiver to use */ | 25 | __u8 transceiver; /* Which transceiver to use */ |
26 | u8 autoneg; /* Enable or disable autonegotiation */ | 26 | __u8 autoneg; /* Enable or disable autonegotiation */ |
27 | u32 maxtxpkt; /* Tx pkts before generating tx int */ | 27 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ |
28 | u32 maxrxpkt; /* Rx pkts before generating rx int */ | 28 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ |
29 | u32 reserved[4]; | 29 | __u32 reserved[4]; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | #define ETHTOOL_BUSINFO_LEN 32 | 32 | #define ETHTOOL_BUSINFO_LEN 32 |
33 | /* these strings are set to whatever the driver author decides... */ | 33 | /* these strings are set to whatever the driver author decides... */ |
34 | struct ethtool_drvinfo { | 34 | struct ethtool_drvinfo { |
35 | u32 cmd; | 35 | __u32 cmd; |
36 | char driver[32]; /* driver short name, "tulip", "eepro100" */ | 36 | char driver[32]; /* driver short name, "tulip", "eepro100" */ |
37 | char version[32]; /* driver version string */ | 37 | char version[32]; /* driver version string */ |
38 | char fw_version[32]; /* firmware version string, if applicable */ | 38 | char fw_version[32]; /* firmware version string, if applicable */ |
@@ -40,53 +40,53 @@ struct ethtool_drvinfo { | |||
40 | /* For PCI devices, use pci_name(pci_dev). */ | 40 | /* For PCI devices, use pci_name(pci_dev). */ |
41 | char reserved1[32]; | 41 | char reserved1[32]; |
42 | char reserved2[16]; | 42 | char reserved2[16]; |
43 | u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ | 43 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ |
44 | u32 testinfo_len; | 44 | __u32 testinfo_len; |
45 | u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ | 45 | __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ |
46 | u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ | 46 | __u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #define SOPASS_MAX 6 | 49 | #define SOPASS_MAX 6 |
50 | /* wake-on-lan settings */ | 50 | /* wake-on-lan settings */ |
51 | struct ethtool_wolinfo { | 51 | struct ethtool_wolinfo { |
52 | u32 cmd; | 52 | __u32 cmd; |
53 | u32 supported; | 53 | __u32 supported; |
54 | u32 wolopts; | 54 | __u32 wolopts; |
55 | u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */ | 55 | __u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* for passing single values */ | 58 | /* for passing single values */ |
59 | struct ethtool_value { | 59 | struct ethtool_value { |
60 | u32 cmd; | 60 | __u32 cmd; |
61 | u32 data; | 61 | __u32 data; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /* for passing big chunks of data */ | 64 | /* for passing big chunks of data */ |
65 | struct ethtool_regs { | 65 | struct ethtool_regs { |
66 | u32 cmd; | 66 | __u32 cmd; |
67 | u32 version; /* driver-specific, indicates different chips/revs */ | 67 | __u32 version; /* driver-specific, indicates different chips/revs */ |
68 | u32 len; /* bytes */ | 68 | __u32 len; /* bytes */ |
69 | u8 data[0]; | 69 | __u8 data[0]; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | /* for passing EEPROM chunks */ | 72 | /* for passing EEPROM chunks */ |
73 | struct ethtool_eeprom { | 73 | struct ethtool_eeprom { |
74 | u32 cmd; | 74 | __u32 cmd; |
75 | u32 magic; | 75 | __u32 magic; |
76 | u32 offset; /* in bytes */ | 76 | __u32 offset; /* in bytes */ |
77 | u32 len; /* in bytes */ | 77 | __u32 len; /* in bytes */ |
78 | u8 data[0]; | 78 | __u8 data[0]; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /* for configuring coalescing parameters of chip */ | 81 | /* for configuring coalescing parameters of chip */ |
82 | struct ethtool_coalesce { | 82 | struct ethtool_coalesce { |
83 | u32 cmd; /* ETHTOOL_{G,S}COALESCE */ | 83 | __u32 cmd; /* ETHTOOL_{G,S}COALESCE */ |
84 | 84 | ||
85 | /* How many usecs to delay an RX interrupt after | 85 | /* How many usecs to delay an RX interrupt after |
86 | * a packet arrives. If 0, only rx_max_coalesced_frames | 86 | * a packet arrives. If 0, only rx_max_coalesced_frames |
87 | * is used. | 87 | * is used. |
88 | */ | 88 | */ |
89 | u32 rx_coalesce_usecs; | 89 | __u32 rx_coalesce_usecs; |
90 | 90 | ||
91 | /* How many packets to delay an RX interrupt after | 91 | /* How many packets to delay an RX interrupt after |
92 | * a packet arrives. If 0, only rx_coalesce_usecs is | 92 | * a packet arrives. If 0, only rx_coalesce_usecs is |
@@ -94,21 +94,21 @@ struct ethtool_coalesce { | |||
94 | * to zero as this would cause RX interrupts to never be | 94 | * to zero as this would cause RX interrupts to never be |
95 | * generated. | 95 | * generated. |
96 | */ | 96 | */ |
97 | u32 rx_max_coalesced_frames; | 97 | __u32 rx_max_coalesced_frames; |
98 | 98 | ||
99 | /* Same as above two parameters, except that these values | 99 | /* Same as above two parameters, except that these values |
100 | * apply while an IRQ is being serviced by the host. Not | 100 | * apply while an IRQ is being serviced by the host. Not |
101 | * all cards support this feature and the values are ignored | 101 | * all cards support this feature and the values are ignored |
102 | * in that case. | 102 | * in that case. |
103 | */ | 103 | */ |
104 | u32 rx_coalesce_usecs_irq; | 104 | __u32 rx_coalesce_usecs_irq; |
105 | u32 rx_max_coalesced_frames_irq; | 105 | __u32 rx_max_coalesced_frames_irq; |
106 | 106 | ||
107 | /* How many usecs to delay a TX interrupt after | 107 | /* How many usecs to delay a TX interrupt after |
108 | * a packet is sent. If 0, only tx_max_coalesced_frames | 108 | * a packet is sent. If 0, only tx_max_coalesced_frames |
109 | * is used. | 109 | * is used. |
110 | */ | 110 | */ |
111 | u32 tx_coalesce_usecs; | 111 | __u32 tx_coalesce_usecs; |
112 | 112 | ||
113 | /* How many packets to delay a TX interrupt after | 113 | /* How many packets to delay a TX interrupt after |
114 | * a packet is sent. If 0, only tx_coalesce_usecs is | 114 | * a packet is sent. If 0, only tx_coalesce_usecs is |
@@ -116,22 +116,22 @@ struct ethtool_coalesce { | |||
116 | * to zero as this would cause TX interrupts to never be | 116 | * to zero as this would cause TX interrupts to never be |
117 | * generated. | 117 | * generated. |
118 | */ | 118 | */ |
119 | u32 tx_max_coalesced_frames; | 119 | __u32 tx_max_coalesced_frames; |
120 | 120 | ||
121 | /* Same as above two parameters, except that these values | 121 | /* Same as above two parameters, except that these values |
122 | * apply while an IRQ is being serviced by the host. Not | 122 | * apply while an IRQ is being serviced by the host. Not |
123 | * all cards support this feature and the values are ignored | 123 | * all cards support this feature and the values are ignored |
124 | * in that case. | 124 | * in that case. |
125 | */ | 125 | */ |
126 | u32 tx_coalesce_usecs_irq; | 126 | __u32 tx_coalesce_usecs_irq; |
127 | u32 tx_max_coalesced_frames_irq; | 127 | __u32 tx_max_coalesced_frames_irq; |
128 | 128 | ||
129 | /* How many usecs to delay in-memory statistics | 129 | /* How many usecs to delay in-memory statistics |
130 | * block updates. Some drivers do not have an in-memory | 130 | * block updates. Some drivers do not have an in-memory |
131 | * statistic block, and in such cases this value is ignored. | 131 | * statistic block, and in such cases this value is ignored. |
132 | * This value must not be zero. | 132 | * This value must not be zero. |
133 | */ | 133 | */ |
134 | u32 stats_block_coalesce_usecs; | 134 | __u32 stats_block_coalesce_usecs; |
135 | 135 | ||
136 | /* Adaptive RX/TX coalescing is an algorithm implemented by | 136 | /* Adaptive RX/TX coalescing is an algorithm implemented by |
137 | * some drivers to improve latency under low packet rates and | 137 | * some drivers to improve latency under low packet rates and |
@@ -140,18 +140,18 @@ struct ethtool_coalesce { | |||
140 | * not implemented by the driver causes these values to be | 140 | * not implemented by the driver causes these values to be |
141 | * silently ignored. | 141 | * silently ignored. |
142 | */ | 142 | */ |
143 | u32 use_adaptive_rx_coalesce; | 143 | __u32 use_adaptive_rx_coalesce; |
144 | u32 use_adaptive_tx_coalesce; | 144 | __u32 use_adaptive_tx_coalesce; |
145 | 145 | ||
146 | /* When the packet rate (measured in packets per second) | 146 | /* When the packet rate (measured in packets per second) |
147 | * is below pkt_rate_low, the {rx,tx}_*_low parameters are | 147 | * is below pkt_rate_low, the {rx,tx}_*_low parameters are |
148 | * used. | 148 | * used. |
149 | */ | 149 | */ |
150 | u32 pkt_rate_low; | 150 | __u32 pkt_rate_low; |
151 | u32 rx_coalesce_usecs_low; | 151 | __u32 rx_coalesce_usecs_low; |
152 | u32 rx_max_coalesced_frames_low; | 152 | __u32 rx_max_coalesced_frames_low; |
153 | u32 tx_coalesce_usecs_low; | 153 | __u32 tx_coalesce_usecs_low; |
154 | u32 tx_max_coalesced_frames_low; | 154 | __u32 tx_max_coalesced_frames_low; |
155 | 155 | ||
156 | /* When the packet rate is below pkt_rate_high but above | 156 | /* When the packet rate is below pkt_rate_high but above |
157 | * pkt_rate_low (both measured in packets per second) the | 157 | * pkt_rate_low (both measured in packets per second) the |
@@ -162,43 +162,43 @@ struct ethtool_coalesce { | |||
162 | * is above pkt_rate_high, the {rx,tx}_*_high parameters are | 162 | * is above pkt_rate_high, the {rx,tx}_*_high parameters are |
163 | * used. | 163 | * used. |
164 | */ | 164 | */ |
165 | u32 pkt_rate_high; | 165 | __u32 pkt_rate_high; |
166 | u32 rx_coalesce_usecs_high; | 166 | __u32 rx_coalesce_usecs_high; |
167 | u32 rx_max_coalesced_frames_high; | 167 | __u32 rx_max_coalesced_frames_high; |
168 | u32 tx_coalesce_usecs_high; | 168 | __u32 tx_coalesce_usecs_high; |
169 | u32 tx_max_coalesced_frames_high; | 169 | __u32 tx_max_coalesced_frames_high; |
170 | 170 | ||
171 | /* How often to do adaptive coalescing packet rate sampling, | 171 | /* How often to do adaptive coalescing packet rate sampling, |
172 | * measured in seconds. Must not be zero. | 172 | * measured in seconds. Must not be zero. |
173 | */ | 173 | */ |
174 | u32 rate_sample_interval; | 174 | __u32 rate_sample_interval; |
175 | }; | 175 | }; |
176 | 176 | ||
177 | /* for configuring RX/TX ring parameters */ | 177 | /* for configuring RX/TX ring parameters */ |
178 | struct ethtool_ringparam { | 178 | struct ethtool_ringparam { |
179 | u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */ | 179 | __u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */ |
180 | 180 | ||
181 | /* Read only attributes. These indicate the maximum number | 181 | /* Read only attributes. These indicate the maximum number |
182 | * of pending RX/TX ring entries the driver will allow the | 182 | * of pending RX/TX ring entries the driver will allow the |
183 | * user to set. | 183 | * user to set. |
184 | */ | 184 | */ |
185 | u32 rx_max_pending; | 185 | __u32 rx_max_pending; |
186 | u32 rx_mini_max_pending; | 186 | __u32 rx_mini_max_pending; |
187 | u32 rx_jumbo_max_pending; | 187 | __u32 rx_jumbo_max_pending; |
188 | u32 tx_max_pending; | 188 | __u32 tx_max_pending; |
189 | 189 | ||
190 | /* Values changeable by the user. The valid values are | 190 | /* Values changeable by the user. The valid values are |
191 | * in the range 1 to the "*_max_pending" counterpart above. | 191 | * in the range 1 to the "*_max_pending" counterpart above. |
192 | */ | 192 | */ |
193 | u32 rx_pending; | 193 | __u32 rx_pending; |
194 | u32 rx_mini_pending; | 194 | __u32 rx_mini_pending; |
195 | u32 rx_jumbo_pending; | 195 | __u32 rx_jumbo_pending; |
196 | u32 tx_pending; | 196 | __u32 tx_pending; |
197 | }; | 197 | }; |
198 | 198 | ||
199 | /* for configuring link flow control parameters */ | 199 | /* for configuring link flow control parameters */ |
200 | struct ethtool_pauseparam { | 200 | struct ethtool_pauseparam { |
201 | u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ | 201 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ |
202 | 202 | ||
203 | /* If the link is being auto-negotiated (via ethtool_cmd.autoneg | 203 | /* If the link is being auto-negotiated (via ethtool_cmd.autoneg |
204 | * being true) the user may set 'autonet' here non-zero to have the | 204 | * being true) the user may set 'autonet' here non-zero to have the |
@@ -210,9 +210,9 @@ struct ethtool_pauseparam { | |||
210 | * then {rx,tx}_pause force the driver to use/not-use pause | 210 | * then {rx,tx}_pause force the driver to use/not-use pause |
211 | * flow control. | 211 | * flow control. |
212 | */ | 212 | */ |
213 | u32 autoneg; | 213 | __u32 autoneg; |
214 | u32 rx_pause; | 214 | __u32 rx_pause; |
215 | u32 tx_pause; | 215 | __u32 tx_pause; |
216 | }; | 216 | }; |
217 | 217 | ||
218 | #define ETH_GSTRING_LEN 32 | 218 | #define ETH_GSTRING_LEN 32 |
@@ -223,10 +223,10 @@ enum ethtool_stringset { | |||
223 | 223 | ||
224 | /* for passing string sets for data tagging */ | 224 | /* for passing string sets for data tagging */ |
225 | struct ethtool_gstrings { | 225 | struct ethtool_gstrings { |
226 | u32 cmd; /* ETHTOOL_GSTRINGS */ | 226 | __u32 cmd; /* ETHTOOL_GSTRINGS */ |
227 | u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/ | 227 | __u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/ |
228 | u32 len; /* number of strings in the string set */ | 228 | __u32 len; /* number of strings in the string set */ |
229 | u8 data[0]; | 229 | __u8 data[0]; |
230 | }; | 230 | }; |
231 | 231 | ||
232 | enum ethtool_test_flags { | 232 | enum ethtool_test_flags { |
@@ -236,26 +236,28 @@ enum ethtool_test_flags { | |||
236 | 236 | ||
237 | /* for requesting NIC test and getting results*/ | 237 | /* for requesting NIC test and getting results*/ |
238 | struct ethtool_test { | 238 | struct ethtool_test { |
239 | u32 cmd; /* ETHTOOL_TEST */ | 239 | __u32 cmd; /* ETHTOOL_TEST */ |
240 | u32 flags; /* ETH_TEST_FL_xxx */ | 240 | __u32 flags; /* ETH_TEST_FL_xxx */ |
241 | u32 reserved; | 241 | __u32 reserved; |
242 | u32 len; /* result length, in number of u64 elements */ | 242 | __u32 len; /* result length, in number of u64 elements */ |
243 | u64 data[0]; | 243 | __u64 data[0]; |
244 | }; | 244 | }; |
245 | 245 | ||
246 | /* for dumping NIC-specific statistics */ | 246 | /* for dumping NIC-specific statistics */ |
247 | struct ethtool_stats { | 247 | struct ethtool_stats { |
248 | u32 cmd; /* ETHTOOL_GSTATS */ | 248 | __u32 cmd; /* ETHTOOL_GSTATS */ |
249 | u32 n_stats; /* number of u64's being returned */ | 249 | __u32 n_stats; /* number of u64's being returned */ |
250 | u64 data[0]; | 250 | __u64 data[0]; |
251 | }; | 251 | }; |
252 | 252 | ||
253 | struct ethtool_perm_addr { | 253 | struct ethtool_perm_addr { |
254 | u32 cmd; /* ETHTOOL_GPERMADDR */ | 254 | __u32 cmd; /* ETHTOOL_GPERMADDR */ |
255 | u32 size; | 255 | __u32 size; |
256 | u8 data[0]; | 256 | __u8 data[0]; |
257 | }; | 257 | }; |
258 | 258 | ||
259 | #ifdef __KERNEL__ | ||
260 | |||
259 | struct net_device; | 261 | struct net_device; |
260 | 262 | ||
261 | /* Some generic methods drivers may use in their ethtool_ops */ | 263 | /* Some generic methods drivers may use in their ethtool_ops */ |
@@ -371,6 +373,7 @@ struct ethtool_ops { | |||
371 | u32 (*get_ufo)(struct net_device *); | 373 | u32 (*get_ufo)(struct net_device *); |
372 | int (*set_ufo)(struct net_device *, u32); | 374 | int (*set_ufo)(struct net_device *, u32); |
373 | }; | 375 | }; |
376 | #endif /* __KERNEL__ */ | ||
374 | 377 | ||
375 | /* CMDs currently supported */ | 378 | /* CMDs currently supported */ |
376 | #define ETHTOOL_GSET 0x00000001 /* Get settings. */ | 379 | #define ETHTOOL_GSET 0x00000001 /* Get settings. */ |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index f7bd1c7ebefb..facf34e98954 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define _LINUX_EXT2_FS_H | 17 | #define _LINUX_EXT2_FS_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/ext2_fs_sb.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * The second extended filesystem constants/structures | 22 | * The second extended filesystem constants/structures |
@@ -70,6 +69,7 @@ | |||
70 | #define EXT2_SUPER_MAGIC 0xEF53 | 69 | #define EXT2_SUPER_MAGIC 0xEF53 |
71 | 70 | ||
72 | #ifdef __KERNEL__ | 71 | #ifdef __KERNEL__ |
72 | #include <linux/ext2_fs_sb.h> | ||
73 | static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb) | 73 | static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb) |
74 | { | 74 | { |
75 | return sb->s_fs_info; | 75 | return sb->s_fs_info; |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 3ade6a4e3bdd..757d54d8f1a5 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -17,11 +17,6 @@ | |||
17 | #define _LINUX_EXT3_FS_H | 17 | #define _LINUX_EXT3_FS_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/ext3_fs_i.h> | ||
21 | #include <linux/ext3_fs_sb.h> | ||
22 | |||
23 | |||
24 | struct statfs; | ||
25 | 20 | ||
26 | /* | 21 | /* |
27 | * The second extended filesystem constants/structures | 22 | * The second extended filesystem constants/structures |
@@ -487,6 +482,8 @@ struct ext3_super_block { | |||
487 | }; | 482 | }; |
488 | 483 | ||
489 | #ifdef __KERNEL__ | 484 | #ifdef __KERNEL__ |
485 | #include <linux/ext3_fs_i.h> | ||
486 | #include <linux/ext3_fs_sb.h> | ||
490 | static inline struct ext3_sb_info * EXT3_SB(struct super_block *sb) | 487 | static inline struct ext3_sb_info * EXT3_SB(struct super_block *sb) |
491 | { | 488 | { |
492 | return sb->s_fs_info; | 489 | return sb->s_fs_info; |
@@ -664,6 +661,8 @@ struct ext3_dir_entry_2 { | |||
664 | #define DX_HASH_HALF_MD4 1 | 661 | #define DX_HASH_HALF_MD4 1 |
665 | #define DX_HASH_TEA 2 | 662 | #define DX_HASH_TEA 2 |
666 | 663 | ||
664 | #ifdef __KERNEL__ | ||
665 | |||
667 | /* hash info structure used by the directory hash */ | 666 | /* hash info structure used by the directory hash */ |
668 | struct dx_hash_info | 667 | struct dx_hash_info |
669 | { | 668 | { |
@@ -675,7 +674,6 @@ struct dx_hash_info | |||
675 | 674 | ||
676 | #define EXT3_HTREE_EOF 0x7fffffff | 675 | #define EXT3_HTREE_EOF 0x7fffffff |
677 | 676 | ||
678 | #ifdef __KERNEL__ | ||
679 | /* | 677 | /* |
680 | * Control parameters used by ext3_htree_next_block | 678 | * Control parameters used by ext3_htree_next_block |
681 | */ | 679 | */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1d80ba747484..2d5a112e8404 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * structures etc. | 6 | * structures etc. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/limits.h> | 9 | #include <linux/limits.h> |
11 | #include <linux/ioctl.h> | 10 | #include <linux/ioctl.h> |
12 | 11 | ||
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 11438eff4d44..cc5dec70c32c 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -54,19 +54,20 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
54 | 54 | ||
55 | if (isdir) | 55 | if (isdir) |
56 | isdir = IN_ISDIR; | 56 | isdir = IN_ISDIR; |
57 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name); | 57 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name, |
58 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name); | 58 | source); |
59 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name, | ||
60 | source); | ||
59 | 61 | ||
60 | if (target) { | 62 | if (target) { |
61 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); | 63 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL, NULL); |
62 | inotify_inode_is_dead(target); | 64 | inotify_inode_is_dead(target); |
63 | } | 65 | } |
64 | 66 | ||
65 | if (source) { | 67 | if (source) { |
66 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); | 68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
67 | } | 69 | } |
68 | audit_inode_child(old_name, source, old_dir->i_ino); | 70 | audit_inode_child(new_name, source, new_dir->i_ino); |
69 | audit_inode_child(new_name, target, new_dir->i_ino); | ||
70 | } | 71 | } |
71 | 72 | ||
72 | /* | 73 | /* |
@@ -85,7 +86,7 @@ static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) | |||
85 | */ | 86 | */ |
86 | static inline void fsnotify_inoderemove(struct inode *inode) | 87 | static inline void fsnotify_inoderemove(struct inode *inode) |
87 | { | 88 | { |
88 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); | 89 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL, NULL); |
89 | inotify_inode_is_dead(inode); | 90 | inotify_inode_is_dead(inode); |
90 | } | 91 | } |
91 | 92 | ||
@@ -95,7 +96,8 @@ static inline void fsnotify_inoderemove(struct inode *inode) | |||
95 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | 96 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) |
96 | { | 97 | { |
97 | inode_dir_notify(inode, DN_CREATE); | 98 | inode_dir_notify(inode, DN_CREATE); |
98 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name); | 99 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
100 | dentry->d_inode); | ||
99 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 101 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); |
100 | } | 102 | } |
101 | 103 | ||
@@ -106,7 +108,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
106 | { | 108 | { |
107 | inode_dir_notify(inode, DN_CREATE); | 109 | inode_dir_notify(inode, DN_CREATE); |
108 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, | 110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, |
109 | dentry->d_name.name); | 111 | dentry->d_name.name, dentry->d_inode); |
110 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 112 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); |
111 | } | 113 | } |
112 | 114 | ||
@@ -123,7 +125,7 @@ static inline void fsnotify_access(struct dentry *dentry) | |||
123 | 125 | ||
124 | dnotify_parent(dentry, DN_ACCESS); | 126 | dnotify_parent(dentry, DN_ACCESS); |
125 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 127 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
126 | inotify_inode_queue_event(inode, mask, 0, NULL); | 128 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
127 | } | 129 | } |
128 | 130 | ||
129 | /* | 131 | /* |
@@ -139,7 +141,7 @@ static inline void fsnotify_modify(struct dentry *dentry) | |||
139 | 141 | ||
140 | dnotify_parent(dentry, DN_MODIFY); | 142 | dnotify_parent(dentry, DN_MODIFY); |
141 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 143 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
142 | inotify_inode_queue_event(inode, mask, 0, NULL); | 144 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
143 | } | 145 | } |
144 | 146 | ||
145 | /* | 147 | /* |
@@ -154,7 +156,7 @@ static inline void fsnotify_open(struct dentry *dentry) | |||
154 | mask |= IN_ISDIR; | 156 | mask |= IN_ISDIR; |
155 | 157 | ||
156 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 158 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
157 | inotify_inode_queue_event(inode, mask, 0, NULL); | 159 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
158 | } | 160 | } |
159 | 161 | ||
160 | /* | 162 | /* |
@@ -172,7 +174,7 @@ static inline void fsnotify_close(struct file *file) | |||
172 | mask |= IN_ISDIR; | 174 | mask |= IN_ISDIR; |
173 | 175 | ||
174 | inotify_dentry_parent_queue_event(dentry, mask, 0, name); | 176 | inotify_dentry_parent_queue_event(dentry, mask, 0, name); |
175 | inotify_inode_queue_event(inode, mask, 0, NULL); | 177 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
176 | } | 178 | } |
177 | 179 | ||
178 | /* | 180 | /* |
@@ -187,7 +189,7 @@ static inline void fsnotify_xattr(struct dentry *dentry) | |||
187 | mask |= IN_ISDIR; | 189 | mask |= IN_ISDIR; |
188 | 190 | ||
189 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 191 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
190 | inotify_inode_queue_event(inode, mask, 0, NULL); | 192 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
191 | } | 193 | } |
192 | 194 | ||
193 | /* | 195 | /* |
@@ -234,7 +236,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) | |||
234 | if (in_mask) { | 236 | if (in_mask) { |
235 | if (S_ISDIR(inode->i_mode)) | 237 | if (S_ISDIR(inode->i_mode)) |
236 | in_mask |= IN_ISDIR; | 238 | in_mask |= IN_ISDIR; |
237 | inotify_inode_queue_event(inode, in_mask, 0, NULL); | 239 | inotify_inode_queue_event(inode, in_mask, 0, NULL, NULL); |
238 | inotify_dentry_parent_queue_event(dentry, in_mask, 0, | 240 | inotify_dentry_parent_queue_event(dentry, in_mask, 0, |
239 | dentry->d_name.name); | 241 | dentry->d_name.name); |
240 | } | 242 | } |
diff --git a/include/linux/ftape.h b/include/linux/ftape.h index 72faeec9f6e1..7e7038cba86a 100644 --- a/include/linux/ftape.h +++ b/include/linux/ftape.h | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #endif | 36 | #endif |
37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
38 | #include <linux/config.h> | ||
39 | #include <linux/mtio.h> | 38 | #include <linux/mtio.h> |
40 | 39 | ||
41 | #define FT_SECTOR(x) (x+1) /* sector offset into real sector */ | 40 | #define FT_SECTOR(x) (x+1) /* sector offset into real sector */ |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 71e7b2847cb3..2cdba0c23957 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -9,6 +9,7 @@ | |||
9 | * the Free Software Foundation. | 9 | * the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifdef __KERNEL__ | ||
12 | #include <asm/io.h> | 13 | #include <asm/io.h> |
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
@@ -154,6 +155,8 @@ static inline void gameport_register_driver(struct gameport_driver *drv) | |||
154 | 155 | ||
155 | void gameport_unregister_driver(struct gameport_driver *drv); | 156 | void gameport_unregister_driver(struct gameport_driver *drv); |
156 | 157 | ||
158 | #endif /* __KERNEL__ */ | ||
159 | |||
157 | #define GAMEPORT_MODE_DISABLED 0 | 160 | #define GAMEPORT_MODE_DISABLED 0 |
158 | #define GAMEPORT_MODE_RAW 1 | 161 | #define GAMEPORT_MODE_RAW 1 |
159 | #define GAMEPORT_MODE_COOKED 2 | 162 | #define GAMEPORT_MODE_COOKED 2 |
@@ -169,6 +172,8 @@ void gameport_unregister_driver(struct gameport_driver *drv); | |||
169 | #define GAMEPORT_ID_VENDOR_GRAVIS 0x0009 | 172 | #define GAMEPORT_ID_VENDOR_GRAVIS 0x0009 |
170 | #define GAMEPORT_ID_VENDOR_GUILLEMOT 0x000a | 173 | #define GAMEPORT_ID_VENDOR_GUILLEMOT 0x000a |
171 | 174 | ||
175 | #ifdef __KERNEL__ | ||
176 | |||
172 | static inline void gameport_trigger(struct gameport *gameport) | 177 | static inline void gameport_trigger(struct gameport *gameport) |
173 | { | 178 | { |
174 | if (gameport->trigger) | 179 | if (gameport->trigger) |
@@ -219,4 +224,5 @@ static inline void gameport_set_poll_interval(struct gameport *gameport, unsigne | |||
219 | void gameport_start_polling(struct gameport *gameport); | 224 | void gameport_start_polling(struct gameport *gameport); |
220 | void gameport_stop_polling(struct gameport *gameport); | 225 | void gameport_stop_polling(struct gameport *gameport); |
221 | 226 | ||
227 | #endif /* __KERNEL__ */ | ||
222 | #endif | 228 | #endif |
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index 652611a4bdcd..e25384561955 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef GENERIC_SERIAL_H | 12 | #ifndef GENERIC_SERIAL_H |
13 | #define GENERIC_SERIAL_H | 13 | #define GENERIC_SERIAL_H |
14 | 14 | ||
15 | #ifdef __KERNEL__ | ||
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
16 | 17 | ||
17 | struct real_driver { | 18 | struct real_driver { |
@@ -54,6 +55,7 @@ struct gs_port { | |||
54 | spinlock_t driver_lock; | 55 | spinlock_t driver_lock; |
55 | }; | 56 | }; |
56 | 57 | ||
58 | #endif /* __KERNEL__ */ | ||
57 | 59 | ||
58 | /* Flags */ | 60 | /* Flags */ |
59 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" | 61 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" |
@@ -75,7 +77,7 @@ struct gs_port { | |||
75 | #define GS_DEBUG_FLOW 0x00000020 | 77 | #define GS_DEBUG_FLOW 0x00000020 |
76 | #define GS_DEBUG_WRITE 0x00000040 | 78 | #define GS_DEBUG_WRITE 0x00000040 |
77 | 79 | ||
78 | 80 | #ifdef __KERNEL__ | |
79 | void gs_put_char(struct tty_struct *tty, unsigned char ch); | 81 | void gs_put_char(struct tty_struct *tty, unsigned char ch); |
80 | int gs_write(struct tty_struct *tty, | 82 | int gs_write(struct tty_struct *tty, |
81 | const unsigned char *buf, int count); | 83 | const unsigned char *buf, int count); |
@@ -94,5 +96,5 @@ int gs_init_port(struct gs_port *port); | |||
94 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); | 96 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); |
95 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); | 97 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); |
96 | void gs_got_break(struct gs_port *port); | 98 | void gs_got_break(struct gs_port *port); |
97 | 99 | #endif /* __KERNEL__ */ | |
98 | #endif | 100 | #endif |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 2ef845b35175..3498a0c68184 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -9,13 +9,7 @@ | |||
9 | * <drew@colorado.edu> | 9 | * <drew@colorado.edu> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/major.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/smp.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/fs.h> | ||
19 | 13 | ||
20 | enum { | 14 | enum { |
21 | /* These three have identical behaviour; use the second one if DOS FDISK gets | 15 | /* These three have identical behaviour; use the second one if DOS FDISK gets |
@@ -61,6 +55,12 @@ struct partition { | |||
61 | #endif | 55 | #endif |
62 | 56 | ||
63 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
58 | #include <linux/major.h> | ||
59 | #include <linux/device.h> | ||
60 | #include <linux/smp.h> | ||
61 | #include <linux/string.h> | ||
62 | #include <linux/fs.h> | ||
63 | |||
64 | struct partition { | 64 | struct partition { |
65 | unsigned char boot_ind; /* 0x80 - active */ | 65 | unsigned char boot_ind; /* 0x80 - active */ |
66 | unsigned char head; /* starting head */ | 66 | unsigned char head; /* starting head */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 3ac452945a7d..cc9e60844484 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <linux/mmzone.h> | 4 | #include <linux/mmzone.h> |
5 | #include <linux/stddef.h> | 5 | #include <linux/stddef.h> |
6 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
7 | #include <linux/config.h> | ||
8 | 7 | ||
9 | struct vm_area_struct; | 8 | struct vm_area_struct; |
10 | 9 | ||
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index eab537091f2a..114ae583cca9 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef LINUX_HARDIRQ_H | 1 | #ifndef LINUX_HARDIRQ_H |
2 | #define LINUX_HARDIRQ_H | 2 | #define LINUX_HARDIRQ_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
6 | #include <linux/smp_lock.h> | 5 | #include <linux/smp_lock.h> |
7 | #include <asm/hardirq.h> | 6 | #include <asm/hardirq.h> |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 892c4ea1b425..85ce7ef9a512 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_HIGHMEM_H | 1 | #ifndef _LINUX_HIGHMEM_H |
2 | #define _LINUX_HIGHMEM_H | 2 | #define _LINUX_HIGHMEM_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
6 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
7 | 6 | ||
diff --git a/include/linux/highuid.h b/include/linux/highuid.h index 53ecac3905e8..434e56246f67 100644 --- a/include/linux/highuid.h +++ b/include/linux/highuid.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_HIGHUID_H | 1 | #ifndef _LINUX_HIGHUID_H |
2 | #define _LINUX_HIGHUID_H | 2 | #define _LINUX_HIGHUID_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/types.h> | 4 | #include <linux/types.h> |
6 | 5 | ||
7 | /* | 6 | /* |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 306acf1dc6d5..7d2a1b974c5e 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -127,7 +127,7 @@ extern ktime_t hrtimer_get_next_event(void); | |||
127 | 127 | ||
128 | static inline int hrtimer_active(const struct hrtimer *timer) | 128 | static inline int hrtimer_active(const struct hrtimer *timer) |
129 | { | 129 | { |
130 | return timer->node.rb_parent != HRTIMER_INACTIVE; | 130 | return rb_parent(&timer->node) != &timer->node; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* Forward a hrtimer so it expires after now: */ | 133 | /* Forward a hrtimer so it expires after now: */ |
diff --git a/include/linux/i2c-algo-ite.h b/include/linux/i2c-algo-ite.h index 26a8b89855f1..0073fe96c76e 100644 --- a/include/linux/i2c-algo-ite.h +++ b/include/linux/i2c-algo-ite.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #ifndef I2C_ALGO_ITE_H | 29 | #ifndef I2C_ALGO_ITE_H |
30 | #define I2C_ALGO_ITE_H 1 | 30 | #define I2C_ALGO_ITE_H 1 |
31 | 31 | ||
32 | #include <linux/i2c.h> | 32 | #include <linux/types.h> |
33 | 33 | ||
34 | /* Example of a sequential read request: | 34 | /* Example of a sequential read request: |
35 | struct i2c_iic_msg s_msg; | 35 | struct i2c_iic_msg s_msg; |
@@ -49,6 +49,9 @@ struct i2c_iic_msg { | |||
49 | char *buf; /* pointer to msg data */ | 49 | char *buf; /* pointer to msg data */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #ifdef __KERNEL__ | ||
53 | struct i2c_adapter; | ||
54 | |||
52 | struct i2c_algo_iic_data { | 55 | struct i2c_algo_iic_data { |
53 | void *data; /* private data for lolevel routines */ | 56 | void *data; /* private data for lolevel routines */ |
54 | void (*setiic) (void *data, int ctl, int val); | 57 | void (*setiic) (void *data, int ctl, int val); |
@@ -65,5 +68,5 @@ struct i2c_algo_iic_data { | |||
65 | 68 | ||
66 | int i2c_iic_add_bus(struct i2c_adapter *); | 69 | int i2c_iic_add_bus(struct i2c_adapter *); |
67 | int i2c_iic_del_bus(struct i2c_adapter *); | 70 | int i2c_iic_del_bus(struct i2c_adapter *); |
68 | 71 | #endif /* __KERNEL__ */ | |
69 | #endif /* I2C_ALGO_ITE_H */ | 72 | #endif /* I2C_ALGO_ITE_H */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 1635ee25918f..0510430e00db 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -20,14 +20,15 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
21 | /* ------------------------------------------------------------------------- */ | 21 | /* ------------------------------------------------------------------------- */ |
22 | 22 | ||
23 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and | 23 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and |
24 | Frodo Looijaard <frodol@dds.nl> */ | 24 | Frodo Looijaard <frodol@dds.nl> */ |
25 | 25 | ||
26 | #ifndef _LINUX_I2C_H | 26 | #ifndef _LINUX_I2C_H |
27 | #define _LINUX_I2C_H | 27 | #define _LINUX_I2C_H |
28 | 28 | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #ifdef __KERNEL__ | ||
31 | #include <linux/module.h> | ||
31 | #include <linux/i2c-id.h> | 32 | #include <linux/i2c-id.h> |
32 | #include <linux/mod_devicetable.h> | 33 | #include <linux/mod_devicetable.h> |
33 | #include <linux/device.h> /* for struct device */ | 34 | #include <linux/device.h> /* for struct device */ |
@@ -354,6 +355,7 @@ static inline int i2c_adapter_id(struct i2c_adapter *adap) | |||
354 | { | 355 | { |
355 | return adap->nr; | 356 | return adap->nr; |
356 | } | 357 | } |
358 | #endif /* __KERNEL__ */ | ||
357 | 359 | ||
358 | /* | 360 | /* |
359 | * I2C Message - used for pure i2c transaction, also from /dev interface | 361 | * I2C Message - used for pure i2c transaction, also from /dev interface |
@@ -469,6 +471,7 @@ union i2c_smbus_data { | |||
469 | #define I2C_SMBUS 0x0720 /* SMBus-level access */ | 471 | #define I2C_SMBUS 0x0720 /* SMBus-level access */ |
470 | 472 | ||
471 | /* ----- I2C-DEV: char device interface stuff ------------------------- */ | 473 | /* ----- I2C-DEV: char device interface stuff ------------------------- */ |
474 | #ifdef __KERNEL__ | ||
472 | 475 | ||
473 | #define I2C_MAJOR 89 /* Device major number */ | 476 | #define I2C_MAJOR 89 /* Device major number */ |
474 | 477 | ||
@@ -646,5 +649,5 @@ static unsigned short *forces[] = { force, force_##chip1, \ | |||
646 | force_##chip6, force_##chip7, \ | 649 | force_##chip6, force_##chip7, \ |
647 | force_##chip8, NULL }; \ | 650 | force_##chip8, NULL }; \ |
648 | I2C_CLIENT_INSMOD_COMMON | 651 | I2C_CLIENT_INSMOD_COMMON |
649 | 652 | #endif /* __KERNEL__ */ | |
650 | #endif /* _LINUX_I2C_H */ | 653 | #endif /* _LINUX_I2C_H */ |
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h index 36fd18cdad28..c2519df1b6dc 100644 --- a/include/linux/i2o-dev.h +++ b/include/linux/i2o-dev.h | |||
@@ -13,7 +13,7 @@ | |||
13 | * This header file defines the I2O APIs that are available to both | 13 | * This header file defines the I2O APIs that are available to both |
14 | * the kernel and user level applications. Kernel specific structures | 14 | * the kernel and user level applications. Kernel specific structures |
15 | * are defined in i2o_osm. OSMs should include _only_ i2o_osm.h which | 15 | * are defined in i2o_osm. OSMs should include _only_ i2o_osm.h which |
16 | * automatically includs this file. | 16 | * automatically includes this file. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -23,14 +23,7 @@ | |||
23 | /* How many controllers are we allowing */ | 23 | /* How many controllers are we allowing */ |
24 | #define MAX_I2O_CONTROLLERS 32 | 24 | #define MAX_I2O_CONTROLLERS 32 |
25 | 25 | ||
26 | //#include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
27 | #ifndef __KERNEL__ | ||
28 | |||
29 | typedef unsigned char u8; | ||
30 | typedef unsigned short u16; | ||
31 | typedef unsigned int u32; | ||
32 | |||
33 | #endif /* __KERNEL__ */ | ||
34 | 27 | ||
35 | /* | 28 | /* |
36 | * I2O Control IOCTLs and structures | 29 | * I2O Control IOCTLs and structures |
@@ -53,7 +46,7 @@ typedef unsigned int u32; | |||
53 | 46 | ||
54 | struct i2o_cmd_passthru32 { | 47 | struct i2o_cmd_passthru32 { |
55 | unsigned int iop; /* IOP unit number */ | 48 | unsigned int iop; /* IOP unit number */ |
56 | u32 msg; /* message */ | 49 | __u32 msg; /* message */ |
57 | }; | 50 | }; |
58 | 51 | ||
59 | struct i2o_cmd_passthru { | 52 | struct i2o_cmd_passthru { |
@@ -138,53 +131,53 @@ typedef struct i2o_sg_io_hdr { | |||
138 | #define I2O_BUS_UNKNOWN 0x80 | 131 | #define I2O_BUS_UNKNOWN 0x80 |
139 | 132 | ||
140 | typedef struct _i2o_pci_bus { | 133 | typedef struct _i2o_pci_bus { |
141 | u8 PciFunctionNumber; | 134 | __u8 PciFunctionNumber; |
142 | u8 PciDeviceNumber; | 135 | __u8 PciDeviceNumber; |
143 | u8 PciBusNumber; | 136 | __u8 PciBusNumber; |
144 | u8 reserved; | 137 | __u8 reserved; |
145 | u16 PciVendorID; | 138 | __u16 PciVendorID; |
146 | u16 PciDeviceID; | 139 | __u16 PciDeviceID; |
147 | } i2o_pci_bus; | 140 | } i2o_pci_bus; |
148 | 141 | ||
149 | typedef struct _i2o_local_bus { | 142 | typedef struct _i2o_local_bus { |
150 | u16 LbBaseIOPort; | 143 | __u16 LbBaseIOPort; |
151 | u16 reserved; | 144 | __u16 reserved; |
152 | u32 LbBaseMemoryAddress; | 145 | __u32 LbBaseMemoryAddress; |
153 | } i2o_local_bus; | 146 | } i2o_local_bus; |
154 | 147 | ||
155 | typedef struct _i2o_isa_bus { | 148 | typedef struct _i2o_isa_bus { |
156 | u16 IsaBaseIOPort; | 149 | __u16 IsaBaseIOPort; |
157 | u8 CSN; | 150 | __u8 CSN; |
158 | u8 reserved; | 151 | __u8 reserved; |
159 | u32 IsaBaseMemoryAddress; | 152 | __u32 IsaBaseMemoryAddress; |
160 | } i2o_isa_bus; | 153 | } i2o_isa_bus; |
161 | 154 | ||
162 | typedef struct _i2o_eisa_bus_info { | 155 | typedef struct _i2o_eisa_bus_info { |
163 | u16 EisaBaseIOPort; | 156 | __u16 EisaBaseIOPort; |
164 | u8 reserved; | 157 | __u8 reserved; |
165 | u8 EisaSlotNumber; | 158 | __u8 EisaSlotNumber; |
166 | u32 EisaBaseMemoryAddress; | 159 | __u32 EisaBaseMemoryAddress; |
167 | } i2o_eisa_bus; | 160 | } i2o_eisa_bus; |
168 | 161 | ||
169 | typedef struct _i2o_mca_bus { | 162 | typedef struct _i2o_mca_bus { |
170 | u16 McaBaseIOPort; | 163 | __u16 McaBaseIOPort; |
171 | u8 reserved; | 164 | __u8 reserved; |
172 | u8 McaSlotNumber; | 165 | __u8 McaSlotNumber; |
173 | u32 McaBaseMemoryAddress; | 166 | __u32 McaBaseMemoryAddress; |
174 | } i2o_mca_bus; | 167 | } i2o_mca_bus; |
175 | 168 | ||
176 | typedef struct _i2o_other_bus { | 169 | typedef struct _i2o_other_bus { |
177 | u16 BaseIOPort; | 170 | __u16 BaseIOPort; |
178 | u16 reserved; | 171 | __u16 reserved; |
179 | u32 BaseMemoryAddress; | 172 | __u32 BaseMemoryAddress; |
180 | } i2o_other_bus; | 173 | } i2o_other_bus; |
181 | 174 | ||
182 | typedef struct _i2o_hrt_entry { | 175 | typedef struct _i2o_hrt_entry { |
183 | u32 adapter_id; | 176 | __u32 adapter_id; |
184 | u32 parent_tid:12; | 177 | __u32 parent_tid:12; |
185 | u32 state:4; | 178 | __u32 state:4; |
186 | u32 bus_num:8; | 179 | __u32 bus_num:8; |
187 | u32 bus_type:8; | 180 | __u32 bus_type:8; |
188 | union { | 181 | union { |
189 | i2o_pci_bus pci_bus; | 182 | i2o_pci_bus pci_bus; |
190 | i2o_local_bus local_bus; | 183 | i2o_local_bus local_bus; |
@@ -196,66 +189,66 @@ typedef struct _i2o_hrt_entry { | |||
196 | } i2o_hrt_entry; | 189 | } i2o_hrt_entry; |
197 | 190 | ||
198 | typedef struct _i2o_hrt { | 191 | typedef struct _i2o_hrt { |
199 | u16 num_entries; | 192 | __u16 num_entries; |
200 | u8 entry_len; | 193 | __u8 entry_len; |
201 | u8 hrt_version; | 194 | __u8 hrt_version; |
202 | u32 change_ind; | 195 | __u32 change_ind; |
203 | i2o_hrt_entry hrt_entry[1]; | 196 | i2o_hrt_entry hrt_entry[1]; |
204 | } i2o_hrt; | 197 | } i2o_hrt; |
205 | 198 | ||
206 | typedef struct _i2o_lct_entry { | 199 | typedef struct _i2o_lct_entry { |
207 | u32 entry_size:16; | 200 | __u32 entry_size:16; |
208 | u32 tid:12; | 201 | __u32 tid:12; |
209 | u32 reserved:4; | 202 | __u32 reserved:4; |
210 | u32 change_ind; | 203 | __u32 change_ind; |
211 | u32 device_flags; | 204 | __u32 device_flags; |
212 | u32 class_id:12; | 205 | __u32 class_id:12; |
213 | u32 version:4; | 206 | __u32 version:4; |
214 | u32 vendor_id:16; | 207 | __u32 vendor_id:16; |
215 | u32 sub_class; | 208 | __u32 sub_class; |
216 | u32 user_tid:12; | 209 | __u32 user_tid:12; |
217 | u32 parent_tid:12; | 210 | __u32 parent_tid:12; |
218 | u32 bios_info:8; | 211 | __u32 bios_info:8; |
219 | u8 identity_tag[8]; | 212 | __u8 identity_tag[8]; |
220 | u32 event_capabilities; | 213 | __u32 event_capabilities; |
221 | } i2o_lct_entry; | 214 | } i2o_lct_entry; |
222 | 215 | ||
223 | typedef struct _i2o_lct { | 216 | typedef struct _i2o_lct { |
224 | u32 table_size:16; | 217 | __u32 table_size:16; |
225 | u32 boot_tid:12; | 218 | __u32 boot_tid:12; |
226 | u32 lct_ver:4; | 219 | __u32 lct_ver:4; |
227 | u32 iop_flags; | 220 | __u32 iop_flags; |
228 | u32 change_ind; | 221 | __u32 change_ind; |
229 | i2o_lct_entry lct_entry[1]; | 222 | i2o_lct_entry lct_entry[1]; |
230 | } i2o_lct; | 223 | } i2o_lct; |
231 | 224 | ||
232 | typedef struct _i2o_status_block { | 225 | typedef struct _i2o_status_block { |
233 | u16 org_id; | 226 | __u16 org_id; |
234 | u16 reserved; | 227 | __u16 reserved; |
235 | u16 iop_id:12; | 228 | __u16 iop_id:12; |
236 | u16 reserved1:4; | 229 | __u16 reserved1:4; |
237 | u16 host_unit_id; | 230 | __u16 host_unit_id; |
238 | u16 segment_number:12; | 231 | __u16 segment_number:12; |
239 | u16 i2o_version:4; | 232 | __u16 i2o_version:4; |
240 | u8 iop_state; | 233 | __u8 iop_state; |
241 | u8 msg_type; | 234 | __u8 msg_type; |
242 | u16 inbound_frame_size; | 235 | __u16 inbound_frame_size; |
243 | u8 init_code; | 236 | __u8 init_code; |
244 | u8 reserved2; | 237 | __u8 reserved2; |
245 | u32 max_inbound_frames; | 238 | __u32 max_inbound_frames; |
246 | u32 cur_inbound_frames; | 239 | __u32 cur_inbound_frames; |
247 | u32 max_outbound_frames; | 240 | __u32 max_outbound_frames; |
248 | char product_id[24]; | 241 | char product_id[24]; |
249 | u32 expected_lct_size; | 242 | __u32 expected_lct_size; |
250 | u32 iop_capabilities; | 243 | __u32 iop_capabilities; |
251 | u32 desired_mem_size; | 244 | __u32 desired_mem_size; |
252 | u32 current_mem_size; | 245 | __u32 current_mem_size; |
253 | u32 current_mem_base; | 246 | __u32 current_mem_base; |
254 | u32 desired_io_size; | 247 | __u32 desired_io_size; |
255 | u32 current_io_size; | 248 | __u32 current_io_size; |
256 | u32 current_io_base; | 249 | __u32 current_io_base; |
257 | u32 reserved3:24; | 250 | __u32 reserved3:24; |
258 | u32 cmd_status:8; | 251 | __u32 cmd_status:8; |
259 | } i2o_status_block; | 252 | } i2o_status_block; |
260 | 253 | ||
261 | /* Event indicator mask flags */ | 254 | /* Event indicator mask flags */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index a8bef1d1371c..77e66d055f5b 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Copyright (C) 1994-2002 Linus Torvalds & authors | 6 | * Copyright (C) 1994-2002 Linus Torvalds & authors |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
11 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
12 | #include <linux/hdreg.h> | 11 | #include <linux/hdreg.h> |
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h index 1288a161bc0b..e0a150046208 100644 --- a/include/linux/if_fddi.h +++ b/include/linux/if_fddi.h | |||
@@ -102,6 +102,7 @@ struct fddihdr | |||
102 | } hdr; | 102 | } hdr; |
103 | } __attribute__ ((packed)); | 103 | } __attribute__ ((packed)); |
104 | 104 | ||
105 | #ifdef __KERNEL__ | ||
105 | /* Define FDDI statistics structure */ | 106 | /* Define FDDI statistics structure */ |
106 | struct fddi_statistics { | 107 | struct fddi_statistics { |
107 | 108 | ||
@@ -193,5 +194,6 @@ struct fddi_statistics { | |||
193 | __u32 port_ler_flag[2]; | 194 | __u32 port_ler_flag[2]; |
194 | __u32 port_hardware_present[2]; | 195 | __u32 port_hardware_present[2]; |
195 | }; | 196 | }; |
197 | #endif /* __KERNEL__ */ | ||
196 | 198 | ||
197 | #endif /* _LINUX_IF_FDDI_H */ | 199 | #endif /* _LINUX_IF_FDDI_H */ |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 395f0aad9cbf..f272a80caa3e 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -24,7 +24,6 @@ | |||
24 | #ifndef _FRAD_H_ | 24 | #ifndef _FRAD_H_ |
25 | #define _FRAD_H_ | 25 | #define _FRAD_H_ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/if.h> | 27 | #include <linux/if.h> |
29 | 28 | ||
30 | #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE) | 29 | #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE) |
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 5502f597cf0e..2f94cf2c7abb 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h | |||
@@ -43,7 +43,6 @@ struct trh_hdr { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
46 | #include <linux/config.h> | ||
47 | #include <linux/skbuff.h> | 46 | #include <linux/skbuff.h> |
48 | 47 | ||
49 | static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) | 48 | static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) |
diff --git a/include/linux/init.h b/include/linux/init.h index 93dcbe1abb4c..6667785dd1ff 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_INIT_H | 1 | #ifndef _LINUX_INIT_H |
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
6 | 5 | ||
7 | /* These macros are used to mark some functions or | 6 | /* These macros are used to mark some functions or |
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index 09e00433c78e..d4f48c6402e6 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -67,20 +67,66 @@ struct inotify_event { | |||
67 | 67 | ||
68 | #include <linux/dcache.h> | 68 | #include <linux/dcache.h> |
69 | #include <linux/fs.h> | 69 | #include <linux/fs.h> |
70 | #include <linux/config.h> | 70 | |
71 | /* | ||
72 | * struct inotify_watch - represents a watch request on a specific inode | ||
73 | * | ||
74 | * h_list is protected by ih->mutex of the associated inotify_handle. | ||
75 | * i_list, mask are protected by inode->inotify_mutex of the associated inode. | ||
76 | * ih, inode, and wd are never written to once the watch is created. | ||
77 | * | ||
78 | * Callers must use the established inotify interfaces to access inotify_watch | ||
79 | * contents. The content of this structure is private to the inotify | ||
80 | * implementation. | ||
81 | */ | ||
82 | struct inotify_watch { | ||
83 | struct list_head h_list; /* entry in inotify_handle's list */ | ||
84 | struct list_head i_list; /* entry in inode's list */ | ||
85 | atomic_t count; /* reference count */ | ||
86 | struct inotify_handle *ih; /* associated inotify handle */ | ||
87 | struct inode *inode; /* associated inode */ | ||
88 | __s32 wd; /* watch descriptor */ | ||
89 | __u32 mask; /* event mask for this watch */ | ||
90 | }; | ||
91 | |||
92 | struct inotify_operations { | ||
93 | void (*handle_event)(struct inotify_watch *, u32, u32, u32, | ||
94 | const char *, struct inode *); | ||
95 | void (*destroy_watch)(struct inotify_watch *); | ||
96 | }; | ||
71 | 97 | ||
72 | #ifdef CONFIG_INOTIFY | 98 | #ifdef CONFIG_INOTIFY |
73 | 99 | ||
100 | /* Kernel API for producing events */ | ||
101 | |||
74 | extern void inotify_d_instantiate(struct dentry *, struct inode *); | 102 | extern void inotify_d_instantiate(struct dentry *, struct inode *); |
75 | extern void inotify_d_move(struct dentry *); | 103 | extern void inotify_d_move(struct dentry *); |
76 | extern void inotify_inode_queue_event(struct inode *, __u32, __u32, | 104 | extern void inotify_inode_queue_event(struct inode *, __u32, __u32, |
77 | const char *); | 105 | const char *, struct inode *); |
78 | extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32, | 106 | extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32, |
79 | const char *); | 107 | const char *); |
80 | extern void inotify_unmount_inodes(struct list_head *); | 108 | extern void inotify_unmount_inodes(struct list_head *); |
81 | extern void inotify_inode_is_dead(struct inode *); | 109 | extern void inotify_inode_is_dead(struct inode *); |
82 | extern u32 inotify_get_cookie(void); | 110 | extern u32 inotify_get_cookie(void); |
83 | 111 | ||
112 | /* Kernel Consumer API */ | ||
113 | |||
114 | extern struct inotify_handle *inotify_init(const struct inotify_operations *); | ||
115 | extern void inotify_init_watch(struct inotify_watch *); | ||
116 | extern void inotify_destroy(struct inotify_handle *); | ||
117 | extern __s32 inotify_find_watch(struct inotify_handle *, struct inode *, | ||
118 | struct inotify_watch **); | ||
119 | extern __s32 inotify_find_update_watch(struct inotify_handle *, struct inode *, | ||
120 | u32); | ||
121 | extern __s32 inotify_add_watch(struct inotify_handle *, struct inotify_watch *, | ||
122 | struct inode *, __u32); | ||
123 | extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *); | ||
124 | extern int inotify_rm_wd(struct inotify_handle *, __u32); | ||
125 | extern void inotify_remove_watch_locked(struct inotify_handle *, | ||
126 | struct inotify_watch *); | ||
127 | extern void get_inotify_watch(struct inotify_watch *); | ||
128 | extern void put_inotify_watch(struct inotify_watch *); | ||
129 | |||
84 | #else | 130 | #else |
85 | 131 | ||
86 | static inline void inotify_d_instantiate(struct dentry *dentry, | 132 | static inline void inotify_d_instantiate(struct dentry *dentry, |
@@ -94,7 +140,8 @@ static inline void inotify_d_move(struct dentry *dentry) | |||
94 | 140 | ||
95 | static inline void inotify_inode_queue_event(struct inode *inode, | 141 | static inline void inotify_inode_queue_event(struct inode *inode, |
96 | __u32 mask, __u32 cookie, | 142 | __u32 mask, __u32 cookie, |
97 | const char *filename) | 143 | const char *filename, |
144 | struct inode *n_inode) | ||
98 | { | 145 | { |
99 | } | 146 | } |
100 | 147 | ||
@@ -117,6 +164,62 @@ static inline u32 inotify_get_cookie(void) | |||
117 | return 0; | 164 | return 0; |
118 | } | 165 | } |
119 | 166 | ||
167 | static inline struct inotify_handle *inotify_init(const struct inotify_operations *ops) | ||
168 | { | ||
169 | return ERR_PTR(-EOPNOTSUPP); | ||
170 | } | ||
171 | |||
172 | static inline void inotify_init_watch(struct inotify_watch *watch) | ||
173 | { | ||
174 | } | ||
175 | |||
176 | static inline void inotify_destroy(struct inotify_handle *ih) | ||
177 | { | ||
178 | } | ||
179 | |||
180 | static inline __s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode, | ||
181 | struct inotify_watch **watchp) | ||
182 | { | ||
183 | return -EOPNOTSUPP; | ||
184 | } | ||
185 | |||
186 | static inline __s32 inotify_find_update_watch(struct inotify_handle *ih, | ||
187 | struct inode *inode, u32 mask) | ||
188 | { | ||
189 | return -EOPNOTSUPP; | ||
190 | } | ||
191 | |||
192 | static inline __s32 inotify_add_watch(struct inotify_handle *ih, | ||
193 | struct inotify_watch *watch, | ||
194 | struct inode *inode, __u32 mask) | ||
195 | { | ||
196 | return -EOPNOTSUPP; | ||
197 | } | ||
198 | |||
199 | static inline int inotify_rm_watch(struct inotify_handle *ih, | ||
200 | struct inotify_watch *watch) | ||
201 | { | ||
202 | return -EOPNOTSUPP; | ||
203 | } | ||
204 | |||
205 | static inline int inotify_rm_wd(struct inotify_handle *ih, __u32 wd) | ||
206 | { | ||
207 | return -EOPNOTSUPP; | ||
208 | } | ||
209 | |||
210 | static inline void inotify_remove_watch_locked(struct inotify_handle *ih, | ||
211 | struct inotify_watch *watch) | ||
212 | { | ||
213 | } | ||
214 | |||
215 | static inline void get_inotify_watch(struct inotify_watch *watch) | ||
216 | { | ||
217 | } | ||
218 | |||
219 | static inline void put_inotify_watch(struct inotify_watch *watch) | ||
220 | { | ||
221 | } | ||
222 | |||
120 | #endif /* CONFIG_INOTIFY */ | 223 | #endif /* CONFIG_INOTIFY */ |
121 | 224 | ||
122 | #endif /* __KERNEL __ */ | 225 | #endif /* __KERNEL __ */ |
diff --git a/include/linux/input.h b/include/linux/input.h index ce1a756c4c30..b32c2b6e53f6 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #else | 15 | #else |
16 | #include <sys/time.h> | 16 | #include <sys/time.h> |
17 | #include <sys/ioctl.h> | 17 | #include <sys/ioctl.h> |
18 | #include <sys/types.h> | ||
18 | #include <asm/types.h> | 19 | #include <asm/types.h> |
19 | #endif | 20 | #endif |
20 | 21 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2c08fdc2bdf7..9e0fefd7884a 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #ifndef _LINUX_INTERRUPT_H | 2 | #ifndef _LINUX_INTERRUPT_H |
3 | #define _LINUX_INTERRUPT_H | 3 | #define _LINUX_INTERRUPT_H |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
7 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
8 | #include <linux/bitops.h> | 7 | #include <linux/bitops.h> |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 0a84b56935c2..5653b2f23b6a 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | #include <linux/ipmi_msgdefs.h> | 37 | #include <linux/ipmi_msgdefs.h> |
38 | #include <linux/compiler.h> | 38 | #include <linux/compiler.h> |
39 | #include <linux/device.h> | ||
40 | 39 | ||
41 | /* | 40 | /* |
42 | * This file describes an interface to an IPMI driver. You have to | 41 | * This file describes an interface to an IPMI driver. You have to |
@@ -210,6 +209,7 @@ struct kernel_ipmi_msg | |||
210 | */ | 209 | */ |
211 | #include <linux/list.h> | 210 | #include <linux/list.h> |
212 | #include <linux/module.h> | 211 | #include <linux/module.h> |
212 | #include <linux/device.h> | ||
213 | 213 | ||
214 | #ifdef CONFIG_PROC_FS | 214 | #ifdef CONFIG_PROC_FS |
215 | #include <linux/proc_fs.h> | 215 | #include <linux/proc_fs.h> |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 1263d8cb3c18..297853c841b4 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _IPV6_H | 1 | #ifndef _IPV6_H |
2 | #define _IPV6_H | 2 | #define _IPV6_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/in6.h> | 4 | #include <linux/in6.h> |
6 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
7 | 6 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index ee2a82a572f7..42c9cd562860 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * Thanks. --rmk | 9 | * Thanks. --rmk |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
14 | 13 | ||
15 | #if !defined(CONFIG_S390) | 14 | #if !defined(CONFIG_S390) |
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h index af93505ec2ec..77e4bac29287 100644 --- a/include/linux/irq_cpustat.h +++ b/include/linux/irq_cpustat.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * Keith Owens <kaos@ocs.com.au> July 2000. | 9 | * Keith Owens <kaos@ocs.com.au> July 2000. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | /* | 13 | /* |
15 | * Simple wrappers reducing source bloat. Define all irq_stat fields | 14 | * Simple wrappers reducing source bloat. Define all irq_stat fields |
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index 26c64c286f42..1e8728a9ee8a 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef LINUX_ISAPNP_H | 22 | #ifndef LINUX_ISAPNP_H |
23 | #define LINUX_ISAPNP_H | 23 | #define LINUX_ISAPNP_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/pnp.h> | 26 | #include <linux/pnp.h> |
28 | 27 | ||
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 53eaee96065b..62991148d5a5 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
@@ -146,7 +146,6 @@ typedef struct { | |||
146 | 146 | ||
147 | #ifdef __KERNEL__ | 147 | #ifdef __KERNEL__ |
148 | 148 | ||
149 | #include <linux/config.h> | ||
150 | #include <linux/errno.h> | 149 | #include <linux/errno.h> |
151 | #include <linux/fs.h> | 150 | #include <linux/fs.h> |
152 | #include <linux/major.h> | 151 | #include <linux/major.h> |
diff --git a/include/linux/isdn/tpam.h b/include/linux/isdn/tpam.h index 9f65bea49d11..d18dd0dc570d 100644 --- a/include/linux/isdn/tpam.h +++ b/include/linux/isdn/tpam.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #define _TPAM_H_ | 26 | #define _TPAM_H_ |
27 | 27 | ||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/pci.h> | ||
30 | 29 | ||
31 | /* IOCTL commands */ | 30 | /* IOCTL commands */ |
32 | #define TPAM_CMD_DSPLOAD 0x0001 | 31 | #define TPAM_CMD_DSPLOAD 0x0001 |
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 26b00a76e135..8687a7dc0632 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h | |||
@@ -67,7 +67,6 @@ struct isdn_ppp_comp_data { | |||
67 | #ifdef __KERNEL__ | 67 | #ifdef __KERNEL__ |
68 | 68 | ||
69 | 69 | ||
70 | #include <linux/config.h> | ||
71 | 70 | ||
72 | #ifdef CONFIG_IPPP_FILTER | 71 | #ifdef CONFIG_IPPP_FILTER |
73 | #include <linux/filter.h> | 72 | #include <linux/filter.h> |
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h index 04e10f9f14f8..b9b5a684ed69 100644 --- a/include/linux/isdnif.h +++ b/include/linux/isdnif.h | |||
@@ -54,7 +54,6 @@ | |||
54 | 54 | ||
55 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/skbuff.h> | 57 | #include <linux/skbuff.h> |
59 | 58 | ||
60 | /***************************************************************************/ | 59 | /***************************************************************************/ |
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index cf792bb3c726..c6f70660b371 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
@@ -65,6 +65,18 @@ | |||
65 | 65 | ||
66 | #define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) | 66 | #define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) |
67 | 67 | ||
68 | #define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8) | ||
69 | #define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9) | ||
70 | |||
71 | /* XATTR Related */ | ||
72 | #define JFFS2_XPREFIX_USER 1 /* for "user." */ | ||
73 | #define JFFS2_XPREFIX_SECURITY 2 /* for "security." */ | ||
74 | #define JFFS2_XPREFIX_ACL_ACCESS 3 /* for "system.posix_acl_access" */ | ||
75 | #define JFFS2_XPREFIX_ACL_DEFAULT 4 /* for "system.posix_acl_default" */ | ||
76 | #define JFFS2_XPREFIX_TRUSTED 5 /* for "trusted.*" */ | ||
77 | |||
78 | #define JFFS2_ACL_VERSION 0x0001 | ||
79 | |||
68 | // Maybe later... | 80 | // Maybe later... |
69 | //#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) | 81 | //#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) |
70 | //#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) | 82 | //#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) |
@@ -82,11 +94,11 @@ | |||
82 | 94 | ||
83 | typedef struct { | 95 | typedef struct { |
84 | uint32_t v32; | 96 | uint32_t v32; |
85 | } __attribute__((packed)) jint32_t; | 97 | } __attribute__((packed)) jint32_t; |
86 | 98 | ||
87 | typedef struct { | 99 | typedef struct { |
88 | uint32_t m; | 100 | uint32_t m; |
89 | } __attribute__((packed)) jmode_t; | 101 | } __attribute__((packed)) jmode_t; |
90 | 102 | ||
91 | typedef struct { | 103 | typedef struct { |
92 | uint16_t v16; | 104 | uint16_t v16; |
@@ -99,7 +111,7 @@ struct jffs2_unknown_node | |||
99 | jint16_t nodetype; | 111 | jint16_t nodetype; |
100 | jint32_t totlen; /* So we can skip over nodes we don't grok */ | 112 | jint32_t totlen; /* So we can skip over nodes we don't grok */ |
101 | jint32_t hdr_crc; | 113 | jint32_t hdr_crc; |
102 | } __attribute__((packed)); | 114 | }; |
103 | 115 | ||
104 | struct jffs2_raw_dirent | 116 | struct jffs2_raw_dirent |
105 | { | 117 | { |
@@ -117,7 +129,7 @@ struct jffs2_raw_dirent | |||
117 | jint32_t node_crc; | 129 | jint32_t node_crc; |
118 | jint32_t name_crc; | 130 | jint32_t name_crc; |
119 | uint8_t name[0]; | 131 | uint8_t name[0]; |
120 | } __attribute__((packed)); | 132 | }; |
121 | 133 | ||
122 | /* The JFFS2 raw inode structure: Used for storage on physical media. */ | 134 | /* The JFFS2 raw inode structure: Used for storage on physical media. */ |
123 | /* The uid, gid, atime, mtime and ctime members could be longer, but | 135 | /* The uid, gid, atime, mtime and ctime members could be longer, but |
@@ -149,6 +161,32 @@ struct jffs2_raw_inode | |||
149 | jint32_t data_crc; /* CRC for the (compressed) data. */ | 161 | jint32_t data_crc; /* CRC for the (compressed) data. */ |
150 | jint32_t node_crc; /* CRC for the raw inode (excluding data) */ | 162 | jint32_t node_crc; /* CRC for the raw inode (excluding data) */ |
151 | uint8_t data[0]; | 163 | uint8_t data[0]; |
164 | }; | ||
165 | |||
166 | struct jffs2_raw_xattr { | ||
167 | jint16_t magic; | ||
168 | jint16_t nodetype; /* = JFFS2_NODETYPE_XATTR */ | ||
169 | jint32_t totlen; | ||
170 | jint32_t hdr_crc; | ||
171 | jint32_t xid; /* XATTR identifier number */ | ||
172 | jint32_t version; | ||
173 | uint8_t xprefix; | ||
174 | uint8_t name_len; | ||
175 | jint16_t value_len; | ||
176 | jint32_t data_crc; | ||
177 | jint32_t node_crc; | ||
178 | uint8_t data[0]; | ||
179 | } __attribute__((packed)); | ||
180 | |||
181 | struct jffs2_raw_xref | ||
182 | { | ||
183 | jint16_t magic; | ||
184 | jint16_t nodetype; /* = JFFS2_NODETYPE_XREF */ | ||
185 | jint32_t totlen; | ||
186 | jint32_t hdr_crc; | ||
187 | jint32_t ino; /* inode number */ | ||
188 | jint32_t xid; /* XATTR identifier number */ | ||
189 | jint32_t node_crc; | ||
152 | } __attribute__((packed)); | 190 | } __attribute__((packed)); |
153 | 191 | ||
154 | struct jffs2_raw_summary | 192 | struct jffs2_raw_summary |
@@ -163,14 +201,22 @@ struct jffs2_raw_summary | |||
163 | jint32_t sum_crc; /* summary information crc */ | 201 | jint32_t sum_crc; /* summary information crc */ |
164 | jint32_t node_crc; /* node crc */ | 202 | jint32_t node_crc; /* node crc */ |
165 | jint32_t sum[0]; /* inode summary info */ | 203 | jint32_t sum[0]; /* inode summary info */ |
166 | } __attribute__((packed)); | 204 | }; |
167 | 205 | ||
168 | union jffs2_node_union | 206 | union jffs2_node_union |
169 | { | 207 | { |
170 | struct jffs2_raw_inode i; | 208 | struct jffs2_raw_inode i; |
171 | struct jffs2_raw_dirent d; | 209 | struct jffs2_raw_dirent d; |
210 | struct jffs2_raw_xattr x; | ||
211 | struct jffs2_raw_xref r; | ||
172 | struct jffs2_raw_summary s; | 212 | struct jffs2_raw_summary s; |
173 | struct jffs2_unknown_node u; | 213 | struct jffs2_unknown_node u; |
174 | }; | 214 | }; |
175 | 215 | ||
216 | /* Data payload for device nodes. */ | ||
217 | union jffs2_device_node { | ||
218 | jint16_t old; | ||
219 | jint32_t new; | ||
220 | }; | ||
221 | |||
176 | #endif /* __LINUX_JFFS2_H__ */ | 222 | #endif /* __LINUX_JFFS2_H__ */ |
diff --git a/include/linux/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h deleted file mode 100644 index ad565bf9dcc1..000000000000 --- a/include/linux/jffs2_fs_i.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* $Id: jffs2_fs_i.h,v 1.19 2005/11/07 11:14:52 gleixner Exp $ */ | ||
2 | |||
3 | #ifndef _JFFS2_FS_I | ||
4 | #define _JFFS2_FS_I | ||
5 | |||
6 | #include <linux/version.h> | ||
7 | #include <linux/rbtree.h> | ||
8 | #include <asm/semaphore.h> | ||
9 | |||
10 | struct jffs2_inode_info { | ||
11 | /* We need an internal mutex similar to inode->i_mutex. | ||
12 | Unfortunately, we can't used the existing one, because | ||
13 | either the GC would deadlock, or we'd have to release it | ||
14 | before letting GC proceed. Or we'd have to put ugliness | ||
15 | into the GC code so it didn't attempt to obtain the i_mutex | ||
16 | for the inode(s) which are already locked */ | ||
17 | struct semaphore sem; | ||
18 | |||
19 | /* The highest (datanode) version number used for this ino */ | ||
20 | uint32_t highest_version; | ||
21 | |||
22 | /* List of data fragments which make up the file */ | ||
23 | struct rb_root fragtree; | ||
24 | |||
25 | /* There may be one datanode which isn't referenced by any of the | ||
26 | above fragments, if it contains a metadata update but no actual | ||
27 | data - or if this is a directory inode */ | ||
28 | /* This also holds the _only_ dnode for symlinks/device nodes, | ||
29 | etc. */ | ||
30 | struct jffs2_full_dnode *metadata; | ||
31 | |||
32 | /* Directory entries */ | ||
33 | struct jffs2_full_dirent *dents; | ||
34 | |||
35 | /* The target path if this is the inode of a symlink */ | ||
36 | unsigned char *target; | ||
37 | |||
38 | /* Some stuff we just have to keep in-core at all times, for each inode. */ | ||
39 | struct jffs2_inode_cache *inocache; | ||
40 | |||
41 | uint16_t flags; | ||
42 | uint8_t usercompr; | ||
43 | #if !defined (__ECOS) | ||
44 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2) | ||
45 | struct inode vfs_inode; | ||
46 | #endif | ||
47 | #endif | ||
48 | }; | ||
49 | |||
50 | #endif /* _JFFS2_FS_I */ | ||
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h deleted file mode 100644 index 4bcfb5570221..000000000000 --- a/include/linux/jffs2_fs_sb.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* $Id: jffs2_fs_sb.h,v 1.54 2005/09/21 13:37:34 dedekind Exp $ */ | ||
2 | |||
3 | #ifndef _JFFS2_FS_SB | ||
4 | #define _JFFS2_FS_SB | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | #include <linux/spinlock.h> | ||
8 | #include <linux/workqueue.h> | ||
9 | #include <linux/completion.h> | ||
10 | #include <asm/semaphore.h> | ||
11 | #include <linux/timer.h> | ||
12 | #include <linux/wait.h> | ||
13 | #include <linux/list.h> | ||
14 | #include <linux/rwsem.h> | ||
15 | |||
16 | #define JFFS2_SB_FLAG_RO 1 | ||
17 | #define JFFS2_SB_FLAG_SCANNING 2 /* Flash scanning is in progress */ | ||
18 | #define JFFS2_SB_FLAG_BUILDING 4 /* File system building is in progress */ | ||
19 | |||
20 | struct jffs2_inodirty; | ||
21 | |||
22 | /* A struct for the overall file system control. Pointers to | ||
23 | jffs2_sb_info structs are named `c' in the source code. | ||
24 | Nee jffs_control | ||
25 | */ | ||
26 | struct jffs2_sb_info { | ||
27 | struct mtd_info *mtd; | ||
28 | |||
29 | uint32_t highest_ino; | ||
30 | uint32_t checked_ino; | ||
31 | |||
32 | unsigned int flags; | ||
33 | |||
34 | struct task_struct *gc_task; /* GC task struct */ | ||
35 | struct completion gc_thread_start; /* GC thread start completion */ | ||
36 | struct completion gc_thread_exit; /* GC thread exit completion port */ | ||
37 | |||
38 | struct semaphore alloc_sem; /* Used to protect all the following | ||
39 | fields, and also to protect against | ||
40 | out-of-order writing of nodes. And GC. */ | ||
41 | uint32_t cleanmarker_size; /* Size of an _inline_ CLEANMARKER | ||
42 | (i.e. zero for OOB CLEANMARKER */ | ||
43 | |||
44 | uint32_t flash_size; | ||
45 | uint32_t used_size; | ||
46 | uint32_t dirty_size; | ||
47 | uint32_t wasted_size; | ||
48 | uint32_t free_size; | ||
49 | uint32_t erasing_size; | ||
50 | uint32_t bad_size; | ||
51 | uint32_t sector_size; | ||
52 | uint32_t unchecked_size; | ||
53 | |||
54 | uint32_t nr_free_blocks; | ||
55 | uint32_t nr_erasing_blocks; | ||
56 | |||
57 | /* Number of free blocks there must be before we... */ | ||
58 | uint8_t resv_blocks_write; /* ... allow a normal filesystem write */ | ||
59 | uint8_t resv_blocks_deletion; /* ... allow a normal filesystem deletion */ | ||
60 | uint8_t resv_blocks_gctrigger; /* ... wake up the GC thread */ | ||
61 | uint8_t resv_blocks_gcbad; /* ... pick a block from the bad_list to GC */ | ||
62 | uint8_t resv_blocks_gcmerge; /* ... merge pages when garbage collecting */ | ||
63 | |||
64 | uint32_t nospc_dirty_size; | ||
65 | |||
66 | uint32_t nr_blocks; | ||
67 | struct jffs2_eraseblock *blocks; /* The whole array of blocks. Used for getting blocks | ||
68 | * from the offset (blocks[ofs / sector_size]) */ | ||
69 | struct jffs2_eraseblock *nextblock; /* The block we're currently filling */ | ||
70 | |||
71 | struct jffs2_eraseblock *gcblock; /* The block we're currently garbage-collecting */ | ||
72 | |||
73 | struct list_head clean_list; /* Blocks 100% full of clean data */ | ||
74 | struct list_head very_dirty_list; /* Blocks with lots of dirty space */ | ||
75 | struct list_head dirty_list; /* Blocks with some dirty space */ | ||
76 | struct list_head erasable_list; /* Blocks which are completely dirty, and need erasing */ | ||
77 | struct list_head erasable_pending_wbuf_list; /* Blocks which need erasing but only after the current wbuf is flushed */ | ||
78 | struct list_head erasing_list; /* Blocks which are currently erasing */ | ||
79 | struct list_head erase_pending_list; /* Blocks which need erasing now */ | ||
80 | struct list_head erase_complete_list; /* Blocks which are erased and need the clean marker written to them */ | ||
81 | struct list_head free_list; /* Blocks which are free and ready to be used */ | ||
82 | struct list_head bad_list; /* Bad blocks. */ | ||
83 | struct list_head bad_used_list; /* Bad blocks with valid data in. */ | ||
84 | |||
85 | spinlock_t erase_completion_lock; /* Protect free_list and erasing_list | ||
86 | against erase completion handler */ | ||
87 | wait_queue_head_t erase_wait; /* For waiting for erases to complete */ | ||
88 | |||
89 | wait_queue_head_t inocache_wq; | ||
90 | struct jffs2_inode_cache **inocache_list; | ||
91 | spinlock_t inocache_lock; | ||
92 | |||
93 | /* Sem to allow jffs2_garbage_collect_deletion_dirent to | ||
94 | drop the erase_completion_lock while it's holding a pointer | ||
95 | to an obsoleted node. I don't like this. Alternatives welcomed. */ | ||
96 | struct semaphore erase_free_sem; | ||
97 | |||
98 | uint32_t wbuf_pagesize; /* 0 for NOR and other flashes with no wbuf */ | ||
99 | |||
100 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER | ||
101 | /* Write-behind buffer for NAND flash */ | ||
102 | unsigned char *wbuf; | ||
103 | uint32_t wbuf_ofs; | ||
104 | uint32_t wbuf_len; | ||
105 | struct jffs2_inodirty *wbuf_inodes; | ||
106 | |||
107 | struct rw_semaphore wbuf_sem; /* Protects the write buffer */ | ||
108 | |||
109 | /* Information about out-of-band area usage... */ | ||
110 | struct nand_oobinfo *oobinfo; | ||
111 | uint32_t badblock_pos; | ||
112 | uint32_t fsdata_pos; | ||
113 | uint32_t fsdata_len; | ||
114 | #endif | ||
115 | |||
116 | struct jffs2_summary *summary; /* Summary information */ | ||
117 | |||
118 | /* OS-private pointer for getting back to master superblock info */ | ||
119 | void *os_priv; | ||
120 | }; | ||
121 | |||
122 | #endif /* _JFFS2_FB_SB */ | ||
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index 5fd20ddd7ae3..e2d3a18af456 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h | |||
@@ -111,25 +111,25 @@ struct js_corr { | |||
111 | #define JS_SET_ALL 8 | 111 | #define JS_SET_ALL 8 |
112 | 112 | ||
113 | struct JS_DATA_TYPE { | 113 | struct JS_DATA_TYPE { |
114 | int32_t buttons; | 114 | __s32 buttons; |
115 | int32_t x; | 115 | __s32 x; |
116 | int32_t y; | 116 | __s32 y; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct JS_DATA_SAVE_TYPE_32 { | 119 | struct JS_DATA_SAVE_TYPE_32 { |
120 | int32_t JS_TIMEOUT; | 120 | __s32 JS_TIMEOUT; |
121 | int32_t BUSY; | 121 | __s32 BUSY; |
122 | int32_t JS_EXPIRETIME; | 122 | __s32 JS_EXPIRETIME; |
123 | int32_t JS_TIMELIMIT; | 123 | __s32 JS_TIMELIMIT; |
124 | struct JS_DATA_TYPE JS_SAVE; | 124 | struct JS_DATA_TYPE JS_SAVE; |
125 | struct JS_DATA_TYPE JS_CORR; | 125 | struct JS_DATA_TYPE JS_CORR; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct JS_DATA_SAVE_TYPE_64 { | 128 | struct JS_DATA_SAVE_TYPE_64 { |
129 | int32_t JS_TIMEOUT; | 129 | __s32 JS_TIMEOUT; |
130 | int32_t BUSY; | 130 | __s32 BUSY; |
131 | int64_t JS_EXPIRETIME; | 131 | __s64 JS_EXPIRETIME; |
132 | int64_t JS_TIMELIMIT; | 132 | __s64 JS_TIMELIMIT; |
133 | struct JS_DATA_TYPE JS_SAVE; | 133 | struct JS_DATA_TYPE JS_SAVE; |
134 | struct JS_DATA_TYPE JS_CORR; | 134 | struct JS_DATA_TYPE JS_CORR; |
135 | }; | 135 | }; |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 9bbd04092365..54e2549f96ba 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifndef _LINUX_KALLSYMS_H | 5 | #ifndef _LINUX_KALLSYMS_H |
6 | #define _LINUX_KALLSYMS_H | 6 | #define _LINUX_KALLSYMS_H |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | 8 | ||
10 | #define KSYM_NAME_LEN 127 | 9 | #define KSYM_NAME_LEN 127 |
11 | 10 | ||
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index b46249082cca..43e895f1cabe 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_KERNEL_STAT_H | 1 | #ifndef _LINUX_KERNEL_STAT_H |
2 | #define _LINUX_KERNEL_STAT_H | 2 | #define _LINUX_KERNEL_STAT_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <asm/irq.h> | 4 | #include <asm/irq.h> |
6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
7 | #include <linux/threads.h> | 6 | #include <linux/threads.h> |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index e4a231549407..0db22a1ab474 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -20,7 +20,6 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/stddef.h> | 22 | #include <linux/stddef.h> |
23 | #include <linux/config.h> | ||
24 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
25 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
26 | 25 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 778adc0fa640..8bf6702da2a0 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -29,7 +29,6 @@ | |||
29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi | 29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi |
30 | * <prasanna@in.ibm.com> added function-return probes. | 30 | * <prasanna@in.ibm.com> added function-return probes. |
31 | */ | 31 | */ |
32 | #include <linux/config.h> | ||
33 | #include <linux/list.h> | 32 | #include <linux/list.h> |
34 | #include <linux/notifier.h> | 33 | #include <linux/notifier.h> |
35 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index c08c9983e840..932021f872d5 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_LINKAGE_H | 1 | #ifndef _LINUX_LINKAGE_H |
2 | #define _LINUX_LINKAGE_H | 2 | #define _LINUX_LINKAGE_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <asm/linkage.h> | 4 | #include <asm/linkage.h> |
6 | 5 | ||
7 | #ifdef __cplusplus | 6 | #ifdef __cplusplus |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 6b2684763fc7..aa4fe905bb4d 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/in.h> | 14 | #include <linux/in.h> |
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
diff --git a/include/linux/lockd/nlm.h b/include/linux/lockd/nlm.h index 869b630cba24..d9d46e442538 100644 --- a/include/linux/lockd/nlm.h +++ b/include/linux/lockd/nlm.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #ifndef LINUX_LOCKD_NLM_H | 9 | #ifndef LINUX_LOCKD_NLM_H |
10 | #define LINUX_LOCKD_NLM_H | 10 | #define LINUX_LOCKD_NLM_H |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | /* Maximum file offset in file_lock.fl_end */ | 13 | /* Maximum file offset in file_lock.fl_end */ |
15 | # define NLM_OFFSET_MAX ((s32) 0x7fffffff) | 14 | # define NLM_OFFSET_MAX ((s32) 0x7fffffff) |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index f5fdca1d67e6..72440f0a443d 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/mmzone.h> | 31 | #include <linux/mmzone.h> |
33 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
34 | #include <linux/rbtree.h> | 33 | #include <linux/rbtree.h> |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index ff0a64073ebc..6789c4940c9c 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_MIGRATE_H | 1 | #ifndef _LINUX_MIGRATE_H |
2 | #define _LINUX_MIGRATE_H | 2 | #define _LINUX_MIGRATE_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
6 | 5 | ||
7 | #ifdef CONFIG_MIGRATION | 6 | #ifdef CONFIG_MIGRATION |
diff --git a/include/linux/mii.h b/include/linux/mii.h index 68f5a0f392dd..beddc6d3b0f6 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #define __LINUX_MII_H__ | 9 | #define __LINUX_MII_H__ |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/if.h> | ||
13 | 12 | ||
14 | /* Generic MII registers. */ | 13 | /* Generic MII registers. */ |
15 | 14 | ||
@@ -136,6 +135,20 @@ | |||
136 | #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ | 135 | #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ |
137 | #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ | 136 | #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ |
138 | 137 | ||
138 | /* This structure is used in all SIOCxMIIxxx ioctl calls */ | ||
139 | struct mii_ioctl_data { | ||
140 | __u16 phy_id; | ||
141 | __u16 reg_num; | ||
142 | __u16 val_in; | ||
143 | __u16 val_out; | ||
144 | }; | ||
145 | |||
146 | #ifdef __KERNEL__ | ||
147 | |||
148 | #include <linux/if.h> | ||
149 | |||
150 | struct ethtool_cmd; | ||
151 | |||
139 | struct mii_if_info { | 152 | struct mii_if_info { |
140 | int phy_id; | 153 | int phy_id; |
141 | int advertising; | 154 | int advertising; |
@@ -151,9 +164,6 @@ struct mii_if_info { | |||
151 | void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); | 164 | void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); |
152 | }; | 165 | }; |
153 | 166 | ||
154 | struct ethtool_cmd; | ||
155 | struct mii_ioctl_data; | ||
156 | |||
157 | extern int mii_link_ok (struct mii_if_info *mii); | 167 | extern int mii_link_ok (struct mii_if_info *mii); |
158 | extern int mii_nway_restart (struct mii_if_info *mii); | 168 | extern int mii_nway_restart (struct mii_if_info *mii); |
159 | extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); | 169 | extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); |
@@ -168,16 +178,6 @@ extern int generic_mii_ioctl(struct mii_if_info *mii_if, | |||
168 | unsigned int *duplex_changed); | 178 | unsigned int *duplex_changed); |
169 | 179 | ||
170 | 180 | ||
171 | |||
172 | /* This structure is used in all SIOCxMIIxxx ioctl calls */ | ||
173 | struct mii_ioctl_data { | ||
174 | u16 phy_id; | ||
175 | u16 reg_num; | ||
176 | u16 val_in; | ||
177 | u16 val_out; | ||
178 | }; | ||
179 | |||
180 | |||
181 | static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) | 181 | static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) |
182 | { | 182 | { |
183 | return (struct mii_ioctl_data *) &rq->ifr_ifru; | 183 | return (struct mii_ioctl_data *) &rq->ifr_ifru; |
@@ -235,5 +235,5 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock, | |||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | 238 | #endif /* __KERNEL__ */ | |
239 | #endif /* __LINUX_MII_H__ */ | 239 | #endif /* __LINUX_MII_H__ */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 1154684209a4..e2fa375e478e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
12 | #include <linux/list.h> | 11 | #include <linux/list.h> |
13 | #include <linux/mmzone.h> | 12 | #include <linux/mmzone.h> |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 18a5689ef748..87920a0852a3 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _LINUX_MMAN_H | 1 | #ifndef _LINUX_MMAN_H |
2 | #define _LINUX_MMAN_H | 2 | #define _LINUX_MMAN_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/mm.h> | ||
6 | |||
7 | #include <asm/atomic.h> | ||
8 | #include <asm/mman.h> | 4 | #include <asm/mman.h> |
9 | 5 | ||
10 | #define MREMAP_MAYMOVE 1 | 6 | #define MREMAP_MAYMOVE 1 |
@@ -13,6 +9,12 @@ | |||
13 | #define OVERCOMMIT_GUESS 0 | 9 | #define OVERCOMMIT_GUESS 0 |
14 | #define OVERCOMMIT_ALWAYS 1 | 10 | #define OVERCOMMIT_ALWAYS 1 |
15 | #define OVERCOMMIT_NEVER 2 | 11 | #define OVERCOMMIT_NEVER 2 |
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #include <linux/mm.h> | ||
15 | |||
16 | #include <asm/atomic.h> | ||
17 | |||
16 | extern int sysctl_overcommit_memory; | 18 | extern int sysctl_overcommit_memory; |
17 | extern int sysctl_overcommit_ratio; | 19 | extern int sysctl_overcommit_ratio; |
18 | extern atomic_t vm_committed_space; | 20 | extern atomic_t vm_committed_space; |
@@ -63,5 +65,5 @@ calc_vm_flag_bits(unsigned long flags) | |||
63 | _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | | 65 | _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | |
64 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); | 66 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); |
65 | } | 67 | } |
66 | 68 | #endif /* __KERNEL__ */ | |
67 | #endif /* _LINUX_MMAN_H */ | 69 | #endif /* _LINUX_MMAN_H */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2d8337150493..9742e3c16222 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/spinlock.h> | 7 | #include <linux/spinlock.h> |
9 | #include <linux/list.h> | 8 | #include <linux/list.h> |
10 | #include <linux/wait.h> | 9 | #include <linux/wait.h> |
diff --git a/include/linux/module.h b/include/linux/module.h index eaec13ddd667..c2d89e037af0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 | 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 |
7 | * Rewritten again by Rusty Russell, 2002 | 7 | * Rewritten again by Rusty Russell, 2002 |
8 | */ | 8 | */ |
9 | #include <linux/config.h> | ||
10 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/list.h> | 11 | #include <linux/list.h> |
@@ -557,13 +556,4 @@ static inline void module_remove_driver(struct device_driver *driver) | |||
557 | 556 | ||
558 | #define __MODULE_STRING(x) __stringify(x) | 557 | #define __MODULE_STRING(x) __stringify(x) |
559 | 558 | ||
560 | /* Use symbol_get and symbol_put instead. You'll thank me. */ | ||
561 | #define HAVE_INTER_MODULE | ||
562 | extern void __deprecated inter_module_register(const char *, | ||
563 | struct module *, const void *); | ||
564 | extern void __deprecated inter_module_unregister(const char *); | ||
565 | extern const void * __deprecated inter_module_get_request(const char *, | ||
566 | const char *); | ||
567 | extern void __deprecated inter_module_put(const char *); | ||
568 | |||
569 | #endif /* _LINUX_MODULE_H */ | 559 | #endif /* _LINUX_MODULE_H */ |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 903e0ab8101f..acc7c174ff00 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_MSG_H | 2 | #define _LINUX_MSG_H |
3 | 3 | ||
4 | #include <linux/ipc.h> | 4 | #include <linux/ipc.h> |
5 | #include <linux/list.h> | ||
6 | 5 | ||
7 | /* ipcs ctl commands */ | 6 | /* ipcs ctl commands */ |
8 | #define MSG_STAT 11 | 7 | #define MSG_STAT 11 |
@@ -63,6 +62,7 @@ struct msginfo { | |||
63 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) | 62 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) |
64 | 63 | ||
65 | #ifdef __KERNEL__ | 64 | #ifdef __KERNEL__ |
65 | #include <linux/list.h> | ||
66 | 66 | ||
67 | /* one msg_msg structure for each message */ | 67 | /* one msg_msg structure for each message */ |
68 | struct msg_msg { | 68 | struct msg_msg { |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 23a568910341..09bfae6938b3 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef __MTD_CFI_H__ | 7 | #ifndef __MTD_CFI_H__ |
8 | #define __MTD_CFI_H__ | 8 | #define __MTD_CFI_H__ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index d7eaa40e5ab0..6977780e548f 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h | |||
@@ -46,7 +46,7 @@ struct INFTLrecord { | |||
46 | unsigned int nb_blocks; /* number of physical blocks */ | 46 | unsigned int nb_blocks; /* number of physical blocks */ |
47 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ | 47 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ |
48 | struct erase_info instr; | 48 | struct erase_info instr; |
49 | struct nand_oobinfo oobinfo; | 49 | struct nand_ecclayout oobinfo; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | int INFTL_mount(struct INFTLrecord *s); | 52 | int INFTL_mount(struct INFTLrecord *s); |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 7dfd6e1fcde7..28d461d862bd 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifndef __LINUX_MTD_MAP_H__ | 5 | #ifndef __LINUX_MTD_MAP_H__ |
6 | #define __LINUX_MTD_MAP_H__ | 6 | #define __LINUX_MTD_MAP_H__ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/types.h> | 8 | #include <linux/types.h> |
10 | #include <linux/list.h> | 9 | #include <linux/list.h> |
11 | #include <linux/string.h> | 10 | #include <linux/string.h> |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index b6f2fdae65c6..9b7a2b525d63 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #error This is a kernel header. Perhaps include mtd-user.h instead? | 13 | #error This is a kernel header. Perhaps include mtd-user.h instead? |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/uio.h> | 18 | #include <linux/uio.h> |
@@ -56,18 +55,69 @@ struct mtd_erase_region_info { | |||
56 | u_int32_t numblocks; /* Number of blocks of erasesize in this region */ | 55 | u_int32_t numblocks; /* Number of blocks of erasesize in this region */ |
57 | }; | 56 | }; |
58 | 57 | ||
58 | /* | ||
59 | * oob operation modes | ||
60 | * | ||
61 | * MTD_OOB_PLACE: oob data are placed at the given offset | ||
62 | * MTD_OOB_AUTO: oob data are automatically placed at the free areas | ||
63 | * which are defined by the ecclayout | ||
64 | * MTD_OOB_RAW: mode to read raw data+oob in one chunk. The oob data | ||
65 | * is inserted into the data. Thats a raw image of the | ||
66 | * flash contents. | ||
67 | */ | ||
68 | typedef enum { | ||
69 | MTD_OOB_PLACE, | ||
70 | MTD_OOB_AUTO, | ||
71 | MTD_OOB_RAW, | ||
72 | } mtd_oob_mode_t; | ||
73 | |||
74 | /** | ||
75 | * struct mtd_oob_ops - oob operation operands | ||
76 | * @mode: operation mode | ||
77 | * | ||
78 | * @len: number of bytes to write/read. When a data buffer is given | ||
79 | * (datbuf != NULL) this is the number of data bytes. When | ||
80 | + no data buffer is available this is the number of oob bytes. | ||
81 | * | ||
82 | * @retlen: number of bytes written/read. When a data buffer is given | ||
83 | * (datbuf != NULL) this is the number of data bytes. When | ||
84 | + no data buffer is available this is the number of oob bytes. | ||
85 | * | ||
86 | * @ooblen: number of oob bytes per page | ||
87 | * @ooboffs: offset of oob data in the oob area (only relevant when | ||
88 | * mode = MTD_OOB_PLACE) | ||
89 | * @datbuf: data buffer - if NULL only oob data are read/written | ||
90 | * @oobbuf: oob data buffer | ||
91 | */ | ||
92 | struct mtd_oob_ops { | ||
93 | mtd_oob_mode_t mode; | ||
94 | size_t len; | ||
95 | size_t retlen; | ||
96 | size_t ooblen; | ||
97 | uint32_t ooboffs; | ||
98 | uint8_t *datbuf; | ||
99 | uint8_t *oobbuf; | ||
100 | }; | ||
101 | |||
59 | struct mtd_info { | 102 | struct mtd_info { |
60 | u_char type; | 103 | u_char type; |
61 | u_int32_t flags; | 104 | u_int32_t flags; |
62 | u_int32_t size; // Total size of the MTD | 105 | u_int32_t size; // Total size of the MTD |
63 | 106 | ||
64 | /* "Major" erase size for the device. Naïve users may take this | 107 | /* "Major" erase size for the device. Naïve users may take this |
65 | * to be the only erase size available, or may use the more detailed | 108 | * to be the only erase size available, or may use the more detailed |
66 | * information below if they desire | 109 | * information below if they desire |
67 | */ | 110 | */ |
68 | u_int32_t erasesize; | 111 | u_int32_t erasesize; |
112 | /* Minimal writable flash unit size. In case of NOR flash it is 1 (even | ||
113 | * though individual bits can be cleared), in case of NAND flash it is | ||
114 | * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR | ||
115 | * it is of ECC block size, etc. It is illegal to have writesize = 0. | ||
116 | * Any driver registering a struct mtd_info must ensure a writesize of | ||
117 | * 1 or larger. | ||
118 | */ | ||
119 | u_int32_t writesize; | ||
69 | 120 | ||
70 | u_int32_t oobblock; // Size of OOB blocks (e.g. 512) | ||
71 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) | 121 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) |
72 | u_int32_t ecctype; | 122 | u_int32_t ecctype; |
73 | u_int32_t eccsize; | 123 | u_int32_t eccsize; |
@@ -79,7 +129,6 @@ struct mtd_info { | |||
79 | * MTD_PROGRAM_REGIONS flag is set. | 129 | * MTD_PROGRAM_REGIONS flag is set. |
80 | * (Maybe we should have an union for those?) | 130 | * (Maybe we should have an union for those?) |
81 | */ | 131 | */ |
82 | #define MTD_PROGREGION_SIZE(mtd) (mtd)->oobblock | ||
83 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize | 132 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize |
84 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype | 133 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype |
85 | 134 | ||
@@ -87,9 +136,8 @@ struct mtd_info { | |||
87 | char *name; | 136 | char *name; |
88 | int index; | 137 | int index; |
89 | 138 | ||
90 | // oobinfo is a nand_oobinfo structure, which can be set by iotcl (MEMSETOOBINFO) | 139 | /* ecc layout structure pointer - read only ! */ |
91 | struct nand_oobinfo oobinfo; | 140 | struct nand_ecclayout *ecclayout; |
92 | u_int32_t oobavail; // Number of bytes in OOB area available for fs | ||
93 | 141 | ||
94 | /* Data for variable erase regions. If numeraseregions is zero, | 142 | /* Data for variable erase regions. If numeraseregions is zero, |
95 | * it means that the whole device has erasesize as given above. | 143 | * it means that the whole device has erasesize as given above. |
@@ -112,11 +160,10 @@ struct mtd_info { | |||
112 | int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); | 160 | int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); |
113 | int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); | 161 | int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); |
114 | 162 | ||
115 | int (*read_ecc) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel); | 163 | int (*read_oob) (struct mtd_info *mtd, loff_t from, |
116 | int (*write_ecc) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel); | 164 | struct mtd_oob_ops *ops); |
117 | 165 | int (*write_oob) (struct mtd_info *mtd, loff_t to, | |
118 | int (*read_oob) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); | 166 | struct mtd_oob_ops *ops); |
119 | int (*write_oob) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); | ||
120 | 167 | ||
121 | /* | 168 | /* |
122 | * Methods to access the protection register area, present in some | 169 | * Methods to access the protection register area, present in some |
@@ -130,17 +177,11 @@ struct mtd_info { | |||
130 | int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); | 177 | int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); |
131 | int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len); | 178 | int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len); |
132 | 179 | ||
133 | /* kvec-based read/write methods. We need these especially for NAND flash, | 180 | /* kvec-based read/write methods. |
134 | with its limited number of write cycles per erase. | ||
135 | NB: The 'count' parameter is the number of _vectors_, each of | 181 | NB: The 'count' parameter is the number of _vectors_, each of |
136 | which contains an (ofs, len) tuple. | 182 | which contains an (ofs, len) tuple. |
137 | */ | 183 | */ |
138 | int (*readv) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, size_t *retlen); | ||
139 | int (*readv_ecc) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, | ||
140 | size_t *retlen, u_char *eccbuf, struct nand_oobinfo *oobsel); | ||
141 | int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); | 184 | int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); |
142 | int (*writev_ecc) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, | ||
143 | size_t *retlen, u_char *eccbuf, struct nand_oobinfo *oobsel); | ||
144 | 185 | ||
145 | /* Sync */ | 186 | /* Sync */ |
146 | void (*sync) (struct mtd_info *mtd); | 187 | void (*sync) (struct mtd_info *mtd); |
@@ -159,6 +200,9 @@ struct mtd_info { | |||
159 | 200 | ||
160 | struct notifier_block reboot_notifier; /* default mode before reboot */ | 201 | struct notifier_block reboot_notifier; /* default mode before reboot */ |
161 | 202 | ||
203 | /* ECC status information */ | ||
204 | struct mtd_ecc_stats ecc_stats; | ||
205 | |||
162 | void *priv; | 206 | void *priv; |
163 | 207 | ||
164 | struct module *owner; | 208 | struct module *owner; |
@@ -192,20 +236,6 @@ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, | |||
192 | int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs, | 236 | int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs, |
193 | unsigned long count, loff_t from, size_t *retlen); | 237 | unsigned long count, loff_t from, size_t *retlen); |
194 | 238 | ||
195 | #define MTD_ERASE(mtd, args...) (*(mtd->erase))(mtd, args) | ||
196 | #define MTD_POINT(mtd, a,b,c,d) (*(mtd->point))(mtd, a,b,c, (u_char **)(d)) | ||
197 | #define MTD_UNPOINT(mtd, arg) (*(mtd->unpoint))(mtd, (u_char *)arg) | ||
198 | #define MTD_READ(mtd, args...) (*(mtd->read))(mtd, args) | ||
199 | #define MTD_WRITE(mtd, args...) (*(mtd->write))(mtd, args) | ||
200 | #define MTD_READV(mtd, args...) (*(mtd->readv))(mtd, args) | ||
201 | #define MTD_WRITEV(mtd, args...) (*(mtd->writev))(mtd, args) | ||
202 | #define MTD_READECC(mtd, args...) (*(mtd->read_ecc))(mtd, args) | ||
203 | #define MTD_WRITEECC(mtd, args...) (*(mtd->write_ecc))(mtd, args) | ||
204 | #define MTD_READOOB(mtd, args...) (*(mtd->read_oob))(mtd, args) | ||
205 | #define MTD_WRITEOOB(mtd, args...) (*(mtd->write_oob))(mtd, args) | ||
206 | #define MTD_SYNC(mtd) do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0) | ||
207 | |||
208 | |||
209 | #ifdef CONFIG_MTD_PARTITIONS | 239 | #ifdef CONFIG_MTD_PARTITIONS |
210 | void mtd_erase_callback(struct erase_info *instr); | 240 | void mtd_erase_callback(struct erase_info *instr); |
211 | #else | 241 | #else |
@@ -226,7 +256,7 @@ static inline void mtd_erase_callback(struct erase_info *instr) | |||
226 | 256 | ||
227 | #ifdef CONFIG_MTD_DEBUG | 257 | #ifdef CONFIG_MTD_DEBUG |
228 | #define DEBUG(n, args...) \ | 258 | #define DEBUG(n, args...) \ |
229 | do { \ | 259 | do { \ |
230 | if (n <= CONFIG_MTD_DEBUG_VERBOSE) \ | 260 | if (n <= CONFIG_MTD_DEBUG_VERBOSE) \ |
231 | printk(KERN_INFO args); \ | 261 | printk(KERN_INFO args); \ |
232 | } while(0) | 262 | } while(0) |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index da5e67b3fc70..66559272ebcb 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -11,52 +11,15 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | * | 13 | * |
14 | * Info: | 14 | * Info: |
15 | * Contains standard defines and IDs for NAND flash devices | 15 | * Contains standard defines and IDs for NAND flash devices |
16 | * | 16 | * |
17 | * Changelog: | 17 | * Changelog: |
18 | * 01-31-2000 DMW Created | 18 | * See git changelog. |
19 | * 09-18-2000 SJH Moved structure out of the Disk-On-Chip drivers | ||
20 | * so it can be used by other NAND flash device | ||
21 | * drivers. I also changed the copyright since none | ||
22 | * of the original contents of this file are specific | ||
23 | * to DoC devices. David can whack me with a baseball | ||
24 | * bat later if I did something naughty. | ||
25 | * 10-11-2000 SJH Added private NAND flash structure for driver | ||
26 | * 10-24-2000 SJH Added prototype for 'nand_scan' function | ||
27 | * 10-29-2001 TG changed nand_chip structure to support | ||
28 | * hardwarespecific function for accessing control lines | ||
29 | * 02-21-2002 TG added support for different read/write adress and | ||
30 | * ready/busy line access function | ||
31 | * 02-26-2002 TG added chip_delay to nand_chip structure to optimize | ||
32 | * command delay times for different chips | ||
33 | * 04-28-2002 TG OOB config defines moved from nand.c to avoid duplicate | ||
34 | * defines in jffs2/wbuf.c | ||
35 | * 08-07-2002 TG forced bad block location to byte 5 of OOB, even if | ||
36 | * CONFIG_MTD_NAND_ECC_JFFS2 is not set | ||
37 | * 08-10-2002 TG extensions to nand_chip structure to support HW-ECC | ||
38 | * | ||
39 | * 08-29-2002 tglx nand_chip structure: data_poi for selecting | ||
40 | * internal / fs-driver buffer | ||
41 | * support for 6byte/512byte hardware ECC | ||
42 | * read_ecc, write_ecc extended for different oob-layout | ||
43 | * oob layout selections: NAND_NONE_OOB, NAND_JFFS2_OOB, | ||
44 | * NAND_YAFFS_OOB | ||
45 | * 11-25-2002 tglx Added Manufacturer code FUJITSU, NATIONAL | ||
46 | * Split manufacturer and device ID structures | ||
47 | * | ||
48 | * 02-08-2004 tglx added option field to nand structure for chip anomalities | ||
49 | * 05-25-2004 tglx added bad block table support, ST-MICRO manufacturer id | ||
50 | * update of nand_chip structure description | ||
51 | * 01-17-2005 dmarlin added extended commands for AG-AND device and added option | ||
52 | * for BBT_AUTO_REFRESH. | ||
53 | * 01-20-2005 dmarlin added optional pointer to hardware specific callback for | ||
54 | * extra error status checks. | ||
55 | */ | 19 | */ |
56 | #ifndef __LINUX_MTD_NAND_H | 20 | #ifndef __LINUX_MTD_NAND_H |
57 | #define __LINUX_MTD_NAND_H | 21 | #define __LINUX_MTD_NAND_H |
58 | 22 | ||
59 | #include <linux/config.h> | ||
60 | #include <linux/wait.h> | 23 | #include <linux/wait.h> |
61 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
62 | #include <linux/mtd/mtd.h> | 25 | #include <linux/mtd/mtd.h> |
@@ -67,10 +30,6 @@ extern int nand_scan (struct mtd_info *mtd, int max_chips); | |||
67 | /* Free resources held by the NAND device */ | 30 | /* Free resources held by the NAND device */ |
68 | extern void nand_release (struct mtd_info *mtd); | 31 | extern void nand_release (struct mtd_info *mtd); |
69 | 32 | ||
70 | /* Read raw data from the device without ECC */ | ||
71 | extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_t len, size_t ooblen); | ||
72 | |||
73 | |||
74 | /* The maximum number of NAND chips in an array */ | 33 | /* The maximum number of NAND chips in an array */ |
75 | #define NAND_MAX_CHIPS 8 | 34 | #define NAND_MAX_CHIPS 8 |
76 | 35 | ||
@@ -79,44 +38,45 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_ | |||
79 | * adjust this accordingly. | 38 | * adjust this accordingly. |
80 | */ | 39 | */ |
81 | #define NAND_MAX_OOBSIZE 64 | 40 | #define NAND_MAX_OOBSIZE 64 |
41 | #define NAND_MAX_PAGESIZE 2048 | ||
82 | 42 | ||
83 | /* | 43 | /* |
84 | * Constants for hardware specific CLE/ALE/NCE function | 44 | * Constants for hardware specific CLE/ALE/NCE function |
85 | */ | 45 | * |
46 | * These are bits which can be or'ed to set/clear multiple | ||
47 | * bits in one go. | ||
48 | */ | ||
86 | /* Select the chip by setting nCE to low */ | 49 | /* Select the chip by setting nCE to low */ |
87 | #define NAND_CTL_SETNCE 1 | 50 | #define NAND_NCE 0x01 |
88 | /* Deselect the chip by setting nCE to high */ | ||
89 | #define NAND_CTL_CLRNCE 2 | ||
90 | /* Select the command latch by setting CLE to high */ | 51 | /* Select the command latch by setting CLE to high */ |
91 | #define NAND_CTL_SETCLE 3 | 52 | #define NAND_CLE 0x02 |
92 | /* Deselect the command latch by setting CLE to low */ | ||
93 | #define NAND_CTL_CLRCLE 4 | ||
94 | /* Select the address latch by setting ALE to high */ | 53 | /* Select the address latch by setting ALE to high */ |
95 | #define NAND_CTL_SETALE 5 | 54 | #define NAND_ALE 0x04 |
96 | /* Deselect the address latch by setting ALE to low */ | 55 | |
97 | #define NAND_CTL_CLRALE 6 | 56 | #define NAND_CTRL_CLE (NAND_NCE | NAND_CLE) |
98 | /* Set write protection by setting WP to high. Not used! */ | 57 | #define NAND_CTRL_ALE (NAND_NCE | NAND_ALE) |
99 | #define NAND_CTL_SETWP 7 | 58 | #define NAND_CTRL_CHANGE 0x80 |
100 | /* Clear write protection by setting WP to low. Not used! */ | ||
101 | #define NAND_CTL_CLRWP 8 | ||
102 | 59 | ||
103 | /* | 60 | /* |
104 | * Standard NAND flash commands | 61 | * Standard NAND flash commands |
105 | */ | 62 | */ |
106 | #define NAND_CMD_READ0 0 | 63 | #define NAND_CMD_READ0 0 |
107 | #define NAND_CMD_READ1 1 | 64 | #define NAND_CMD_READ1 1 |
65 | #define NAND_CMD_RNDOUT 5 | ||
108 | #define NAND_CMD_PAGEPROG 0x10 | 66 | #define NAND_CMD_PAGEPROG 0x10 |
109 | #define NAND_CMD_READOOB 0x50 | 67 | #define NAND_CMD_READOOB 0x50 |
110 | #define NAND_CMD_ERASE1 0x60 | 68 | #define NAND_CMD_ERASE1 0x60 |
111 | #define NAND_CMD_STATUS 0x70 | 69 | #define NAND_CMD_STATUS 0x70 |
112 | #define NAND_CMD_STATUS_MULTI 0x71 | 70 | #define NAND_CMD_STATUS_MULTI 0x71 |
113 | #define NAND_CMD_SEQIN 0x80 | 71 | #define NAND_CMD_SEQIN 0x80 |
72 | #define NAND_CMD_RNDIN 0x85 | ||
114 | #define NAND_CMD_READID 0x90 | 73 | #define NAND_CMD_READID 0x90 |
115 | #define NAND_CMD_ERASE2 0xd0 | 74 | #define NAND_CMD_ERASE2 0xd0 |
116 | #define NAND_CMD_RESET 0xff | 75 | #define NAND_CMD_RESET 0xff |
117 | 76 | ||
118 | /* Extended commands for large page devices */ | 77 | /* Extended commands for large page devices */ |
119 | #define NAND_CMD_READSTART 0x30 | 78 | #define NAND_CMD_READSTART 0x30 |
79 | #define NAND_CMD_RNDOUTSTART 0xE0 | ||
120 | #define NAND_CMD_CACHEDPROG 0x15 | 80 | #define NAND_CMD_CACHEDPROG 0x15 |
121 | 81 | ||
122 | /* Extended commands for AG-AND device */ | 82 | /* Extended commands for AG-AND device */ |
@@ -138,6 +98,8 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_ | |||
138 | #define NAND_CMD_STATUS_RESET 0x7f | 98 | #define NAND_CMD_STATUS_RESET 0x7f |
139 | #define NAND_CMD_STATUS_CLEAR 0xff | 99 | #define NAND_CMD_STATUS_CLEAR 0xff |
140 | 100 | ||
101 | #define NAND_CMD_NONE -1 | ||
102 | |||
141 | /* Status bits */ | 103 | /* Status bits */ |
142 | #define NAND_STATUS_FAIL 0x01 | 104 | #define NAND_STATUS_FAIL 0x01 |
143 | #define NAND_STATUS_FAIL_N1 0x02 | 105 | #define NAND_STATUS_FAIL_N1 0x02 |
@@ -148,21 +110,12 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_ | |||
148 | /* | 110 | /* |
149 | * Constants for ECC_MODES | 111 | * Constants for ECC_MODES |
150 | */ | 112 | */ |
151 | 113 | typedef enum { | |
152 | /* No ECC. Usage is not recommended ! */ | 114 | NAND_ECC_NONE, |
153 | #define NAND_ECC_NONE 0 | 115 | NAND_ECC_SOFT, |
154 | /* Software ECC 3 byte ECC per 256 Byte data */ | 116 | NAND_ECC_HW, |
155 | #define NAND_ECC_SOFT 1 | 117 | NAND_ECC_HW_SYNDROME, |
156 | /* Hardware ECC 3 byte ECC per 256 Byte data */ | 118 | } nand_ecc_modes_t; |
157 | #define NAND_ECC_HW3_256 2 | ||
158 | /* Hardware ECC 3 byte ECC per 512 Byte data */ | ||
159 | #define NAND_ECC_HW3_512 3 | ||
160 | /* Hardware ECC 3 byte ECC per 512 Byte data */ | ||
161 | #define NAND_ECC_HW6_512 4 | ||
162 | /* Hardware ECC 8 byte ECC per 512 Byte data */ | ||
163 | #define NAND_ECC_HW8_512 6 | ||
164 | /* Hardware ECC 12 byte ECC per 2048 Byte data */ | ||
165 | #define NAND_ECC_HW12_2048 7 | ||
166 | 119 | ||
167 | /* | 120 | /* |
168 | * Constants for Hardware ECC | 121 | * Constants for Hardware ECC |
@@ -201,6 +154,10 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_ | |||
201 | * bits from adjacent blocks from 'leaking' in altering data. | 154 | * bits from adjacent blocks from 'leaking' in altering data. |
202 | * This happens with the Renesas AG-AND chips, possibly others. */ | 155 | * This happens with the Renesas AG-AND chips, possibly others. */ |
203 | #define BBT_AUTO_REFRESH 0x00000080 | 156 | #define BBT_AUTO_REFRESH 0x00000080 |
157 | /* Chip does not require ready check on read. True | ||
158 | * for all large page devices, as they do not support | ||
159 | * autoincrement.*/ | ||
160 | #define NAND_NO_READRDY 0x00000100 | ||
204 | 161 | ||
205 | /* Options valid for Samsung large page devices */ | 162 | /* Options valid for Samsung large page devices */ |
206 | #define NAND_SAMSUNG_LP_OPTIONS \ | 163 | #define NAND_SAMSUNG_LP_OPTIONS \ |
@@ -219,18 +176,12 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_ | |||
219 | /* Use a flash based bad block table. This option is passed to the | 176 | /* Use a flash based bad block table. This option is passed to the |
220 | * default bad block table function. */ | 177 | * default bad block table function. */ |
221 | #define NAND_USE_FLASH_BBT 0x00010000 | 178 | #define NAND_USE_FLASH_BBT 0x00010000 |
222 | /* The hw ecc generator provides a syndrome instead a ecc value on read | ||
223 | * This can only work if we have the ecc bytes directly behind the | ||
224 | * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ | ||
225 | #define NAND_HWECC_SYNDROME 0x00020000 | ||
226 | /* This option skips the bbt scan during initialization. */ | 179 | /* This option skips the bbt scan during initialization. */ |
227 | #define NAND_SKIP_BBTSCAN 0x00040000 | 180 | #define NAND_SKIP_BBTSCAN 0x00020000 |
228 | 181 | ||
229 | /* Options set by nand scan */ | 182 | /* Options set by nand scan */ |
230 | /* Nand scan has allocated oob_buf */ | 183 | /* Nand scan has allocated controller struct */ |
231 | #define NAND_OOBBUF_ALLOC 0x40000000 | 184 | #define NAND_CONTROLLER_ALLOC 0x80000000 |
232 | /* Nand scan has allocated data_buf */ | ||
233 | #define NAND_DATABUF_ALLOC 0x80000000 | ||
234 | 185 | ||
235 | 186 | ||
236 | /* | 187 | /* |
@@ -264,45 +215,102 @@ struct nand_hw_control { | |||
264 | }; | 215 | }; |
265 | 216 | ||
266 | /** | 217 | /** |
218 | * struct nand_ecc_ctrl - Control structure for ecc | ||
219 | * @mode: ecc mode | ||
220 | * @steps: number of ecc steps per page | ||
221 | * @size: data bytes per ecc step | ||
222 | * @bytes: ecc bytes per step | ||
223 | * @total: total number of ecc bytes per page | ||
224 | * @prepad: padding information for syndrome based ecc generators | ||
225 | * @postpad: padding information for syndrome based ecc generators | ||
226 | * @hwctl: function to control hardware ecc generator. Must only | ||
227 | * be provided if an hardware ECC is available | ||
228 | * @calculate: function for ecc calculation or readback from ecc hardware | ||
229 | * @correct: function for ecc correction, matching to ecc generator (sw/hw) | ||
230 | * @read_page: function to read a page according to the ecc generator requirements | ||
231 | * @write_page: function to write a page according to the ecc generator requirements | ||
232 | */ | ||
233 | struct nand_ecc_ctrl { | ||
234 | nand_ecc_modes_t mode; | ||
235 | int steps; | ||
236 | int size; | ||
237 | int bytes; | ||
238 | int total; | ||
239 | int prepad; | ||
240 | int postpad; | ||
241 | struct nand_ecclayout *layout; | ||
242 | void (*hwctl)(struct mtd_info *mtd, int mode); | ||
243 | int (*calculate)(struct mtd_info *mtd, | ||
244 | const uint8_t *dat, | ||
245 | uint8_t *ecc_code); | ||
246 | int (*correct)(struct mtd_info *mtd, uint8_t *dat, | ||
247 | uint8_t *read_ecc, | ||
248 | uint8_t *calc_ecc); | ||
249 | int (*read_page)(struct mtd_info *mtd, | ||
250 | struct nand_chip *chip, | ||
251 | uint8_t *buf); | ||
252 | void (*write_page)(struct mtd_info *mtd, | ||
253 | struct nand_chip *chip, | ||
254 | const uint8_t *buf); | ||
255 | int (*read_oob)(struct mtd_info *mtd, | ||
256 | struct nand_chip *chip, | ||
257 | int page, | ||
258 | int sndcmd); | ||
259 | int (*write_oob)(struct mtd_info *mtd, | ||
260 | struct nand_chip *chip, | ||
261 | int page); | ||
262 | }; | ||
263 | |||
264 | /** | ||
265 | * struct nand_buffers - buffer structure for read/write | ||
266 | * @ecccalc: buffer for calculated ecc | ||
267 | * @ecccode: buffer for ecc read from flash | ||
268 | * @oobwbuf: buffer for write oob data | ||
269 | * @databuf: buffer for data - dynamically sized | ||
270 | * @oobrbuf: buffer to read oob data | ||
271 | * | ||
272 | * Do not change the order of buffers. databuf and oobrbuf must be in | ||
273 | * consecutive order. | ||
274 | */ | ||
275 | struct nand_buffers { | ||
276 | uint8_t ecccalc[NAND_MAX_OOBSIZE]; | ||
277 | uint8_t ecccode[NAND_MAX_OOBSIZE]; | ||
278 | uint8_t oobwbuf[NAND_MAX_OOBSIZE]; | ||
279 | uint8_t databuf[NAND_MAX_PAGESIZE]; | ||
280 | uint8_t oobrbuf[NAND_MAX_OOBSIZE]; | ||
281 | }; | ||
282 | |||
283 | /** | ||
267 | * struct nand_chip - NAND Private Flash Chip Data | 284 | * struct nand_chip - NAND Private Flash Chip Data |
268 | * @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device | 285 | * @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device |
269 | * @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device | 286 | * @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device |
270 | * @read_byte: [REPLACEABLE] read one byte from the chip | 287 | * @read_byte: [REPLACEABLE] read one byte from the chip |
271 | * @write_byte: [REPLACEABLE] write one byte to the chip | ||
272 | * @read_word: [REPLACEABLE] read one word from the chip | 288 | * @read_word: [REPLACEABLE] read one word from the chip |
273 | * @write_word: [REPLACEABLE] write one word to the chip | ||
274 | * @write_buf: [REPLACEABLE] write data from the buffer to the chip | 289 | * @write_buf: [REPLACEABLE] write data from the buffer to the chip |
275 | * @read_buf: [REPLACEABLE] read data from the chip into the buffer | 290 | * @read_buf: [REPLACEABLE] read data from the chip into the buffer |
276 | * @verify_buf: [REPLACEABLE] verify buffer contents against the chip data | 291 | * @verify_buf: [REPLACEABLE] verify buffer contents against the chip data |
277 | * @select_chip: [REPLACEABLE] select chip nr | 292 | * @select_chip: [REPLACEABLE] select chip nr |
278 | * @block_bad: [REPLACEABLE] check, if the block is bad | 293 | * @block_bad: [REPLACEABLE] check, if the block is bad |
279 | * @block_markbad: [REPLACEABLE] mark the block bad | 294 | * @block_markbad: [REPLACEABLE] mark the block bad |
280 | * @hwcontrol: [BOARDSPECIFIC] hardwarespecific function for accesing control-lines | 295 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific funtion for controlling |
296 | * ALE/CLE/nCE. Also used to write command and address | ||
281 | * @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accesing device ready/busy line | 297 | * @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accesing device ready/busy line |
282 | * If set to NULL no access to ready/busy is available and the ready/busy information | 298 | * If set to NULL no access to ready/busy is available and the ready/busy information |
283 | * is read from the chip status register | 299 | * is read from the chip status register |
284 | * @cmdfunc: [REPLACEABLE] hardwarespecific function for writing commands to the chip | 300 | * @cmdfunc: [REPLACEABLE] hardwarespecific function for writing commands to the chip |
285 | * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on ready | 301 | * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on ready |
286 | * @calculate_ecc: [REPLACEABLE] function for ecc calculation or readback from ecc hardware | 302 | * @ecc: [BOARDSPECIFIC] ecc control ctructure |
287 | * @correct_data: [REPLACEABLE] function for ecc correction, matching to ecc generator (sw/hw) | ||
288 | * @enable_hwecc: [BOARDSPECIFIC] function to enable (reset) hardware ecc generator. Must only | ||
289 | * be provided if a hardware ECC is available | ||
290 | * @erase_cmd: [INTERN] erase command write function, selectable due to AND support | 303 | * @erase_cmd: [INTERN] erase command write function, selectable due to AND support |
291 | * @scan_bbt: [REPLACEABLE] function to scan bad block table | 304 | * @scan_bbt: [REPLACEABLE] function to scan bad block table |
292 | * @eccmode: [BOARDSPECIFIC] mode of ecc, see defines | ||
293 | * @eccsize: [INTERN] databytes used per ecc-calculation | ||
294 | * @eccbytes: [INTERN] number of ecc bytes per ecc-calculation step | ||
295 | * @eccsteps: [INTERN] number of ecc calculation steps per page | ||
296 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) | 305 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) |
297 | * @chip_lock: [INTERN] spinlock used to protect access to this structure and the chip | ||
298 | * @wq: [INTERN] wait queue to sleep on if a NAND operation is in progress | 306 | * @wq: [INTERN] wait queue to sleep on if a NAND operation is in progress |
299 | * @state: [INTERN] the current state of the NAND device | 307 | * @state: [INTERN] the current state of the NAND device |
300 | * @page_shift: [INTERN] number of address bits in a page (column address bits) | 308 | * @page_shift: [INTERN] number of address bits in a page (column address bits) |
301 | * @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock | 309 | * @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock |
302 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry | 310 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry |
303 | * @chip_shift: [INTERN] number of address bits in one chip | 311 | * @chip_shift: [INTERN] number of address bits in one chip |
304 | * @data_buf: [INTERN] internal buffer for one page + oob | 312 | * @datbuf: [INTERN] internal buffer for one page + oob |
305 | * @oob_buf: [INTERN] oob buffer for one eraseblock | 313 | * @oobbuf: [INTERN] oob buffer for one eraseblock |
306 | * @oobdirty: [INTERN] indicates that oob_buf must be reinitialized | 314 | * @oobdirty: [INTERN] indicates that oob_buf must be reinitialized |
307 | * @data_poi: [INTERN] pointer to a data buffer | 315 | * @data_poi: [INTERN] pointer to a data buffer |
308 | * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about | 316 | * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about |
@@ -312,12 +320,13 @@ struct nand_hw_control { | |||
312 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 320 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
313 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 321 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
314 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf | 322 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf |
315 | * @autooob: [REPLACEABLE] the default (auto)placement scheme | 323 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
316 | * @bbt: [INTERN] bad block table pointer | 324 | * @bbt: [INTERN] bad block table pointer |
317 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup | 325 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup |
318 | * @bbt_md: [REPLACEABLE] bad block table mirror descriptor | 326 | * @bbt_md: [REPLACEABLE] bad block table mirror descriptor |
319 | * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial bad block scan | 327 | * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial bad block scan |
320 | * @controller: [OPTIONAL] a pointer to a hardware controller structure which is shared among multiple independend devices | 328 | * @controller: [REPLACEABLE] a pointer to a hardware controller structure |
329 | * which is shared among multiple independend devices | ||
321 | * @priv: [OPTIONAL] pointer to private chip date | 330 | * @priv: [OPTIONAL] pointer to private chip date |
322 | * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks | 331 | * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks |
323 | * (determine if errors are correctable) | 332 | * (determine if errors are correctable) |
@@ -325,58 +334,57 @@ struct nand_hw_control { | |||
325 | 334 | ||
326 | struct nand_chip { | 335 | struct nand_chip { |
327 | void __iomem *IO_ADDR_R; | 336 | void __iomem *IO_ADDR_R; |
328 | void __iomem *IO_ADDR_W; | 337 | void __iomem *IO_ADDR_W; |
329 | 338 | ||
330 | u_char (*read_byte)(struct mtd_info *mtd); | 339 | uint8_t (*read_byte)(struct mtd_info *mtd); |
331 | void (*write_byte)(struct mtd_info *mtd, u_char byte); | ||
332 | u16 (*read_word)(struct mtd_info *mtd); | 340 | u16 (*read_word)(struct mtd_info *mtd); |
333 | void (*write_word)(struct mtd_info *mtd, u16 word); | 341 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); |
334 | 342 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); | |
335 | void (*write_buf)(struct mtd_info *mtd, const u_char *buf, int len); | 343 | int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); |
336 | void (*read_buf)(struct mtd_info *mtd, u_char *buf, int len); | ||
337 | int (*verify_buf)(struct mtd_info *mtd, const u_char *buf, int len); | ||
338 | void (*select_chip)(struct mtd_info *mtd, int chip); | 344 | void (*select_chip)(struct mtd_info *mtd, int chip); |
339 | int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip); | 345 | int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip); |
340 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); | 346 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); |
341 | void (*hwcontrol)(struct mtd_info *mtd, int cmd); | 347 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, |
342 | int (*dev_ready)(struct mtd_info *mtd); | 348 | unsigned int ctrl); |
343 | void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr); | 349 | int (*dev_ready)(struct mtd_info *mtd); |
344 | int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this, int state); | 350 | void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr); |
345 | int (*calculate_ecc)(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code); | 351 | int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this); |
346 | int (*correct_data)(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc); | ||
347 | void (*enable_hwecc)(struct mtd_info *mtd, int mode); | ||
348 | void (*erase_cmd)(struct mtd_info *mtd, int page); | 352 | void (*erase_cmd)(struct mtd_info *mtd, int page); |
349 | int (*scan_bbt)(struct mtd_info *mtd); | 353 | int (*scan_bbt)(struct mtd_info *mtd); |
350 | int eccmode; | 354 | int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); |
351 | int eccsize; | 355 | |
352 | int eccbytes; | 356 | int chip_delay; |
353 | int eccsteps; | 357 | unsigned int options; |
354 | int chip_delay; | 358 | |
355 | spinlock_t chip_lock; | 359 | int page_shift; |
356 | wait_queue_head_t wq; | ||
357 | nand_state_t state; | ||
358 | int page_shift; | ||
359 | int phys_erase_shift; | 360 | int phys_erase_shift; |
360 | int bbt_erase_shift; | 361 | int bbt_erase_shift; |
361 | int chip_shift; | 362 | int chip_shift; |
362 | u_char *data_buf; | ||
363 | u_char *oob_buf; | ||
364 | int oobdirty; | ||
365 | u_char *data_poi; | ||
366 | unsigned int options; | ||
367 | int badblockpos; | ||
368 | int numchips; | 363 | int numchips; |
369 | unsigned long chipsize; | 364 | unsigned long chipsize; |
370 | int pagemask; | 365 | int pagemask; |
371 | int pagebuf; | 366 | int pagebuf; |
372 | struct nand_oobinfo *autooob; | 367 | int badblockpos; |
368 | |||
369 | nand_state_t state; | ||
370 | |||
371 | uint8_t *oob_poi; | ||
372 | struct nand_hw_control *controller; | ||
373 | struct nand_ecclayout *ecclayout; | ||
374 | |||
375 | struct nand_ecc_ctrl ecc; | ||
376 | struct nand_buffers buffers; | ||
377 | struct nand_hw_control hwcontrol; | ||
378 | |||
379 | struct mtd_oob_ops ops; | ||
380 | |||
373 | uint8_t *bbt; | 381 | uint8_t *bbt; |
374 | struct nand_bbt_descr *bbt_td; | 382 | struct nand_bbt_descr *bbt_td; |
375 | struct nand_bbt_descr *bbt_md; | 383 | struct nand_bbt_descr *bbt_md; |
384 | |||
376 | struct nand_bbt_descr *badblock_pattern; | 385 | struct nand_bbt_descr *badblock_pattern; |
377 | struct nand_hw_control *controller; | 386 | |
378 | void *priv; | 387 | void *priv; |
379 | int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); | ||
380 | }; | 388 | }; |
381 | 389 | ||
382 | /* | 390 | /* |
@@ -388,19 +396,19 @@ struct nand_chip { | |||
388 | #define NAND_MFR_NATIONAL 0x8f | 396 | #define NAND_MFR_NATIONAL 0x8f |
389 | #define NAND_MFR_RENESAS 0x07 | 397 | #define NAND_MFR_RENESAS 0x07 |
390 | #define NAND_MFR_STMICRO 0x20 | 398 | #define NAND_MFR_STMICRO 0x20 |
391 | #define NAND_MFR_HYNIX 0xad | 399 | #define NAND_MFR_HYNIX 0xad |
392 | 400 | ||
393 | /** | 401 | /** |
394 | * struct nand_flash_dev - NAND Flash Device ID Structure | 402 | * struct nand_flash_dev - NAND Flash Device ID Structure |
395 | * | 403 | * |
396 | * @name: Identify the device type | 404 | * @name: Identify the device type |
397 | * @id: device ID code | 405 | * @id: device ID code |
398 | * @pagesize: Pagesize in bytes. Either 256 or 512 or 0 | 406 | * @pagesize: Pagesize in bytes. Either 256 or 512 or 0 |
399 | * If the pagesize is 0, then the real pagesize | 407 | * If the pagesize is 0, then the real pagesize |
400 | * and the eraseize are determined from the | 408 | * and the eraseize are determined from the |
401 | * extended id bytes in the chip | 409 | * extended id bytes in the chip |
402 | * @erasesize: Size of an erase block in the flash device. | 410 | * @erasesize: Size of an erase block in the flash device. |
403 | * @chipsize: Total chipsize in Mega Bytes | 411 | * @chipsize: Total chipsize in Mega Bytes |
404 | * @options: Bitfield to store chip relevant options | 412 | * @options: Bitfield to store chip relevant options |
405 | */ | 413 | */ |
406 | struct nand_flash_dev { | 414 | struct nand_flash_dev { |
@@ -415,7 +423,7 @@ struct nand_flash_dev { | |||
415 | /** | 423 | /** |
416 | * struct nand_manufacturers - NAND Flash Manufacturer ID Structure | 424 | * struct nand_manufacturers - NAND Flash Manufacturer ID Structure |
417 | * @name: Manufacturer name | 425 | * @name: Manufacturer name |
418 | * @id: manufacturer ID code of device. | 426 | * @id: manufacturer ID code of device. |
419 | */ | 427 | */ |
420 | struct nand_manufacturers { | 428 | struct nand_manufacturers { |
421 | int id; | 429 | int id; |
@@ -455,7 +463,7 @@ struct nand_bbt_descr { | |||
455 | int veroffs; | 463 | int veroffs; |
456 | uint8_t version[NAND_MAX_CHIPS]; | 464 | uint8_t version[NAND_MAX_CHIPS]; |
457 | int len; | 465 | int len; |
458 | int maxblocks; | 466 | int maxblocks; |
459 | int reserved_block_code; | 467 | int reserved_block_code; |
460 | uint8_t *pattern; | 468 | uint8_t *pattern; |
461 | }; | 469 | }; |
@@ -494,14 +502,14 @@ struct nand_bbt_descr { | |||
494 | /* The maximum number of blocks to scan for a bbt */ | 502 | /* The maximum number of blocks to scan for a bbt */ |
495 | #define NAND_BBT_SCAN_MAXBLOCKS 4 | 503 | #define NAND_BBT_SCAN_MAXBLOCKS 4 |
496 | 504 | ||
497 | extern int nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd); | 505 | extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); |
498 | extern int nand_update_bbt (struct mtd_info *mtd, loff_t offs); | 506 | extern int nand_update_bbt(struct mtd_info *mtd, loff_t offs); |
499 | extern int nand_default_bbt (struct mtd_info *mtd); | 507 | extern int nand_default_bbt(struct mtd_info *mtd); |
500 | extern int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt); | 508 | extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); |
501 | extern int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbbt); | 509 | extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, |
502 | extern int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, | 510 | int allowbbt); |
503 | size_t * retlen, u_char * buf, u_char * oob_buf, | 511 | extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, |
504 | struct nand_oobinfo *oobsel, int flags); | 512 | size_t * retlen, uint8_t * buf); |
505 | 513 | ||
506 | /* | 514 | /* |
507 | * Constants for oob configuration | 515 | * Constants for oob configuration |
@@ -509,4 +517,53 @@ extern int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, | |||
509 | #define NAND_SMALL_BADBLOCK_POS 5 | 517 | #define NAND_SMALL_BADBLOCK_POS 5 |
510 | #define NAND_LARGE_BADBLOCK_POS 0 | 518 | #define NAND_LARGE_BADBLOCK_POS 0 |
511 | 519 | ||
520 | /** | ||
521 | * struct platform_nand_chip - chip level device structure | ||
522 | * | ||
523 | * @nr_chips: max. number of chips to scan for | ||
524 | * @chip_offs: chip number offset | ||
525 | * @nr_partitions: number of partitions pointed to by partitions (or zero) | ||
526 | * @partitions: mtd partition list | ||
527 | * @chip_delay: R/B delay value in us | ||
528 | * @options: Option flags, e.g. 16bit buswidth | ||
529 | * @ecclayout: ecc layout info structure | ||
530 | * @priv: hardware controller specific settings | ||
531 | */ | ||
532 | struct platform_nand_chip { | ||
533 | int nr_chips; | ||
534 | int chip_offset; | ||
535 | int nr_partitions; | ||
536 | struct mtd_partition *partitions; | ||
537 | struct nand_ecclayout *ecclayout; | ||
538 | int chip_delay; | ||
539 | unsigned int options; | ||
540 | void *priv; | ||
541 | }; | ||
542 | |||
543 | /** | ||
544 | * struct platform_nand_ctrl - controller level device structure | ||
545 | * | ||
546 | * @hwcontrol: platform specific hardware control structure | ||
547 | * @dev_ready: platform specific function to read ready/busy pin | ||
548 | * @select_chip: platform specific chip select function | ||
549 | * @priv_data: private data to transport driver specific settings | ||
550 | * | ||
551 | * All fields are optional and depend on the hardware driver requirements | ||
552 | */ | ||
553 | struct platform_nand_ctrl { | ||
554 | void (*hwcontrol)(struct mtd_info *mtd, int cmd); | ||
555 | int (*dev_ready)(struct mtd_info *mtd); | ||
556 | void (*select_chip)(struct mtd_info *mtd, int chip); | ||
557 | void *priv; | ||
558 | }; | ||
559 | |||
560 | /* Some helpers to access the data structures */ | ||
561 | static inline | ||
562 | struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd) | ||
563 | { | ||
564 | struct nand_chip *chip = mtd->priv; | ||
565 | |||
566 | return chip->priv; | ||
567 | } | ||
568 | |||
512 | #endif /* __LINUX_MTD_NAND_H */ | 569 | #endif /* __LINUX_MTD_NAND_H */ |
diff --git a/include/linux/mtd/ndfc.h b/include/linux/mtd/ndfc.h new file mode 100644 index 000000000000..d0558a982628 --- /dev/null +++ b/include/linux/mtd/ndfc.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * linux/include/linux/mtd/ndfc.h | ||
3 | * | ||
4 | * Copyright (c) 2006 Thomas Gleixner <tglx@linutronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Info: | ||
11 | * Contains defines, datastructures for ndfc nand controller | ||
12 | * | ||
13 | */ | ||
14 | #ifndef __LINUX_MTD_NDFC_H | ||
15 | #define __LINUX_MTD_NDFC_H | ||
16 | |||
17 | /* NDFC Register definitions */ | ||
18 | #define NDFC_CMD 0x00 | ||
19 | #define NDFC_ALE 0x04 | ||
20 | #define NDFC_DATA 0x08 | ||
21 | #define NDFC_ECC 0x10 | ||
22 | #define NDFC_BCFG0 0x30 | ||
23 | #define NDFC_BCFG1 0x34 | ||
24 | #define NDFC_BCFG2 0x38 | ||
25 | #define NDFC_BCFG3 0x3c | ||
26 | #define NDFC_CCR 0x40 | ||
27 | #define NDFC_STAT 0x44 | ||
28 | #define NDFC_HWCTL 0x48 | ||
29 | #define NDFC_REVID 0x50 | ||
30 | |||
31 | #define NDFC_STAT_IS_READY 0x01000000 | ||
32 | |||
33 | #define NDFC_CCR_RESET_CE 0x80000000 /* CE Reset */ | ||
34 | #define NDFC_CCR_RESET_ECC 0x40000000 /* ECC Reset */ | ||
35 | #define NDFC_CCR_RIE 0x20000000 /* Interrupt Enable on Device Rdy */ | ||
36 | #define NDFC_CCR_REN 0x10000000 /* Enable wait for Rdy in LinearR */ | ||
37 | #define NDFC_CCR_ROMEN 0x08000000 /* Enable ROM In LinearR */ | ||
38 | #define NDFC_CCR_ARE 0x04000000 /* Auto-Read Enable */ | ||
39 | #define NDFC_CCR_BS(x) (((x) & 0x3) << 24) /* Select Bank on CE[x] */ | ||
40 | #define NDFC_CCR_BS_MASK 0x03000000 /* Select Bank */ | ||
41 | #define NDFC_CCR_ARAC0 0x00000000 /* 3 Addr, 1 Col 2 Row 512b page */ | ||
42 | #define NDFC_CCR_ARAC1 0x00001000 /* 4 Addr, 1 Col 3 Row 512b page */ | ||
43 | #define NDFC_CCR_ARAC2 0x00002000 /* 4 Addr, 2 Col 2 Row 2K page */ | ||
44 | #define NDFC_CCR_ARAC3 0x00003000 /* 5 Addr, 2 Col 3 Row 2K page */ | ||
45 | #define NDFC_CCR_ARAC_MASK 0x00003000 /* Auto-Read mode Addr Cycles */ | ||
46 | #define NDFC_CCR_RPG 0x0000C000 /* Auto-Read Page */ | ||
47 | #define NDFC_CCR_EBCC 0x00000004 /* EBC Configuration Completed */ | ||
48 | #define NDFC_CCR_DHC 0x00000002 /* Direct Hardware Control Enable */ | ||
49 | |||
50 | #define NDFC_BxCFG_EN 0x80000000 /* Bank Enable */ | ||
51 | #define NDFC_BxCFG_CED 0x40000000 /* nCE Style */ | ||
52 | #define NDFC_BxCFG_SZ_MASK 0x08000000 /* Bank Size */ | ||
53 | #define NDFC_BxCFG_SZ_8BIT 0x00000000 /* 8bit */ | ||
54 | #define NDFC_BxCFG_SZ_16BIT 0x08000000 /* 16bit */ | ||
55 | |||
56 | #define NDFC_MAX_BANKS 4 | ||
57 | |||
58 | struct ndfc_controller_settings { | ||
59 | uint32_t ccr_settings; | ||
60 | uint64_t ndfc_erpn; | ||
61 | }; | ||
62 | |||
63 | struct ndfc_chip_settings { | ||
64 | uint32_t bank_settings; | ||
65 | }; | ||
66 | |||
67 | #endif | ||
diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h index d35d2c21ff3e..bcf2fb3fa4a7 100644 --- a/include/linux/mtd/nftl.h +++ b/include/linux/mtd/nftl.h | |||
@@ -37,7 +37,7 @@ struct NFTLrecord { | |||
37 | unsigned int nb_blocks; /* number of physical blocks */ | 37 | unsigned int nb_blocks; /* number of physical blocks */ |
38 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ | 38 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ |
39 | struct erase_info instr; | 39 | struct erase_info instr; |
40 | struct nand_oobinfo oobinfo; | 40 | struct nand_ecclayout oobinfo; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | int NFTL_mount(struct NFTLrecord *s); | 43 | int NFTL_mount(struct NFTLrecord *s); |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 7419b5fab133..9ce9a48db444 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -35,6 +35,8 @@ typedef enum { | |||
35 | FL_SYNCING, | 35 | FL_SYNCING, |
36 | FL_UNLOCKING, | 36 | FL_UNLOCKING, |
37 | FL_LOCKING, | 37 | FL_LOCKING, |
38 | FL_RESETING, | ||
39 | FL_OTPING, | ||
38 | FL_PM_SUSPENDED, | 40 | FL_PM_SUSPENDED, |
39 | } onenand_state_t; | 41 | } onenand_state_t; |
40 | 42 | ||
@@ -75,7 +77,7 @@ struct onenand_bufferram { | |||
75 | * @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip | 77 | * @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip |
76 | * @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress | 78 | * @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress |
77 | * @param state [INTERN] the current state of the OneNAND device | 79 | * @param state [INTERN] the current state of the OneNAND device |
78 | * @param autooob [REPLACEABLE] the default (auto)placement scheme | 80 | * @param ecclayout [REPLACEABLE] the default ecc placement scheme |
79 | * @param bbm [REPLACEABLE] pointer to Bad Block Management | 81 | * @param bbm [REPLACEABLE] pointer to Bad Block Management |
80 | * @param priv [OPTIONAL] pointer to private chip date | 82 | * @param priv [OPTIONAL] pointer to private chip date |
81 | */ | 83 | */ |
@@ -111,9 +113,9 @@ struct onenand_chip { | |||
111 | onenand_state_t state; | 113 | onenand_state_t state; |
112 | unsigned char *page_buf; | 114 | unsigned char *page_buf; |
113 | 115 | ||
114 | struct nand_oobinfo *autooob; | 116 | struct nand_ecclayout *ecclayout; |
115 | 117 | ||
116 | void *bbm; | 118 | void *bbm; |
117 | 119 | ||
118 | void *priv; | 120 | void *priv; |
119 | }; | 121 | }; |
@@ -130,6 +132,9 @@ struct onenand_chip { | |||
130 | #define ONENAND_SET_SYS_CFG1(v, this) \ | 132 | #define ONENAND_SET_SYS_CFG1(v, this) \ |
131 | (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) | 133 | (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) |
132 | 134 | ||
135 | /* Check byte access in OneNAND */ | ||
136 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) | ||
137 | |||
133 | /* | 138 | /* |
134 | * Options bits | 139 | * Options bits |
135 | */ | 140 | */ |
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index d7832ef8ed63..4a72818d2545 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define ONENAND_CMD_LOCK_TIGHT (0x2C) | 112 | #define ONENAND_CMD_LOCK_TIGHT (0x2C) |
113 | #define ONENAND_CMD_ERASE (0x94) | 113 | #define ONENAND_CMD_ERASE (0x94) |
114 | #define ONENAND_CMD_RESET (0xF0) | 114 | #define ONENAND_CMD_RESET (0xF0) |
115 | #define ONENAND_CMD_OTP_ACCESS (0x65) | ||
115 | #define ONENAND_CMD_READID (0x90) | 116 | #define ONENAND_CMD_READID (0x90) |
116 | 117 | ||
117 | /* NOTE: Those are not *REAL* commands */ | 118 | /* NOTE: Those are not *REAL* commands */ |
@@ -152,6 +153,8 @@ | |||
152 | #define ONENAND_CTRL_ERASE (1 << 11) | 153 | #define ONENAND_CTRL_ERASE (1 << 11) |
153 | #define ONENAND_CTRL_ERROR (1 << 10) | 154 | #define ONENAND_CTRL_ERROR (1 << 10) |
154 | #define ONENAND_CTRL_RSTB (1 << 7) | 155 | #define ONENAND_CTRL_RSTB (1 << 7) |
156 | #define ONENAND_CTRL_OTP_L (1 << 6) | ||
157 | #define ONENAND_CTRL_OTP_BL (1 << 5) | ||
155 | 158 | ||
156 | /* | 159 | /* |
157 | * Interrupt Status Register F241h (R) | 160 | * Interrupt Status Register F241h (R) |
@@ -177,4 +180,9 @@ | |||
177 | #define ONENAND_ECC_2BIT (1 << 1) | 180 | #define ONENAND_ECC_2BIT (1 << 1) |
178 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) | 181 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) |
179 | 182 | ||
183 | /* | ||
184 | * One-Time Programmable (OTP) | ||
185 | */ | ||
186 | #define ONENAND_OTP_LOCK_OFFSET (14) | ||
187 | |||
180 | #endif /* __ONENAND_REG_H */ | 188 | #endif /* __ONENAND_REG_H */ |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index b03f512d51b9..da6b3d6f12a7 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
@@ -41,7 +41,7 @@ struct mtd_partition { | |||
41 | u_int32_t size; /* partition size */ | 41 | u_int32_t size; /* partition size */ |
42 | u_int32_t offset; /* offset within the master MTD space */ | 42 | u_int32_t offset; /* offset within the master MTD space */ |
43 | u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ | 43 | u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ |
44 | struct nand_oobinfo *oobsel; /* out of band layout for this partition (NAND only)*/ | 44 | struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ |
45 | struct mtd_info **mtdp; /* pointer to store the MTD object */ | 45 | struct mtd_info **mtdp; /* pointer to store the MTD object */ |
46 | }; | 46 | }; |
47 | 47 | ||
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index c7b8bcdef013..86831e3594f6 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h | |||
@@ -15,33 +15,26 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef __LINUX_MTD_PHYSMAP__ | 17 | #ifndef __LINUX_MTD_PHYSMAP__ |
18 | 18 | #define __LINUX_MTD_PHYSMAP__ | |
19 | #include <linux/config.h> | ||
20 | |||
21 | #if defined(CONFIG_MTD_PHYSMAP) | ||
22 | 19 | ||
23 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/map.h> | 21 | #include <linux/mtd/map.h> |
25 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
26 | 23 | ||
27 | /* | 24 | struct physmap_flash_data { |
28 | * The map_info for physmap. Board can override size, buswidth, phys, | 25 | unsigned int width; |
29 | * (*set_vpp)(), etc in their initial setup routine. | 26 | void (*set_vpp)(struct map_info *, int); |
30 | */ | 27 | unsigned int nr_parts; |
31 | extern struct map_info physmap_map; | 28 | struct mtd_partition *parts; |
29 | }; | ||
32 | 30 | ||
33 | /* | 31 | /* |
34 | * Board needs to specify the exact mapping during their setup time. | 32 | * Board needs to specify the exact mapping during their setup time. |
35 | */ | 33 | */ |
36 | static inline void physmap_configure(unsigned long addr, unsigned long size, int bankwidth, void (*set_vpp)(struct map_info *, int) ) | 34 | void physmap_configure(unsigned long addr, unsigned long size, |
37 | { | 35 | int bankwidth, void (*set_vpp)(struct map_info *, int) ); |
38 | physmap_map.phys = addr; | ||
39 | physmap_map.size = size; | ||
40 | physmap_map.bankwidth = bankwidth; | ||
41 | physmap_map.set_vpp = set_vpp; | ||
42 | } | ||
43 | 36 | ||
44 | #if defined(CONFIG_MTD_PARTITIONS) | 37 | #ifdef CONFIG_MTD_PARTITIONS |
45 | 38 | ||
46 | /* | 39 | /* |
47 | * Machines that wish to do flash partition may want to call this function in | 40 | * Machines that wish to do flash partition may want to call this function in |
@@ -55,7 +48,5 @@ static inline void physmap_configure(unsigned long addr, unsigned long size, int | |||
55 | void physmap_set_partitions(struct mtd_partition *parts, int num_parts); | 48 | void physmap_set_partitions(struct mtd_partition *parts, int num_parts); |
56 | 49 | ||
57 | #endif /* defined(CONFIG_MTD_PARTITIONS) */ | 50 | #endif /* defined(CONFIG_MTD_PARTITIONS) */ |
58 | #endif /* defined(CONFIG_MTD) */ | ||
59 | 51 | ||
60 | #endif /* __LINUX_MTD_PHYSMAP__ */ | 52 | #endif /* __LINUX_MTD_PHYSMAP__ */ |
61 | |||
diff --git a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h index 220d50bb71cd..e9d40bdde48c 100644 --- a/include/linux/mtd/xip.h +++ b/include/linux/mtd/xip.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef __LINUX_MTD_XIP_H__ | 18 | #ifndef __LINUX_MTD_XIP_H__ |
19 | #define __LINUX_MTD_XIP_H__ | 19 | #define __LINUX_MTD_XIP_H__ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | 21 | ||
23 | #ifdef CONFIG_MTD_XIP | 22 | #ifdef CONFIG_MTD_XIP |
24 | 23 | ||
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index a6ce409ec6fc..1d7cdd20b553 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h | |||
@@ -77,11 +77,11 @@ struct nbd_device { | |||
77 | * server. All data are in network byte order. | 77 | * server. All data are in network byte order. |
78 | */ | 78 | */ |
79 | struct nbd_request { | 79 | struct nbd_request { |
80 | u32 magic; | 80 | __u32 magic; |
81 | u32 type; /* == READ || == WRITE */ | 81 | __u32 type; /* == READ || == WRITE */ |
82 | char handle[8]; | 82 | char handle[8]; |
83 | u64 from; | 83 | __u64 from; |
84 | u32 len; | 84 | __u32 len; |
85 | } | 85 | } |
86 | #ifdef __GNUC__ | 86 | #ifdef __GNUC__ |
87 | __attribute__ ((packed)) | 87 | __attribute__ ((packed)) |
@@ -93,8 +93,8 @@ struct nbd_request { | |||
93 | * it has completed an I/O request (or an error occurs). | 93 | * it has completed an I/O request (or an error occurs). |
94 | */ | 94 | */ |
95 | struct nbd_reply { | 95 | struct nbd_reply { |
96 | u32 magic; | 96 | __u32 magic; |
97 | u32 error; /* 0 = ok, else error */ | 97 | __u32 error; /* 0 = ok, else error */ |
98 | char handle[8]; /* handle you got from request */ | 98 | char handle[8]; /* handle you got from request */ |
99 | }; | 99 | }; |
100 | #endif | 100 | #endif |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 96dc237b8f03..b208f0cd556b 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #include <linux/in.h> | 12 | #include <linux/in.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | #include <linux/ncp_fs_i.h> | ||
16 | #include <linux/ncp_fs_sb.h> | ||
17 | #include <linux/ipx.h> | 15 | #include <linux/ipx.h> |
18 | #include <linux/ncp_no.h> | 16 | #include <linux/ncp_no.h> |
19 | 17 | ||
@@ -146,7 +144,8 @@ struct ncp_nls_ioctl | |||
146 | 144 | ||
147 | #ifdef __KERNEL__ | 145 | #ifdef __KERNEL__ |
148 | 146 | ||
149 | #include <linux/config.h> | 147 | #include <linux/ncp_fs_i.h> |
148 | #include <linux/ncp_fs_sb.h> | ||
150 | 149 | ||
151 | /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ | 150 | /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ |
152 | #undef PRINTK | 151 | #undef PRINTK |
diff --git a/include/linux/net.h b/include/linux/net.h index 84a490e5f0a1..385e68f5bd93 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -18,9 +18,7 @@ | |||
18 | #ifndef _LINUX_NET_H | 18 | #ifndef _LINUX_NET_H |
19 | #define _LINUX_NET_H | 19 | #define _LINUX_NET_H |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
23 | #include <linux/stringify.h> | ||
24 | #include <asm/socket.h> | 22 | #include <asm/socket.h> |
25 | 23 | ||
26 | struct poll_table_struct; | 24 | struct poll_table_struct; |
@@ -57,6 +55,7 @@ typedef enum { | |||
57 | #define __SO_ACCEPTCON (1 << 16) /* performed a listen */ | 55 | #define __SO_ACCEPTCON (1 << 16) /* performed a listen */ |
58 | 56 | ||
59 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
58 | #include <linux/stringify.h> | ||
60 | 59 | ||
61 | #define SOCK_ASYNC_NOSPACE 0 | 60 | #define SOCK_ASYNC_NOSPACE 0 |
62 | #define SOCK_ASYNC_WAITDATA 1 | 61 | #define SOCK_ASYNC_WAITDATA 1 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e432b743dda2..5e8e2d50429a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/cache.h> | 34 | #include <asm/cache.h> |
35 | #include <asm/byteorder.h> | 35 | #include <asm/byteorder.h> |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/device.h> | 37 | #include <linux/device.h> |
39 | #include <linux/percpu.h> | 38 | #include <linux/percpu.h> |
40 | #include <linux/dmaengine.h> | 39 | #include <linux/dmaengine.h> |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index b31a9bca9361..10168e26a846 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
43 | #include <linux/config.h> | ||
44 | #ifdef CONFIG_NETFILTER | 43 | #ifdef CONFIG_NETFILTER |
45 | 44 | ||
46 | extern void netfilter_init(void); | 45 | extern void netfilter_init(void); |
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 34f63cf2e293..4c2d9945ca54 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -42,7 +42,7 @@ struct ip_conntrack_old_tuple | |||
42 | } u; | 42 | } u; |
43 | 43 | ||
44 | /* The protocol. */ | 44 | /* The protocol. */ |
45 | u16 protonum; | 45 | __u16 protonum; |
46 | } dst; | 46 | } dst; |
47 | }; | 47 | }; |
48 | 48 | ||
diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h index a3f8977f7f12..92bc6ddcbf73 100644 --- a/include/linux/netfilter_arp.h +++ b/include/linux/netfilter_arp.h | |||
@@ -5,7 +5,6 @@ | |||
5 | * (C)2002 Rusty Russell IBM -- This code is GPL. | 5 | * (C)2002 Rusty Russell IBM -- This code is GPL. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/netfilter.h> | 8 | #include <linux/netfilter.h> |
10 | 9 | ||
11 | /* There is no PF_ARP. */ | 10 | /* There is no PF_ARP. */ |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index a75b84bb9a88..87764022cc67 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -4,7 +4,6 @@ | |||
4 | /* bridge-specific defines for netfilter. | 4 | /* bridge-specific defines for netfilter. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/netfilter.h> | 7 | #include <linux/netfilter.h> |
9 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) | 8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) |
10 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 85301c5e8d24..ce02c984f3ba 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -5,7 +5,6 @@ | |||
5 | * (C)1998 Rusty Russell -- This code is GPL. | 5 | * (C)1998 Rusty Russell -- This code is GPL. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/netfilter.h> | 8 | #include <linux/netfilter.h> |
10 | 9 | ||
11 | /* only for userspace compatibility */ | 10 | /* only for userspace compatibility */ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index e0e9951eb8c3..51dbec1892c8 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <linux/netfilter/nf_conntrack_common.h> | 4 | #include <linux/netfilter/nf_conntrack_common.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | #include <linux/config.h> | ||
8 | #include <linux/netfilter_ipv4/ip_conntrack_tuple.h> | 7 | #include <linux/netfilter_ipv4/ip_conntrack_tuple.h> |
9 | #include <linux/bitops.h> | 8 | #include <linux/bitops.h> |
10 | #include <linux/compiler.h> | 9 | #include <linux/compiler.h> |
diff --git a/include/linux/netfilter_ipv4/listhelp.h b/include/linux/netfilter_ipv4/listhelp.h index 360429f48737..5d92cf044d91 100644 --- a/include/linux/netfilter_ipv4/listhelp.h +++ b/include/linux/netfilter_ipv4/listhelp.h | |||
@@ -1,6 +1,5 @@ | |||
1 | #ifndef _LISTHELP_H | 1 | #ifndef _LISTHELP_H |
2 | #define _LISTHELP_H | 2 | #define _LISTHELP_H |
3 | #include <linux/config.h> | ||
4 | #include <linux/list.h> | 3 | #include <linux/list.h> |
5 | 4 | ||
6 | /* Header to do more comprehensive job than linux/list.h; assume list | 5 | /* Header to do more comprehensive job than linux/list.h; assume list |
diff --git a/include/linux/nfs.h b/include/linux/nfs.h index ca2ffa6ae1d5..54af92c1c70b 100644 --- a/include/linux/nfs.h +++ b/include/linux/nfs.h | |||
@@ -7,9 +7,6 @@ | |||
7 | #ifndef _LINUX_NFS_H | 7 | #ifndef _LINUX_NFS_H |
8 | #define _LINUX_NFS_H | 8 | #define _LINUX_NFS_H |
9 | 9 | ||
10 | #include <linux/sunrpc/msg_prot.h> | ||
11 | #include <linux/string.h> | ||
12 | |||
13 | #define NFS_PROGRAM 100003 | 10 | #define NFS_PROGRAM 100003 |
14 | #define NFS_PORT 2049 | 11 | #define NFS_PORT 2049 |
15 | #define NFS_MAXDATA 8192 | 12 | #define NFS_MAXDATA 8192 |
@@ -129,7 +126,10 @@ enum nfs_ftype { | |||
129 | NFFIFO = 8 | 126 | NFFIFO = 8 |
130 | }; | 127 | }; |
131 | 128 | ||
132 | #if defined(__KERNEL__) | 129 | #ifdef __KERNEL__ |
130 | #include <linux/sunrpc/msg_prot.h> | ||
131 | #include <linux/string.h> | ||
132 | |||
133 | /* | 133 | /* |
134 | * This is the kernel NFS client file handle representation | 134 | * This is the kernel NFS client file handle representation |
135 | */ | 135 | */ |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 1477fc857f6b..5f681d534295 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #define _LINUX_NFS4_H | 14 | #define _LINUX_NFS4_H |
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/list.h> | ||
18 | 17 | ||
19 | #define NFS4_VERIFIER_SIZE 8 | 18 | #define NFS4_VERIFIER_SIZE 8 |
20 | #define NFS4_FHSIZE 128 | 19 | #define NFS4_FHSIZE 128 |
@@ -97,6 +96,9 @@ enum nfs4_acl_whotype { | |||
97 | NFS4_ACL_WHO_EVERYONE, | 96 | NFS4_ACL_WHO_EVERYONE, |
98 | }; | 97 | }; |
99 | 98 | ||
99 | #ifdef __KERNEL__ | ||
100 | #include <linux/list.h> | ||
101 | |||
100 | struct nfs4_ace { | 102 | struct nfs4_ace { |
101 | uint32_t type; | 103 | uint32_t type; |
102 | uint32_t flag; | 104 | uint32_t flag; |
@@ -345,8 +347,6 @@ enum lock_type4 { | |||
345 | #define NFS4_MINOR_VERSION 0 | 347 | #define NFS4_MINOR_VERSION 0 |
346 | #define NFS4_DEBUG 1 | 348 | #define NFS4_DEBUG 1 |
347 | 349 | ||
348 | #ifdef __KERNEL__ | ||
349 | |||
350 | /* Index of predefined Linux client operations */ | 350 | /* Index of predefined Linux client operations */ |
351 | 351 | ||
352 | enum { | 352 | enum { |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index ec7c2e872d72..2dcad295fece 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef LINUX_NFSD_NFSD_H | 10 | #ifndef LINUX_NFSD_NFSD_H |
11 | #define LINUX_NFSD_NFSD_H | 11 | #define LINUX_NFSD_NFSD_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/unistd.h> | 14 | #include <linux/unistd.h> |
16 | #include <linux/dirent.h> | 15 | #include <linux/dirent.h> |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 0798b7781a6e..f9edcd2ff3c8 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | # include <linux/config.h> | ||
20 | # include <linux/types.h> | 19 | # include <linux/types.h> |
21 | # include <linux/string.h> | 20 | # include <linux/string.h> |
22 | # include <linux/fs.h> | 21 | # include <linux/fs.h> |
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h index 781efbf94ed3..dae0faea2807 100644 --- a/include/linux/nfsd/syscall.h +++ b/include/linux/nfsd/syscall.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <asm/types.h> | 12 | #include <asm/types.h> |
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | # include <linux/config.h> | ||
15 | # include <linux/types.h> | 14 | # include <linux/types.h> |
16 | # include <linux/in.h> | 15 | # include <linux/in.h> |
17 | #endif | 16 | #endif |
diff --git a/include/linux/numa.h b/include/linux/numa.h index e481feb1bfd8..a31a7301b159 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_NUMA_H | 1 | #ifndef _LINUX_NUMA_H |
2 | #define _LINUX_NUMA_H | 2 | #define _LINUX_NUMA_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #ifdef CONFIG_NODES_SHIFT | 5 | #ifdef CONFIG_NODES_SHIFT |
7 | #define NODES_SHIFT CONFIG_NODES_SHIFT | 6 | #define NODES_SHIFT CONFIG_NODES_SHIFT |
diff --git a/include/linux/parport.h b/include/linux/parport.h index 008d736a6c9a..d42737eeee06 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h | |||
@@ -96,7 +96,6 @@ typedef enum { | |||
96 | /* The rest is for the kernel only */ | 96 | /* The rest is for the kernel only */ |
97 | #ifdef __KERNEL__ | 97 | #ifdef __KERNEL__ |
98 | 98 | ||
99 | #include <linux/config.h> | ||
100 | #include <linux/jiffies.h> | 99 | #include <linux/jiffies.h> |
101 | #include <linux/proc_fs.h> | 100 | #include <linux/proc_fs.h> |
102 | #include <linux/spinlock.h> | 101 | #include <linux/spinlock.h> |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 6fd36cb09160..6c4bc773f7b7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #ifndef LINUX_PCI_H | 17 | #ifndef LINUX_PCI_H |
18 | #define LINUX_PCI_H | 18 | #define LINUX_PCI_H |
19 | 19 | ||
20 | #include <linux/mod_devicetable.h> | ||
21 | |||
22 | /* Include the pci register defines */ | 20 | /* Include the pci register defines */ |
23 | #include <linux/pci_regs.h> | 21 | #include <linux/pci_regs.h> |
24 | 22 | ||
@@ -46,8 +44,9 @@ | |||
46 | 44 | ||
47 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
48 | 46 | ||
47 | #include <linux/mod_devicetable.h> | ||
48 | |||
49 | #include <linux/types.h> | 49 | #include <linux/types.h> |
50 | #include <linux/config.h> | ||
51 | #include <linux/ioport.h> | 50 | #include <linux/ioport.h> |
52 | #include <linux/list.h> | 51 | #include <linux/list.h> |
53 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 682525511c9e..66b5de404f22 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -6,7 +6,6 @@ | |||
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/config.h> | ||
10 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
11 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
12 | #include <linux/threads.h> | 11 | #include <linux/threads.h> |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 66be58902b17..658c1b93d5bb 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/list.h> | 26 | #include <linux/list.h> |
28 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
29 | 28 | ||
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 008932d73c35..78027c533b94 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __LINUX_PM_LEGACY_H__ | 1 | #ifndef __LINUX_PM_LEGACY_H__ |
2 | #define __LINUX_PM_LEGACY_H__ | 2 | #define __LINUX_PM_LEGACY_H__ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #ifdef CONFIG_PM_LEGACY | 5 | #ifdef CONFIG_PM_LEGACY |
7 | 6 | ||
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 217d3daf7336..ecce5912f4d6 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Copyright (C) 1998 Paul Mackerras. | 6 | * Copyright (C) 1998 Paul Mackerras. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #define PMU_DRIVER_VERSION 2 | 10 | #define PMU_DRIVER_VERSION 2 |
12 | 11 | ||
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h index 402056cd049d..c6b13ff85028 100644 --- a/include/linux/ppp_defs.h +++ b/include/linux/ppp_defs.h | |||
@@ -42,8 +42,6 @@ | |||
42 | #ifndef _PPP_DEFS_H_ | 42 | #ifndef _PPP_DEFS_H_ |
43 | #define _PPP_DEFS_H_ | 43 | #define _PPP_DEFS_H_ |
44 | 44 | ||
45 | #include <linux/crc-ccitt.h> | ||
46 | |||
47 | /* | 45 | /* |
48 | * The basic PPP frame. | 46 | * The basic PPP frame. |
49 | */ | 47 | */ |
@@ -97,7 +95,11 @@ | |||
97 | 95 | ||
98 | #define PPP_INITFCS 0xffff /* Initial FCS value */ | 96 | #define PPP_INITFCS 0xffff /* Initial FCS value */ |
99 | #define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ | 97 | #define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ |
98 | |||
99 | #ifdef __KERNEL__ | ||
100 | #include <linux/crc-ccitt.h> | ||
100 | #define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c) | 101 | #define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c) |
102 | #endif | ||
101 | 103 | ||
102 | /* | 104 | /* |
103 | * Extended asyncmap - allows any character to be escaped. | 105 | * Extended asyncmap - allows any character to be escaped. |
@@ -179,12 +181,4 @@ struct ppp_idle { | |||
179 | time_t recv_idle; /* time since last NP packet received */ | 181 | time_t recv_idle; /* time since last NP packet received */ |
180 | }; | 182 | }; |
181 | 183 | ||
182 | #ifndef __P | ||
183 | #ifdef __STDC__ | ||
184 | #define __P(x) x | ||
185 | #else | ||
186 | #define __P(x) () | ||
187 | #endif | ||
188 | #endif | ||
189 | |||
190 | #endif /* _PPP_DEFS_H_ */ | 184 | #endif /* _PPP_DEFS_H_ */ |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 5769d14d1e6a..d0926d63406c 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * preempt_count (used for kernel preemption, interrupt count, etc.) | 6 | * preempt_count (used for kernel preemption, interrupt count, etc.) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/thread_info.h> | 9 | #include <linux/thread_info.h> |
11 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
12 | 11 | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 4b47a0253425..5810d28fbed9 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_PROC_FS_H | 1 | #ifndef _LINUX_PROC_FS_H |
2 | #define _LINUX_PROC_FS_H | 2 | #define _LINUX_PROC_FS_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/slab.h> | 4 | #include <linux/slab.h> |
6 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
7 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
diff --git a/include/linux/profile.h b/include/linux/profile.h index 1f2fea6640a4..e633004ae052 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/config.h> | ||
8 | #include <linux/init.h> | 7 | #include <linux/init.h> |
9 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
10 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 2dab71e1c3d1..b8fbf26eb885 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -37,8 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
39 | #include <linux/types.h> | 39 | #include <linux/types.h> |
40 | #include <linux/spinlock.h> | ||
41 | #include <linux/mutex.h> | ||
42 | 40 | ||
43 | #define __DQUOT_VERSION__ "dquot_6.5.1" | 41 | #define __DQUOT_VERSION__ "dquot_6.5.1" |
44 | #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 | 42 | #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 |
@@ -133,6 +131,8 @@ struct if_dqinfo { | |||
133 | }; | 131 | }; |
134 | 132 | ||
135 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | #include <linux/spinlock.h> | ||
135 | #include <linux/mutex.h> | ||
136 | 136 | ||
137 | #include <linux/dqblk_xfs.h> | 137 | #include <linux/dqblk_xfs.h> |
138 | #include <linux/dqblk_v1.h> | 138 | #include <linux/dqblk_v1.h> |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 21e5a9124856..5110201a4159 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _LINUX_QUOTAOPS_ | 10 | #ifndef _LINUX_QUOTAOPS_ |
11 | #define _LINUX_QUOTAOPS_ | 11 | #define _LINUX_QUOTAOPS_ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/smp_lock.h> | 13 | #include <linux/smp_lock.h> |
15 | 14 | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 4b7cc4fe366d..f37006f21664 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -99,19 +99,36 @@ static inline struct page * rb_insert_page_cache(struct inode * inode, | |||
99 | 99 | ||
100 | struct rb_node | 100 | struct rb_node |
101 | { | 101 | { |
102 | struct rb_node *rb_parent; | 102 | unsigned long rb_parent_color; |
103 | int rb_color; | ||
104 | #define RB_RED 0 | 103 | #define RB_RED 0 |
105 | #define RB_BLACK 1 | 104 | #define RB_BLACK 1 |
106 | struct rb_node *rb_right; | 105 | struct rb_node *rb_right; |
107 | struct rb_node *rb_left; | 106 | struct rb_node *rb_left; |
108 | }; | 107 | } __attribute__((aligned(sizeof(long)))); |
108 | /* The alignment might seem pointless, but allegedly CRIS needs it */ | ||
109 | 109 | ||
110 | struct rb_root | 110 | struct rb_root |
111 | { | 111 | { |
112 | struct rb_node *rb_node; | 112 | struct rb_node *rb_node; |
113 | }; | 113 | }; |
114 | 114 | ||
115 | |||
116 | #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3)) | ||
117 | #define rb_color(r) ((r)->rb_parent_color & 1) | ||
118 | #define rb_is_red(r) (!rb_color(r)) | ||
119 | #define rb_is_black(r) rb_color(r) | ||
120 | #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0) | ||
121 | #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0) | ||
122 | |||
123 | static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) | ||
124 | { | ||
125 | rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; | ||
126 | } | ||
127 | static inline void rb_set_color(struct rb_node *rb, int color) | ||
128 | { | ||
129 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; | ||
130 | } | ||
131 | |||
115 | #define RB_ROOT (struct rb_root) { NULL, } | 132 | #define RB_ROOT (struct rb_root) { NULL, } |
116 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) | 133 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) |
117 | 134 | ||
@@ -131,8 +148,7 @@ extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, | |||
131 | static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, | 148 | static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, |
132 | struct rb_node ** rb_link) | 149 | struct rb_node ** rb_link) |
133 | { | 150 | { |
134 | node->rb_parent = parent; | 151 | node->rb_parent_color = (unsigned long )parent; |
135 | node->rb_color = RB_RED; | ||
136 | node->rb_left = node->rb_right = NULL; | 152 | node->rb_left = node->rb_right = NULL; |
137 | 153 | ||
138 | *rb_link = node; | 154 | *rb_link = node; |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 5353afb11db3..5e961035c725 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -2,8 +2,6 @@ | |||
2 | File: linux/reiserfs_xattr.h | 2 | File: linux/reiserfs_xattr.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/init.h> | ||
7 | #include <linux/xattr.h> | 5 | #include <linux/xattr.h> |
8 | 6 | ||
9 | /* Magic value in header */ | 7 | /* Magic value in header */ |
@@ -15,6 +13,7 @@ struct reiserfs_xattr_header { | |||
15 | }; | 13 | }; |
16 | 14 | ||
17 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | #include <linux/init.h> | ||
18 | 17 | ||
19 | struct reiserfs_xattr_handler { | 18 | struct reiserfs_xattr_handler { |
20 | char *prefix; | 19 | char *prefix; |
diff --git a/include/linux/relay.h b/include/linux/relay.h index 4bcc1531d6a9..24accb483849 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _LINUX_RELAY_H | 10 | #ifndef _LINUX_RELAY_H |
11 | #define _LINUX_RELAY_H | 11 | #define _LINUX_RELAY_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
16 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
diff --git a/include/linux/rio.h b/include/linux/rio.h index c7e907faae9c..d93857056cb9 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/config.h> | ||
21 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
22 | #include <linux/list.h> | 21 | #include <linux/list.h> |
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index f54772d0e7f8..7adb2a1aac92 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | 17 | ||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/config.h> | ||
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/list.h> | 20 | #include <linux/list.h> |
22 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index d6b9bcd1384c..2d4c81a220db 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -4,7 +4,6 @@ | |||
4 | * Declarations for Reverse Mapping functions in mm/rmap.c | 4 | * Declarations for Reverse Mapping functions in mm/rmap.c |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/list.h> | 7 | #include <linux/list.h> |
9 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
10 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index df0cdd41085c..facd9ee37b76 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -909,7 +909,6 @@ struct tcamsg | |||
909 | 909 | ||
910 | #ifdef __KERNEL__ | 910 | #ifdef __KERNEL__ |
911 | 911 | ||
912 | #include <linux/config.h> | ||
913 | #include <linux/mutex.h> | 912 | #include <linux/mutex.h> |
914 | 913 | ||
915 | extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); | 914 | extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index bfb988885002..f99fe90732ab 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <asm/system.h> | 18 | #include <asm/system.h> |
diff --git a/include/linux/scc.h b/include/linux/scc.h index 885a4a02b23c..3495bd953cc6 100644 --- a/include/linux/scc.h +++ b/include/linux/scc.h | |||
@@ -3,7 +3,6 @@ | |||
3 | #ifndef _SCC_H | 3 | #ifndef _SCC_H |
4 | #define _SCC_H | 4 | #define _SCC_H |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | 6 | ||
8 | /* selection of hardware types */ | 7 | /* selection of hardware types */ |
9 | 8 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 29b7d4f87d20..267f15257040 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1,9 +1,46 @@ | |||
1 | #ifndef _LINUX_SCHED_H | 1 | #ifndef _LINUX_SCHED_H |
2 | #define _LINUX_SCHED_H | 2 | #define _LINUX_SCHED_H |
3 | 3 | ||
4 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ | ||
5 | |||
6 | /* | ||
7 | * cloning flags: | ||
8 | */ | ||
9 | #define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ | ||
10 | #define CLONE_VM 0x00000100 /* set if VM shared between processes */ | ||
11 | #define CLONE_FS 0x00000200 /* set if fs info shared between processes */ | ||
12 | #define CLONE_FILES 0x00000400 /* set if open files shared between processes */ | ||
13 | #define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ | ||
14 | #define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ | ||
15 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ | ||
16 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ | ||
17 | #define CLONE_THREAD 0x00010000 /* Same thread group? */ | ||
18 | #define CLONE_NEWNS 0x00020000 /* New namespace group? */ | ||
19 | #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ | ||
20 | #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ | ||
21 | #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ | ||
22 | #define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ | ||
23 | #define CLONE_DETACHED 0x00400000 /* Unused, ignored */ | ||
24 | #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ | ||
25 | #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ | ||
26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ | ||
27 | |||
28 | /* | ||
29 | * Scheduling policies | ||
30 | */ | ||
31 | #define SCHED_NORMAL 0 | ||
32 | #define SCHED_FIFO 1 | ||
33 | #define SCHED_RR 2 | ||
34 | #define SCHED_BATCH 3 | ||
35 | |||
36 | #ifdef __KERNEL__ | ||
37 | |||
38 | struct sched_param { | ||
39 | int sched_priority; | ||
40 | }; | ||
41 | |||
4 | #include <asm/param.h> /* for HZ */ | 42 | #include <asm/param.h> /* for HZ */ |
5 | 43 | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/capability.h> | 44 | #include <linux/capability.h> |
8 | #include <linux/threads.h> | 45 | #include <linux/threads.h> |
9 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
@@ -37,31 +74,15 @@ | |||
37 | #include <linux/rcupdate.h> | 74 | #include <linux/rcupdate.h> |
38 | #include <linux/futex.h> | 75 | #include <linux/futex.h> |
39 | 76 | ||
40 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ | 77 | #include <linux/time.h> |
78 | #include <linux/param.h> | ||
79 | #include <linux/resource.h> | ||
80 | #include <linux/timer.h> | ||
81 | #include <linux/hrtimer.h> | ||
41 | 82 | ||
42 | struct exec_domain; | 83 | #include <asm/processor.h> |
43 | 84 | ||
44 | /* | 85 | struct exec_domain; |
45 | * cloning flags: | ||
46 | */ | ||
47 | #define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ | ||
48 | #define CLONE_VM 0x00000100 /* set if VM shared between processes */ | ||
49 | #define CLONE_FS 0x00000200 /* set if fs info shared between processes */ | ||
50 | #define CLONE_FILES 0x00000400 /* set if open files shared between processes */ | ||
51 | #define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ | ||
52 | #define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ | ||
53 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ | ||
54 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ | ||
55 | #define CLONE_THREAD 0x00010000 /* Same thread group? */ | ||
56 | #define CLONE_NEWNS 0x00020000 /* New namespace group? */ | ||
57 | #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ | ||
58 | #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ | ||
59 | #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ | ||
60 | #define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ | ||
61 | #define CLONE_DETACHED 0x00400000 /* Unused, ignored */ | ||
62 | #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ | ||
63 | #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ | ||
64 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ | ||
65 | 86 | ||
66 | /* | 87 | /* |
67 | * List of flags we want to share for kernel threads, | 88 | * List of flags we want to share for kernel threads, |
@@ -103,13 +124,6 @@ extern unsigned long nr_uninterruptible(void); | |||
103 | extern unsigned long nr_active(void); | 124 | extern unsigned long nr_active(void); |
104 | extern unsigned long nr_iowait(void); | 125 | extern unsigned long nr_iowait(void); |
105 | 126 | ||
106 | #include <linux/time.h> | ||
107 | #include <linux/param.h> | ||
108 | #include <linux/resource.h> | ||
109 | #include <linux/timer.h> | ||
110 | #include <linux/hrtimer.h> | ||
111 | |||
112 | #include <asm/processor.h> | ||
113 | 127 | ||
114 | /* | 128 | /* |
115 | * Task state bitmask. NOTE! These bits are also | 129 | * Task state bitmask. NOTE! These bits are also |
@@ -156,20 +170,6 @@ extern unsigned long nr_iowait(void); | |||
156 | /* Task command name length */ | 170 | /* Task command name length */ |
157 | #define TASK_COMM_LEN 16 | 171 | #define TASK_COMM_LEN 16 |
158 | 172 | ||
159 | /* | ||
160 | * Scheduling policies | ||
161 | */ | ||
162 | #define SCHED_NORMAL 0 | ||
163 | #define SCHED_FIFO 1 | ||
164 | #define SCHED_RR 2 | ||
165 | #define SCHED_BATCH 3 | ||
166 | |||
167 | struct sched_param { | ||
168 | int sched_priority; | ||
169 | }; | ||
170 | |||
171 | #ifdef __KERNEL__ | ||
172 | |||
173 | #include <linux/spinlock.h> | 173 | #include <linux/spinlock.h> |
174 | 174 | ||
175 | /* | 175 | /* |
@@ -494,7 +494,7 @@ struct user_struct { | |||
494 | atomic_t processes; /* How many processes does this user have? */ | 494 | atomic_t processes; /* How many processes does this user have? */ |
495 | atomic_t files; /* How many open files does this user have? */ | 495 | atomic_t files; /* How many open files does this user have? */ |
496 | atomic_t sigpending; /* How many pending signals does this user have? */ | 496 | atomic_t sigpending; /* How many pending signals does this user have? */ |
497 | #ifdef CONFIG_INOTIFY | 497 | #ifdef CONFIG_INOTIFY_USER |
498 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ | 498 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ |
499 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ | 499 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ |
500 | #endif | 500 | #endif |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index cd2773b29a64..3e8b1cf54303 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_SECCOMP_H | 1 | #ifndef _LINUX_SECCOMP_H |
2 | #define _LINUX_SECCOMP_H | 2 | #define _LINUX_SECCOMP_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #ifdef CONFIG_SECCOMP | 5 | #ifdef CONFIG_SECCOMP |
7 | 6 | ||
diff --git a/include/linux/sem.h b/include/linux/sem.h index 3c1f1120fe88..9aaffb0b1d81 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_SEM_H | 2 | #define _LINUX_SEM_H |
3 | 3 | ||
4 | #include <linux/ipc.h> | 4 | #include <linux/ipc.h> |
5 | #include <asm/atomic.h> | ||
6 | 5 | ||
7 | /* semop flags */ | 6 | /* semop flags */ |
8 | #define SEM_UNDO 0x1000 /* undo the operation on exit */ | 7 | #define SEM_UNDO 0x1000 /* undo the operation on exit */ |
@@ -78,6 +77,7 @@ struct seminfo { | |||
78 | #define SEMUSZ 20 /* sizeof struct sem_undo */ | 77 | #define SEMUSZ 20 /* sizeof struct sem_undo */ |
79 | 78 | ||
80 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | #include <asm/atomic.h> | ||
81 | 81 | ||
82 | struct task_struct; | 82 | struct task_struct; |
83 | 83 | ||
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 5a095572881d..7bc5c7c12b54 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -26,7 +26,6 @@ | |||
26 | * by Keith Owens and Andrea Arcangeli | 26 | * by Keith Owens and Andrea Arcangeli |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
31 | #include <linux/preempt.h> | 30 | #include <linux/preempt.h> |
32 | 31 | ||
diff --git a/include/linux/serialP.h b/include/linux/serialP.h index 2b9e6b9554d5..e811a615f696 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h | |||
@@ -19,7 +19,6 @@ | |||
19 | * For definitions of the flags field, see tty.h | 19 | * For definitions of the flags field, see tty.h |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/termios.h> | 22 | #include <linux/termios.h> |
24 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
25 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index bd14858121ea..94b9286cf6bd 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -132,7 +132,6 @@ | |||
132 | 132 | ||
133 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | 134 | ||
135 | #include <linux/config.h> | ||
136 | #include <linux/compiler.h> | 135 | #include <linux/compiler.h> |
137 | #include <linux/interrupt.h> | 136 | #include <linux/interrupt.h> |
138 | #include <linux/circ_buf.h> | 137 | #include <linux/circ_buf.h> |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 70739f51a09f..1e4ce7225eee 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #ifndef _LINUX_SIGNAL_H | 1 | #ifndef _LINUX_SIGNAL_H |
2 | #define _LINUX_SIGNAL_H | 2 | #define _LINUX_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | #include <linux/spinlock.h> | ||
6 | #include <asm/signal.h> | 4 | #include <asm/signal.h> |
7 | #include <asm/siginfo.h> | 5 | #include <asm/siginfo.h> |
8 | 6 | ||
9 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/list.h> | ||
9 | #include <linux/spinlock.h> | ||
10 | 10 | ||
11 | /* | 11 | /* |
12 | * These values of sa_flags are used only by the kernel as part of the | 12 | * These values of sa_flags are used only by the kernel as part of the |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 93e4db221585..66f8819f9568 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #ifndef _LINUX_SKBUFF_H | 14 | #ifndef _LINUX_SKBUFF_H |
15 | #define _LINUX_SKBUFF_H | 15 | #define _LINUX_SKBUFF_H |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
20 | #include <linux/time.h> | 19 | #include <linux/time.h> |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 2d985d59c7b8..9dc93163e065 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | typedef struct kmem_cache kmem_cache_t; | 12 | typedef struct kmem_cache kmem_cache_t; |
13 | 13 | ||
14 | #include <linux/config.h> /* kmalloc_sizes.h needs CONFIG_ options */ | ||
15 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 621a3d3662f3..367d6c3e8ed4 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h | |||
@@ -10,8 +10,6 @@ | |||
10 | #define _LINUX_SMB_FS_H | 10 | #define _LINUX_SMB_FS_H |
11 | 11 | ||
12 | #include <linux/smb.h> | 12 | #include <linux/smb.h> |
13 | #include <linux/smb_fs_i.h> | ||
14 | #include <linux/smb_fs_sb.h> | ||
15 | 13 | ||
16 | /* | 14 | /* |
17 | * ioctl commands | 15 | * ioctl commands |
@@ -24,6 +22,8 @@ | |||
24 | 22 | ||
25 | 23 | ||
26 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
25 | #include <linux/smb_fs_i.h> | ||
26 | #include <linux/smb_fs_sb.h> | ||
27 | 27 | ||
28 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
29 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
diff --git a/include/linux/smp.h b/include/linux/smp.h index e2fa3ab4afc5..c93c3fe4308c 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Alan Cox. <alan@redhat.com> | 6 | * Alan Cox. <alan@redhat.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | extern void cpu_idle(void); | 10 | extern void cpu_idle(void); |
12 | 11 | ||
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index fa1ff3b165fe..cf715a40d833 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __LINUX_SMPLOCK_H | 1 | #ifndef __LINUX_SMPLOCK_H |
2 | #define __LINUX_SMPLOCK_H | 2 | #define __LINUX_SMPLOCK_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #ifdef CONFIG_LOCK_KERNEL | 4 | #ifdef CONFIG_LOCK_KERNEL |
6 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
7 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 9ab2ddd80221..361409094649 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -18,8 +18,6 @@ struct __kernel_sockaddr_storage { | |||
18 | 18 | ||
19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
20 | 20 | ||
21 | #include <linux/config.h> /* for CONFIG_COMPAT */ | ||
22 | #include <linux/linkage.h> | ||
23 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
24 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
25 | #include <linux/uio.h> /* iovec support */ | 23 | #include <linux/uio.h> /* iovec support */ |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 799be6747944..ae23beef9cc9 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -46,7 +46,6 @@ | |||
46 | * linux/spinlock.h: builds the final spin_*() APIs. | 46 | * linux/spinlock.h: builds the final spin_*() APIs. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/preempt.h> | 49 | #include <linux/preempt.h> |
51 | #include <linux/linkage.h> | 50 | #include <linux/linkage.h> |
52 | #include <linux/compiler.h> | 51 | #include <linux/compiler.h> |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 151a803ed0ed..5bfc553bdb21 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -4,7 +4,6 @@ | |||
4 | very heavy lock, which is equivalent to grabbing every spinlock | 4 | very heavy lock, which is equivalent to grabbing every spinlock |
5 | (and more). So the "read" side to such a lock is anything which | 5 | (and more). So the "read" side to such a lock is anything which |
6 | diables preeempt. */ | 6 | diables preeempt. */ |
7 | #include <linux/config.h> | ||
8 | #include <linux/cpu.h> | 7 | #include <linux/cpu.h> |
9 | #include <asm/system.h> | 8 | #include <asm/system.h> |
10 | 9 | ||
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index be4772ed43c0..a6de332e57d4 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/sunrpc/sched.h> | 14 | #include <linux/sunrpc/sched.h> |
16 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
17 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 1a42d902bc11..e4729aa67654 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
@@ -9,19 +9,6 @@ | |||
9 | #ifndef _LINUX_SUNRPC_DEBUG_H_ | 9 | #ifndef _LINUX_SUNRPC_DEBUG_H_ |
10 | #define _LINUX_SUNRPC_DEBUG_H_ | 10 | #define _LINUX_SUNRPC_DEBUG_H_ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | |||
14 | #include <linux/timer.h> | ||
15 | #include <linux/workqueue.h> | ||
16 | |||
17 | /* | ||
18 | * Enable RPC debugging/profiling. | ||
19 | */ | ||
20 | #ifdef CONFIG_SYSCTL | ||
21 | #define RPC_DEBUG | ||
22 | #endif | ||
23 | /* #define RPC_PROFILE */ | ||
24 | |||
25 | /* | 12 | /* |
26 | * RPC debug facilities | 13 | * RPC debug facilities |
27 | */ | 14 | */ |
@@ -41,6 +28,17 @@ | |||
41 | 28 | ||
42 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
43 | 30 | ||
31 | #include <linux/timer.h> | ||
32 | #include <linux/workqueue.h> | ||
33 | |||
34 | /* | ||
35 | * Enable RPC debugging/profiling. | ||
36 | */ | ||
37 | #ifdef CONFIG_SYSCTL | ||
38 | #define RPC_DEBUG | ||
39 | #endif | ||
40 | /* #define RPC_PROFILE */ | ||
41 | |||
44 | /* | 42 | /* |
45 | * Debugging macros etc | 43 | * Debugging macros etc |
46 | */ | 44 | */ |
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index d93c24b47f3f..5fa0f2084307 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #ifndef _LINUX_SUNRPC_STATS_H | 9 | #ifndef _LINUX_SUNRPC_STATS_H |
10 | #define _LINUX_SUNRPC_STATS_H | 10 | #define _LINUX_SUNRPC_STATS_H |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
14 | 13 | ||
15 | struct rpc_stat { | 14 | struct rpc_stat { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 37c1c76fd547..96e31aa64cc7 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #endif | 6 | #endif |
7 | #include <linux/swap.h> | 7 | #include <linux/swap.h> |
8 | #include <linux/notifier.h> | 8 | #include <linux/notifier.h> |
9 | #include <linux/config.h> | ||
10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
11 | #include <linux/pm.h> | 10 | #include <linux/pm.h> |
12 | 11 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index f03c24719302..aca9bfae208f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_SWAP_H | 1 | #ifndef _LINUX_SWAP_H |
2 | #define _LINUX_SWAP_H | 2 | #define _LINUX_SWAP_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
6 | #include <linux/linkage.h> | 5 | #include <linux/linkage.h> |
7 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 60d49e5456e7..bd67a4413df7 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -54,7 +54,6 @@ struct compat_stat; | |||
54 | struct compat_timeval; | 54 | struct compat_timeval; |
55 | struct robust_list_head; | 55 | struct robust_list_head; |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/types.h> | 57 | #include <linux/types.h> |
59 | #include <linux/aio_abi.h> | 58 | #include <linux/aio_abi.h> |
60 | #include <linux/capability.h> | 59 | #include <linux/capability.h> |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index ea819b89c235..4812ff60561c 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -11,7 +11,6 @@ | |||
11 | * based upon discusions in irc://irc.openprojects.net/#kernelnewbies | 11 | * based upon discusions in irc://irc.openprojects.net/#kernelnewbies |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | 14 | ||
16 | struct pt_regs; | 15 | struct pt_regs; |
17 | struct tty_struct; | 16 | struct tty_struct; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index c90daa5da6c3..420a689c3fb4 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -160,7 +160,6 @@ struct tcp_info | |||
160 | 160 | ||
161 | #ifdef __KERNEL__ | 161 | #ifdef __KERNEL__ |
162 | 162 | ||
163 | #include <linux/config.h> | ||
164 | #include <linux/skbuff.h> | 163 | #include <linux/skbuff.h> |
165 | #include <net/sock.h> | 164 | #include <net/sock.h> |
166 | #include <net/inet_connection_sock.h> | 165 | #include <net/inet_connection_sock.h> |
diff --git a/include/linux/threads.h b/include/linux/threads.h index e646bcdf2614..38d1a5d6568e 100644 --- a/include/linux/threads.h +++ b/include/linux/threads.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_THREADS_H | 1 | #ifndef _LINUX_THREADS_H |
2 | #define _LINUX_THREADS_H | 2 | #define _LINUX_THREADS_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * The default limit for the nr of threads is now in | 6 | * The default limit for the nr of threads is now in |
diff --git a/include/linux/timer.h b/include/linux/timer.h index 0a485beba9f5..c982304dbafd 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_TIMER_H | 1 | #ifndef _LINUX_TIMER_H |
2 | #define _LINUX_TIMER_H | 2 | #define _LINUX_TIMER_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/list.h> | 4 | #include <linux/list.h> |
6 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
7 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 03914b7e41b1..34d3ccff7bbb 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -53,7 +53,6 @@ | |||
53 | #ifndef _LINUX_TIMEX_H | 53 | #ifndef _LINUX_TIMEX_H |
54 | #define _LINUX_TIMEX_H | 54 | #define _LINUX_TIMEX_H |
55 | 55 | ||
56 | #include <linux/config.h> | ||
57 | #include <linux/compiler.h> | 56 | #include <linux/compiler.h> |
58 | #include <linux/time.h> | 57 | #include <linux/time.h> |
59 | 58 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index f13f49afe198..e898eeb94166 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -16,7 +16,6 @@ | |||
16 | consoles 16 and higher (since it returns a short) */ | 16 | consoles 16 and higher (since it returns a short) */ |
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/config.h> | ||
20 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
21 | #include <linux/major.h> | 20 | #include <linux/major.h> |
22 | #include <linux/termios.h> | 21 | #include <linux/termios.h> |
diff --git a/include/linux/types.h b/include/linux/types.h index 1046c7ad86d9..a5e46e783ffa 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_TYPES_H | 2 | #define _LINUX_TYPES_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <linux/config.h> | ||
6 | 5 | ||
7 | #define BITS_TO_LONGS(bits) \ | 6 | #define BITS_TO_LONGS(bits) \ |
8 | (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) | 7 | (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 85a55658831c..bdd39be09406 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -35,7 +35,6 @@ struct udphdr { | |||
35 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ | 35 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ |
36 | 36 | ||
37 | #ifdef __KERNEL__ | 37 | #ifdef __KERNEL__ |
38 | #include <linux/config.h> | ||
39 | #include <linux/types.h> | 38 | #include <linux/types.h> |
40 | 39 | ||
41 | #include <net/inet_sock.h> | 40 | #include <net/inet_sock.h> |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 843aeaaa79d4..86b5b4271b5a 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/time.h> | ||
36 | #include <linux/stat.h> | 35 | #include <linux/stat.h> |
37 | #include <linux/fs.h> | 36 | #include <linux/fs.h> |
38 | 37 | ||
diff --git a/include/linux/unistd.h b/include/linux/unistd.h index 10ed9834b822..c18c60f3254e 100644 --- a/include/linux/unistd.h +++ b/include/linux/unistd.h | |||
@@ -1,7 +1,9 @@ | |||
1 | #ifndef _LINUX_UNISTD_H_ | 1 | #ifndef _LINUX_UNISTD_H_ |
2 | #define _LINUX_UNISTD_H_ | 2 | #define _LINUX_UNISTD_H_ |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
4 | extern int errno; | 5 | extern int errno; |
6 | #endif | ||
5 | 7 | ||
6 | /* | 8 | /* |
7 | * Include machine specific syscallX macros | 9 | * Include machine specific syscallX macros |
diff --git a/include/linux/usb.h b/include/linux/usb.h index e34e5e3dce52..1f492c0c7047 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/errno.h> /* for -ENODEV */ | 13 | #include <linux/errno.h> /* for -ENODEV */ |
15 | #include <linux/delay.h> /* for mdelay() */ | 14 | #include <linux/delay.h> /* for mdelay() */ |
16 | #include <linux/interrupt.h> /* for in_interrupt() */ | 15 | #include <linux/interrupt.h> /* for in_interrupt() */ |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index b2d08984a9f7..608487a62c98 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #ifndef __LINUX_USB_USUAL_H | 9 | #ifndef __LINUX_USB_USUAL_H |
10 | #define __LINUX_USB_USUAL_H | 10 | #define __LINUX_USB_USUAL_H |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | /* We should do this for cleanliness... But other usb_foo.h do not do this. */ | 13 | /* We should do this for cleanliness... But other usb_foo.h do not do this. */ |
15 | /* #include <linux/usb.h> */ | 14 | /* #include <linux/usb.h> */ |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 8859f0b41543..7b7aadb69092 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -123,6 +123,7 @@ struct usbdevfs_hub_portinfo { | |||
123 | char port [127]; /* e.g. port 3 connects to device 27 */ | 123 | char port [127]; /* e.g. port 3 connects to device 27 */ |
124 | }; | 124 | }; |
125 | 125 | ||
126 | #ifdef __KERNEL__ | ||
126 | #ifdef CONFIG_COMPAT | 127 | #ifdef CONFIG_COMPAT |
127 | #include <linux/compat.h> | 128 | #include <linux/compat.h> |
128 | struct usbdevfs_urb32 { | 129 | struct usbdevfs_urb32 { |
@@ -147,6 +148,7 @@ struct usbdevfs_ioctl32 { | |||
147 | compat_caddr_t data; | 148 | compat_caddr_t data; |
148 | }; | 149 | }; |
149 | #endif | 150 | #endif |
151 | #endif /* __KERNEL__ */ | ||
150 | 152 | ||
151 | #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) | 153 | #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) |
152 | #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) | 154 | #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) |
diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h index 1f7ba3629053..057db7d2f448 100644 --- a/include/linux/vt_buffer.h +++ b/include/linux/vt_buffer.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef _LINUX_VT_BUFFER_H_ | 13 | #ifndef _LINUX_VT_BUFFER_H_ |
14 | #define _LINUX_VT_BUFFER_H_ | 14 | #define _LINUX_VT_BUFFER_H_ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) | 17 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) |
19 | #include <asm/vga.h> | 18 | #include <asm/vga.h> |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index fab5aed8ca31..940d0261a545 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * with information needed by the vt package | 6 | * with information needed by the vt package |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/vt.h> | 9 | #include <linux/vt.h> |
11 | #include <linux/kd.h> | 10 | #include <linux/kd.h> |
12 | #include <linux/tty.h> | 11 | #include <linux/tty.h> |
diff --git a/include/linux/wait.h b/include/linux/wait.h index d28518236b62..544e855c7c02 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/list.h> | 22 | #include <linux/list.h> |
24 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
25 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 1b6b76a4eb54..2cd05013edfc 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h | |||
@@ -44,8 +44,6 @@ | |||
44 | * Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h). | 44 | * Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h). |
45 | *****************************************************************************/ | 45 | *****************************************************************************/ |
46 | 46 | ||
47 | #include <linux/spinlock.h> /* Support for SMP Locking */ | ||
48 | |||
49 | #ifndef _ROUTER_H | 47 | #ifndef _ROUTER_H |
50 | #define _ROUTER_H | 48 | #define _ROUTER_H |
51 | 49 | ||
@@ -457,6 +455,8 @@ typedef struct wanif_conf | |||
457 | #include <linux/fs.h> /* support for device drivers */ | 455 | #include <linux/fs.h> /* support for device drivers */ |
458 | #include <linux/proc_fs.h> /* proc filesystem pragmatics */ | 456 | #include <linux/proc_fs.h> /* proc filesystem pragmatics */ |
459 | #include <linux/netdevice.h> /* support for network drivers */ | 457 | #include <linux/netdevice.h> /* support for network drivers */ |
458 | #include <linux/spinlock.h> /* Support for SMP Locking */ | ||
459 | |||
460 | /*---------------------------------------------------------------------------- | 460 | /*---------------------------------------------------------------------------- |
461 | * WAN device data space. | 461 | * WAN device data space. |
462 | */ | 462 | */ |