diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-04 22:50:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-04 22:50:27 -0400 |
commit | d932cb7e630cae3b6b5307b767d296ff1a597c5e (patch) | |
tree | f930d068a12a256fabef0864bcdf8e85f095369e /include/linux | |
parent | 73b59a3b1c09e4bfc678400b77b96134dcfbf112 (diff) | |
parent | f5d635f649607b09b0b4620d25d028fd2b1b7ea5 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'include/linux')
69 files changed, 1072 insertions, 154 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index b27d7debc5a1..64f9f9e56ac5 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -327,21 +327,31 @@ extern void __audit_getname(const char *name); | |||
327 | extern void audit_putname(const char *name); | 327 | extern void audit_putname(const char *name); |
328 | extern void __audit_inode(const char *name, const struct inode *inode); | 328 | extern void __audit_inode(const char *name, const struct inode *inode); |
329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
330 | unsigned long pino); | 330 | const struct inode *parent); |
331 | extern void __audit_inode_update(const struct inode *inode); | ||
332 | static inline int audit_dummy_context(void) | ||
333 | { | ||
334 | void *p = current->audit_context; | ||
335 | return !p || *(int *)p; | ||
336 | } | ||
331 | static inline void audit_getname(const char *name) | 337 | static inline void audit_getname(const char *name) |
332 | { | 338 | { |
333 | if (unlikely(current->audit_context)) | 339 | if (unlikely(!audit_dummy_context())) |
334 | __audit_getname(name); | 340 | __audit_getname(name); |
335 | } | 341 | } |
336 | static inline void audit_inode(const char *name, const struct inode *inode) { | 342 | static inline void audit_inode(const char *name, const struct inode *inode) { |
337 | if (unlikely(current->audit_context)) | 343 | if (unlikely(!audit_dummy_context())) |
338 | __audit_inode(name, inode); | 344 | __audit_inode(name, inode); |
339 | } | 345 | } |
340 | static inline void audit_inode_child(const char *dname, | 346 | static inline void audit_inode_child(const char *dname, |
341 | const struct inode *inode, | 347 | const struct inode *inode, |
342 | unsigned long pino) { | 348 | const struct inode *parent) { |
343 | if (unlikely(current->audit_context)) | 349 | if (unlikely(!audit_dummy_context())) |
344 | __audit_inode_child(dname, inode, pino); | 350 | __audit_inode_child(dname, inode, parent); |
351 | } | ||
352 | static inline void audit_inode_update(const struct inode *inode) { | ||
353 | if (unlikely(!audit_dummy_context())) | ||
354 | __audit_inode_update(inode); | ||
345 | } | 355 | } |
346 | 356 | ||
347 | /* Private API (for audit.c only) */ | 357 | /* Private API (for audit.c only) */ |
@@ -365,57 +375,61 @@ extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | |||
365 | 375 | ||
366 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | 376 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) |
367 | { | 377 | { |
368 | if (unlikely(current->audit_context)) | 378 | if (unlikely(!audit_dummy_context())) |
369 | return __audit_ipc_obj(ipcp); | 379 | return __audit_ipc_obj(ipcp); |
370 | return 0; | 380 | return 0; |
371 | } | 381 | } |
372 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 382 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
373 | { | 383 | { |
374 | if (unlikely(current->audit_context)) | 384 | if (unlikely(!audit_dummy_context())) |
375 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); | 385 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); |
376 | return 0; | 386 | return 0; |
377 | } | 387 | } |
378 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) | 388 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) |
379 | { | 389 | { |
380 | if (unlikely(current->audit_context)) | 390 | if (unlikely(!audit_dummy_context())) |
381 | return __audit_mq_open(oflag, mode, u_attr); | 391 | return __audit_mq_open(oflag, mode, u_attr); |
382 | return 0; | 392 | return 0; |
383 | } | 393 | } |
384 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) | 394 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) |
385 | { | 395 | { |
386 | if (unlikely(current->audit_context)) | 396 | if (unlikely(!audit_dummy_context())) |
387 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); | 397 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); |
388 | return 0; | 398 | return 0; |
389 | } | 399 | } |
390 | 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) | 400 | 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) |
391 | { | 401 | { |
392 | if (unlikely(current->audit_context)) | 402 | if (unlikely(!audit_dummy_context())) |
393 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); | 403 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); |
394 | return 0; | 404 | return 0; |
395 | } | 405 | } |
396 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) | 406 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) |
397 | { | 407 | { |
398 | if (unlikely(current->audit_context)) | 408 | if (unlikely(!audit_dummy_context())) |
399 | return __audit_mq_notify(mqdes, u_notification); | 409 | return __audit_mq_notify(mqdes, u_notification); |
400 | return 0; | 410 | return 0; |
401 | } | 411 | } |
402 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | 412 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) |
403 | { | 413 | { |
404 | if (unlikely(current->audit_context)) | 414 | if (unlikely(!audit_dummy_context())) |
405 | return __audit_mq_getsetattr(mqdes, mqstat); | 415 | return __audit_mq_getsetattr(mqdes, mqstat); |
406 | return 0; | 416 | return 0; |
407 | } | 417 | } |
418 | extern int audit_n_rules; | ||
408 | #else | 419 | #else |
409 | #define audit_alloc(t) ({ 0; }) | 420 | #define audit_alloc(t) ({ 0; }) |
410 | #define audit_free(t) do { ; } while (0) | 421 | #define audit_free(t) do { ; } while (0) |
411 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) | 422 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) |
412 | #define audit_syscall_exit(f,r) do { ; } while (0) | 423 | #define audit_syscall_exit(f,r) do { ; } while (0) |
424 | #define audit_dummy_context() 1 | ||
413 | #define audit_getname(n) do { ; } while (0) | 425 | #define audit_getname(n) do { ; } while (0) |
414 | #define audit_putname(n) do { ; } while (0) | 426 | #define audit_putname(n) do { ; } while (0) |
415 | #define __audit_inode(n,i) do { ; } while (0) | 427 | #define __audit_inode(n,i) do { ; } while (0) |
416 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 428 | #define __audit_inode_child(d,i,p) do { ; } while (0) |
429 | #define __audit_inode_update(i) do { ; } while (0) | ||
417 | #define audit_inode(n,i) do { ; } while (0) | 430 | #define audit_inode(n,i) do { ; } while (0) |
418 | #define audit_inode_child(d,i,p) do { ; } while (0) | 431 | #define audit_inode_child(d,i,p) do { ; } while (0) |
432 | #define audit_inode_update(i) do { ; } while (0) | ||
419 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 433 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
420 | #define audit_get_loginuid(c) ({ -1; }) | 434 | #define audit_get_loginuid(c) ({ -1; }) |
421 | #define audit_ipc_obj(i) ({ 0; }) | 435 | #define audit_ipc_obj(i) ({ 0; }) |
@@ -430,6 +444,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | |||
430 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | 444 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) |
431 | #define audit_mq_notify(d,n) ({ 0; }) | 445 | #define audit_mq_notify(d,n) ({ 0; }) |
432 | #define audit_mq_getsetattr(d,s) ({ 0; }) | 446 | #define audit_mq_getsetattr(d,s) ({ 0; }) |
447 | #define audit_n_rules 0 | ||
433 | #endif | 448 | #endif |
434 | 449 | ||
435 | #ifdef CONFIG_AUDIT | 450 | #ifdef CONFIG_AUDIT |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index a7e8cef73d15..7520cc1ff9e2 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -11,7 +11,7 @@ enum blktrace_cat { | |||
11 | BLK_TC_READ = 1 << 0, /* reads */ | 11 | BLK_TC_READ = 1 << 0, /* reads */ |
12 | BLK_TC_WRITE = 1 << 1, /* writes */ | 12 | BLK_TC_WRITE = 1 << 1, /* writes */ |
13 | BLK_TC_BARRIER = 1 << 2, /* barrier */ | 13 | BLK_TC_BARRIER = 1 << 2, /* barrier */ |
14 | BLK_TC_SYNC = 1 << 3, /* barrier */ | 14 | BLK_TC_SYNC = 1 << 3, /* sync IO */ |
15 | BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ | 15 | BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ |
16 | BLK_TC_REQUEUE = 1 << 5, /* requeueing */ | 16 | BLK_TC_REQUEUE = 1 << 5, /* requeueing */ |
17 | BLK_TC_ISSUE = 1 << 6, /* issue */ | 17 | BLK_TC_ISSUE = 1 << 6, /* issue */ |
@@ -19,6 +19,7 @@ enum blktrace_cat { | |||
19 | BLK_TC_FS = 1 << 8, /* fs requests */ | 19 | BLK_TC_FS = 1 << 8, /* fs requests */ |
20 | BLK_TC_PC = 1 << 9, /* pc requests */ | 20 | BLK_TC_PC = 1 << 9, /* pc requests */ |
21 | BLK_TC_NOTIFY = 1 << 10, /* special message */ | 21 | BLK_TC_NOTIFY = 1 << 10, /* special message */ |
22 | BLK_TC_AHEAD = 1 << 11, /* readahead */ | ||
22 | 23 | ||
23 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ | 24 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ |
24 | }; | 25 | }; |
@@ -147,7 +148,7 @@ static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq, | |||
147 | u32 what) | 148 | u32 what) |
148 | { | 149 | { |
149 | struct blk_trace *bt = q->blk_trace; | 150 | struct blk_trace *bt = q->blk_trace; |
150 | int rw = rq->flags & 0x07; | 151 | int rw = rq->flags & 0x03; |
151 | 152 | ||
152 | if (likely(!bt)) | 153 | if (likely(!bt)) |
153 | return; | 154 | return; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 22866fa2d960..1021f508d82c 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -91,7 +91,7 @@ static inline void *alloc_remap(int nid, unsigned long size) | |||
91 | } | 91 | } |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | extern unsigned long nr_kernel_pages; | 94 | extern unsigned long __meminitdata nr_kernel_pages; |
95 | extern unsigned long nr_all_pages; | 95 | extern unsigned long nr_all_pages; |
96 | 96 | ||
97 | extern void *__init alloc_large_system_hash(const char *tablename, | 97 | extern void *__init alloc_large_system_hash(const char *tablename, |
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index dbb7769009be..1c86d65bc4b9 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h | |||
@@ -57,7 +57,8 @@ struct proc_event { | |||
57 | PROC_EVENT_EXIT = 0x80000000 | 57 | PROC_EVENT_EXIT = 0x80000000 |
58 | } what; | 58 | } what; |
59 | __u32 cpu; | 59 | __u32 cpu; |
60 | struct timespec timestamp; | 60 | __u64 __attribute__((aligned(8))) timestamp_ns; |
61 | /* Number of nano seconds since system boot */ | ||
61 | union { /* must be last field of proc_event struct */ | 62 | union { /* must be last field of proc_event struct */ |
62 | struct { | 63 | struct { |
63 | __u32 err; | 64 | __u32 err; |
diff --git a/include/linux/completion.h b/include/linux/completion.h index 251c41e3ddd5..268c5a4a2bd4 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
@@ -18,6 +18,9 @@ struct completion { | |||
18 | #define COMPLETION_INITIALIZER(work) \ | 18 | #define COMPLETION_INITIALIZER(work) \ |
19 | { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } | 19 | { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } |
20 | 20 | ||
21 | #define COMPLETION_INITIALIZER_ONSTACK(work) \ | ||
22 | ({ init_completion(&work); work; }) | ||
23 | |||
21 | #define DECLARE_COMPLETION(work) \ | 24 | #define DECLARE_COMPLETION(work) \ |
22 | struct completion work = COMPLETION_INITIALIZER(work) | 25 | struct completion work = COMPLETION_INITIALIZER(work) |
23 | 26 | ||
@@ -28,7 +31,7 @@ struct completion { | |||
28 | */ | 31 | */ |
29 | #ifdef CONFIG_LOCKDEP | 32 | #ifdef CONFIG_LOCKDEP |
30 | # define DECLARE_COMPLETION_ONSTACK(work) \ | 33 | # define DECLARE_COMPLETION_ONSTACK(work) \ |
31 | struct completion work = ({ init_completion(&work); work; }) | 34 | struct completion work = COMPLETION_INITIALIZER_ONSTACK(work) |
32 | #else | 35 | #else |
33 | # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work) | 36 | # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work) |
34 | #endif | 37 | #endif |
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index f8e5587a0f92..25423f79bf9f 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -9,6 +9,7 @@ | |||
9 | * to achieve effects such as fast scrolling by changing the origin. | 9 | * to achieve effects such as fast scrolling by changing the origin. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/wait.h> | ||
12 | #include <linux/vt.h> | 13 | #include <linux/vt.h> |
13 | 14 | ||
14 | struct vt_struct; | 15 | struct vt_struct; |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 44a11f1ccaf2..8fb344a9abd8 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -48,7 +48,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
48 | { | 48 | { |
49 | } | 49 | } |
50 | #endif | 50 | #endif |
51 | extern int current_in_cpu_hotplug(void); | ||
52 | 51 | ||
53 | int cpu_up(unsigned int cpu); | 52 | int cpu_up(unsigned int cpu); |
54 | 53 | ||
@@ -61,10 +60,6 @@ static inline int register_cpu_notifier(struct notifier_block *nb) | |||
61 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | 60 | static inline void unregister_cpu_notifier(struct notifier_block *nb) |
62 | { | 61 | { |
63 | } | 62 | } |
64 | static inline int current_in_cpu_hotplug(void) | ||
65 | { | ||
66 | return 0; | ||
67 | } | ||
68 | 63 | ||
69 | #endif /* CONFIG_SMP */ | 64 | #endif /* CONFIG_SMP */ |
70 | extern struct sysdev_class cpu_sysdev_class; | 65 | extern struct sysdev_class cpu_sysdev_class; |
@@ -73,7 +68,6 @@ extern struct sysdev_class cpu_sysdev_class; | |||
73 | /* Stop CPUs going up and down. */ | 68 | /* Stop CPUs going up and down. */ |
74 | extern void lock_cpu_hotplug(void); | 69 | extern void lock_cpu_hotplug(void); |
75 | extern void unlock_cpu_hotplug(void); | 70 | extern void unlock_cpu_hotplug(void); |
76 | extern int lock_cpu_hotplug_interruptible(void); | ||
77 | #define hotcpu_notifier(fn, pri) { \ | 71 | #define hotcpu_notifier(fn, pri) { \ |
78 | static struct notifier_block fn##_nb = \ | 72 | static struct notifier_block fn##_nb = \ |
79 | { .notifier_call = fn, .priority = pri }; \ | 73 | { .notifier_call = fn, .priority = pri }; \ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 35e137636b0b..4ea39fee99c7 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -172,9 +172,6 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, | |||
172 | unsigned int relation); | 172 | unsigned int relation); |
173 | 173 | ||
174 | 174 | ||
175 | /* pass an event to the cpufreq governor */ | ||
176 | int cpufreq_governor(unsigned int cpu, unsigned int event); | ||
177 | |||
178 | int cpufreq_register_governor(struct cpufreq_governor *governor); | 175 | int cpufreq_register_governor(struct cpufreq_governor *governor); |
179 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); | 176 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); |
180 | 177 | ||
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h new file mode 100644 index 000000000000..11487b6e7127 --- /dev/null +++ b/include/linux/delayacct.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* delayacct.h - per-task delay accounting | ||
2 | * | ||
3 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
13 | * the GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef _LINUX_DELAYACCT_H | ||
18 | #define _LINUX_DELAYACCT_H | ||
19 | |||
20 | #include <linux/sched.h> | ||
21 | #include <linux/taskstats_kern.h> | ||
22 | |||
23 | /* | ||
24 | * Per-task flags relevant to delay accounting | ||
25 | * maintained privately to avoid exhausting similar flags in sched.h:PF_* | ||
26 | * Used to set current->delays->flags | ||
27 | */ | ||
28 | #define DELAYACCT_PF_SWAPIN 0x00000001 /* I am doing a swapin */ | ||
29 | |||
30 | #ifdef CONFIG_TASK_DELAY_ACCT | ||
31 | |||
32 | extern int delayacct_on; /* Delay accounting turned on/off */ | ||
33 | extern kmem_cache_t *delayacct_cache; | ||
34 | extern void delayacct_init(void); | ||
35 | extern void __delayacct_tsk_init(struct task_struct *); | ||
36 | extern void __delayacct_tsk_exit(struct task_struct *); | ||
37 | extern void __delayacct_blkio_start(void); | ||
38 | extern void __delayacct_blkio_end(void); | ||
39 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); | ||
40 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); | ||
41 | |||
42 | static inline void delayacct_set_flag(int flag) | ||
43 | { | ||
44 | if (current->delays) | ||
45 | current->delays->flags |= flag; | ||
46 | } | ||
47 | |||
48 | static inline void delayacct_clear_flag(int flag) | ||
49 | { | ||
50 | if (current->delays) | ||
51 | current->delays->flags &= ~flag; | ||
52 | } | ||
53 | |||
54 | static inline void delayacct_tsk_init(struct task_struct *tsk) | ||
55 | { | ||
56 | /* reinitialize in case parent's non-null pointer was dup'ed*/ | ||
57 | tsk->delays = NULL; | ||
58 | if (delayacct_on) | ||
59 | __delayacct_tsk_init(tsk); | ||
60 | } | ||
61 | |||
62 | static inline void delayacct_tsk_exit(struct task_struct *tsk) | ||
63 | { | ||
64 | if (tsk->delays) | ||
65 | __delayacct_tsk_exit(tsk); | ||
66 | } | ||
67 | |||
68 | static inline void delayacct_blkio_start(void) | ||
69 | { | ||
70 | if (current->delays) | ||
71 | __delayacct_blkio_start(); | ||
72 | } | ||
73 | |||
74 | static inline void delayacct_blkio_end(void) | ||
75 | { | ||
76 | if (current->delays) | ||
77 | __delayacct_blkio_end(); | ||
78 | } | ||
79 | |||
80 | static inline int delayacct_add_tsk(struct taskstats *d, | ||
81 | struct task_struct *tsk) | ||
82 | { | ||
83 | if (!delayacct_on || !tsk->delays) | ||
84 | return 0; | ||
85 | return __delayacct_add_tsk(d, tsk); | ||
86 | } | ||
87 | |||
88 | static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) | ||
89 | { | ||
90 | if (tsk->delays) | ||
91 | return __delayacct_blkio_ticks(tsk); | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | #else | ||
96 | static inline void delayacct_set_flag(int flag) | ||
97 | {} | ||
98 | static inline void delayacct_clear_flag(int flag) | ||
99 | {} | ||
100 | static inline void delayacct_init(void) | ||
101 | {} | ||
102 | static inline void delayacct_tsk_init(struct task_struct *tsk) | ||
103 | {} | ||
104 | static inline void delayacct_tsk_exit(struct task_struct *tsk) | ||
105 | {} | ||
106 | static inline void delayacct_blkio_start(void) | ||
107 | {} | ||
108 | static inline void delayacct_blkio_end(void) | ||
109 | {} | ||
110 | static inline int delayacct_add_tsk(struct taskstats *d, | ||
111 | struct task_struct *tsk) | ||
112 | { return 0; } | ||
113 | static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) | ||
114 | { return 0; } | ||
115 | #endif /* CONFIG_TASK_DELAY_ACCT */ | ||
116 | |||
117 | #endif | ||
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 0cf0bea010fe..9631dddae348 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -60,6 +60,16 @@ struct elf_prstatus | |||
60 | long pr_instr; /* Current instruction */ | 60 | long pr_instr; /* Current instruction */ |
61 | #endif | 61 | #endif |
62 | elf_gregset_t pr_reg; /* GP registers */ | 62 | elf_gregset_t pr_reg; /* GP registers */ |
63 | #ifdef CONFIG_BINFMT_ELF_FDPIC | ||
64 | /* When using FDPIC, the loadmap addresses need to be communicated | ||
65 | * to GDB in order for GDB to do the necessary relocations. The | ||
66 | * fields (below) used to communicate this information are placed | ||
67 | * immediately after ``pr_reg'', so that the loadmap addresses may | ||
68 | * be viewed as part of the register set if so desired. | ||
69 | */ | ||
70 | unsigned long pr_exec_fdpic_loadmap; | ||
71 | unsigned long pr_interp_fdpic_loadmap; | ||
72 | #endif | ||
63 | int pr_fpvalid; /* True if math co-processor being used. */ | 73 | int pr_fpvalid; /* True if math co-processor being used. */ |
64 | }; | 74 | }; |
65 | 75 | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 5607e6457a65..9f9cce7bd86d 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -492,6 +492,15 @@ static inline struct ext3_inode_info *EXT3_I(struct inode *inode) | |||
492 | { | 492 | { |
493 | return container_of(inode, struct ext3_inode_info, vfs_inode); | 493 | return container_of(inode, struct ext3_inode_info, vfs_inode); |
494 | } | 494 | } |
495 | |||
496 | static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) | ||
497 | { | ||
498 | return ino == EXT3_ROOT_INO || | ||
499 | ino == EXT3_JOURNAL_INO || | ||
500 | ino == EXT3_RESIZE_INO || | ||
501 | (ino >= EXT3_FIRST_INO(sb) && | ||
502 | ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); | ||
503 | } | ||
495 | #else | 504 | #else |
496 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 505 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
497 | * a kernel struct super_block. This will allow us to call the feature-test | 506 | * a kernel struct super_block. This will allow us to call the feature-test |
diff --git a/include/linux/fb.h b/include/linux/fb.h index ffefeeeeca93..4ad0673b1995 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -377,7 +377,6 @@ struct fb_cursor { | |||
377 | 377 | ||
378 | #include <linux/fs.h> | 378 | #include <linux/fs.h> |
379 | #include <linux/init.h> | 379 | #include <linux/init.h> |
380 | #include <linux/tty.h> | ||
381 | #include <linux/device.h> | 380 | #include <linux/device.h> |
382 | #include <linux/workqueue.h> | 381 | #include <linux/workqueue.h> |
383 | #include <linux/notifier.h> | 382 | #include <linux/notifier.h> |
@@ -525,7 +524,7 @@ struct fb_event { | |||
525 | 524 | ||
526 | extern int fb_register_client(struct notifier_block *nb); | 525 | extern int fb_register_client(struct notifier_block *nb); |
527 | extern int fb_unregister_client(struct notifier_block *nb); | 526 | extern int fb_unregister_client(struct notifier_block *nb); |
528 | 527 | extern int fb_notifier_call_chain(unsigned long val, void *v); | |
529 | /* | 528 | /* |
530 | * Pixmap structure definition | 529 | * Pixmap structure definition |
531 | * | 530 | * |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 134b32068246..25610205c90d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -27,6 +27,10 @@ | |||
27 | #define BLOCK_SIZE_BITS 10 | 27 | #define BLOCK_SIZE_BITS 10 |
28 | #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) | 28 | #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) |
29 | 29 | ||
30 | #define SEEK_SET 0 /* seek relative to beginning of file */ | ||
31 | #define SEEK_CUR 1 /* seek relative to current file position */ | ||
32 | #define SEEK_END 2 /* seek relative to end of file */ | ||
33 | |||
30 | /* And dynamically-tunable limits and defaults: */ | 34 | /* And dynamically-tunable limits and defaults: */ |
31 | struct files_stat_struct { | 35 | struct files_stat_struct { |
32 | int nr_files; /* read only */ | 36 | int nr_files; /* read only */ |
@@ -716,6 +720,7 @@ extern spinlock_t files_lock; | |||
716 | #define FL_POSIX 1 | 720 | #define FL_POSIX 1 |
717 | #define FL_FLOCK 2 | 721 | #define FL_FLOCK 2 |
718 | #define FL_ACCESS 8 /* not trying to lock, just looking */ | 722 | #define FL_ACCESS 8 /* not trying to lock, just looking */ |
723 | #define FL_EXISTS 16 /* when unlocking, test for existence */ | ||
719 | #define FL_LEASE 32 /* lease held on this file */ | 724 | #define FL_LEASE 32 /* lease held on this file */ |
720 | #define FL_CLOSE 64 /* unlock on close */ | 725 | #define FL_CLOSE 64 /* unlock on close */ |
721 | #define FL_SLEEP 128 /* A blocking lock */ | 726 | #define FL_SLEEP 128 /* A blocking lock */ |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index cc5dec70c32c..d4f219ffaa5d 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -67,7 +67,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
67 | if (source) { | 67 | if (source) { |
68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | 68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
69 | } | 69 | } |
70 | audit_inode_child(new_name, source, new_dir->i_ino); | 70 | audit_inode_child(new_name, source, new_dir); |
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | /* |
@@ -98,7 +98,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
98 | inode_dir_notify(inode, DN_CREATE); | 98 | inode_dir_notify(inode, DN_CREATE); |
99 | 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); | 100 | dentry->d_inode); |
101 | 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); |
102 | } | 102 | } |
103 | 103 | ||
104 | /* | 104 | /* |
@@ -109,7 +109,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
109 | inode_dir_notify(inode, DN_CREATE); | 109 | inode_dir_notify(inode, DN_CREATE); |
110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, | 110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, |
111 | dentry->d_name.name, dentry->d_inode); | 111 | dentry->d_name.name, dentry->d_inode); |
112 | 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); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* | 115 | /* |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 34c3a215f2cd..d097b5b72bc6 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -96,7 +96,8 @@ struct robust_list_head { | |||
96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, | 96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, |
97 | u32 __user *uaddr2, u32 val2, u32 val3); | 97 | u32 __user *uaddr2, u32 val2, u32 val3); |
98 | 98 | ||
99 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); | 99 | extern int |
100 | handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); | ||
100 | 101 | ||
101 | #ifdef CONFIG_FUTEX | 102 | #ifdef CONFIG_FUTEX |
102 | extern void exit_robust_list(struct task_struct *curr); | 103 | extern void exit_robust_list(struct task_struct *curr); |
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index 4513f9e40937..d5ebbb29aeae 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
@@ -224,8 +224,6 @@ static __inline__ void debug_frame(const struct sk_buff *skb) | |||
224 | int hdlc_open(struct net_device *dev); | 224 | int hdlc_open(struct net_device *dev); |
225 | /* Must be called by hardware driver when HDLC device is being closed */ | 225 | /* Must be called by hardware driver when HDLC device is being closed */ |
226 | void hdlc_close(struct net_device *dev); | 226 | void hdlc_close(struct net_device *dev); |
227 | /* Called by hardware driver when DCD line level changes */ | ||
228 | void hdlc_set_carrier(int on, struct net_device *dev); | ||
229 | 227 | ||
230 | /* May be used by hardware driver to gain control over HDLC device */ | 228 | /* May be used by hardware driver to gain control over HDLC device */ |
231 | static __inline__ void hdlc_proto_detach(hdlc_device *hdlc) | 229 | static __inline__ void hdlc_proto_detach(hdlc_device *hdlc) |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 21338bb3441d..9418519a55d1 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -115,6 +115,7 @@ | |||
115 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ | 115 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ |
116 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 116 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
117 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 117 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
118 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ | ||
118 | 119 | ||
119 | #define I2C_DRIVERID_I2CDEV 900 | 120 | #define I2C_DRIVERID_I2CDEV 900 |
120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 121 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 526ddc8eecfb..eb0628a7ecc6 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -193,6 +193,8 @@ struct i2c_algorithm { | |||
193 | to NULL. If an adapter algorithm can do SMBus access, set | 193 | to NULL. If an adapter algorithm can do SMBus access, set |
194 | smbus_xfer. If set to NULL, the SMBus protocol is simulated | 194 | smbus_xfer. If set to NULL, the SMBus protocol is simulated |
195 | using common I2C messages */ | 195 | using common I2C messages */ |
196 | /* master_xfer should return the number of messages successfully | ||
197 | processed, or a negative value on error */ | ||
196 | int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, | 198 | int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, |
197 | int num); | 199 | int num); |
198 | int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, | 200 | int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, |
diff --git a/include/linux/ide.h b/include/linux/ide.h index dc7abef10965..99620451d958 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -571,6 +571,7 @@ typedef struct ide_drive_s { | |||
571 | u8 waiting_for_dma; /* dma currently in progress */ | 571 | u8 waiting_for_dma; /* dma currently in progress */ |
572 | u8 unmask; /* okay to unmask other irqs */ | 572 | u8 unmask; /* okay to unmask other irqs */ |
573 | u8 bswap; /* byte swap data */ | 573 | u8 bswap; /* byte swap data */ |
574 | u8 noflush; /* don't attempt flushes */ | ||
574 | u8 dsc_overlap; /* DSC overlap */ | 575 | u8 dsc_overlap; /* DSC overlap */ |
575 | u8 nice1; /* give potential excess bandwidth */ | 576 | u8 nice1; /* give potential excess bandwidth */ |
576 | 577 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index eef0876d8307..383627ad328f 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -23,8 +23,8 @@ struct vlan_collection; | |||
23 | struct vlan_dev_info; | 23 | struct vlan_dev_info; |
24 | struct hlist_node; | 24 | struct hlist_node; |
25 | 25 | ||
26 | #include <linux/proc_fs.h> /* for proc_dir_entry */ | ||
27 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/etherdevice.h> | ||
28 | 28 | ||
29 | #define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) | 29 | #define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) |
30 | * that VLAN requires. | 30 | * that VLAN requires. |
@@ -185,7 +185,8 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, | |||
185 | * This allows the VLAN to have a different MAC than the underlying | 185 | * This allows the VLAN to have a different MAC than the underlying |
186 | * device, and still route correctly. | 186 | * device, and still route correctly. |
187 | */ | 187 | */ |
188 | if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN)) | 188 | if (!compare_ether_addr(eth_hdr(skb)->h_dest, |
189 | skb->dev->dev_addr)) | ||
189 | skb->pkt_type = PACKET_HOST; | 190 | skb->pkt_type = PACKET_HOST; |
190 | break; | 191 | break; |
191 | }; | 192 | }; |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 5612dfeeae50..d42c83399071 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -97,7 +97,7 @@ extern struct resource iomem_resource; | |||
97 | extern int request_resource(struct resource *root, struct resource *new); | 97 | extern int request_resource(struct resource *root, struct resource *new); |
98 | extern struct resource * ____request_resource(struct resource *root, struct resource *new); | 98 | extern struct resource * ____request_resource(struct resource *root, struct resource *new); |
99 | extern int release_resource(struct resource *new); | 99 | extern int release_resource(struct resource *new); |
100 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); | 100 | extern int insert_resource(struct resource *parent, struct resource *new); |
101 | extern int allocate_resource(struct resource *root, struct resource *new, | 101 | extern int allocate_resource(struct resource *root, struct resource *new, |
102 | resource_size_t size, resource_size_t min, | 102 | resource_size_t size, resource_size_t min, |
103 | resource_size_t max, resource_size_t align, | 103 | resource_size_t max, resource_size_t align, |
diff --git a/include/linux/irq.h b/include/linux/irq.h index b48eae32dc61..fbf6d901e9c2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -47,8 +47,8 @@ | |||
47 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ | 47 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ |
48 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ | 48 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ |
49 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ | 49 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ |
50 | #define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ | ||
50 | #ifdef CONFIG_IRQ_PER_CPU | 51 | #ifdef CONFIG_IRQ_PER_CPU |
51 | # define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ | ||
52 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 52 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
53 | #else | 53 | #else |
54 | # define CHECK_IRQ_PER_CPU(var) 0 | 54 | # define CHECK_IRQ_PER_CPU(var) 0 |
@@ -58,6 +58,7 @@ | |||
58 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ | 58 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ |
59 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ | 59 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ |
60 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ | 60 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ |
61 | #define IRQ_WAKEUP 0x20000000 /* IRQ triggers system wakeup */ | ||
61 | 62 | ||
62 | struct proc_dir_entry; | 63 | struct proc_dir_entry; |
63 | 64 | ||
@@ -124,6 +125,7 @@ struct irq_chip { | |||
124 | * @action: the irq action chain | 125 | * @action: the irq action chain |
125 | * @status: status information | 126 | * @status: status information |
126 | * @depth: disable-depth, for nested irq_disable() calls | 127 | * @depth: disable-depth, for nested irq_disable() calls |
128 | * @wake_depth: enable depth, for multiple set_irq_wake() callers | ||
127 | * @irq_count: stats field to detect stalled irqs | 129 | * @irq_count: stats field to detect stalled irqs |
128 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 130 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
129 | * @lock: locking for SMP | 131 | * @lock: locking for SMP |
@@ -147,6 +149,7 @@ struct irq_desc { | |||
147 | unsigned int status; /* IRQ status */ | 149 | unsigned int status; /* IRQ status */ |
148 | 150 | ||
149 | unsigned int depth; /* nested irq disables */ | 151 | unsigned int depth; /* nested irq disables */ |
152 | unsigned int wake_depth; /* nested wake enables */ | ||
150 | unsigned int irq_count; /* For detecting broken IRQs */ | 153 | unsigned int irq_count; /* For detecting broken IRQs */ |
151 | unsigned int irqs_unhandled; | 154 | unsigned int irqs_unhandled; |
152 | spinlock_t lock; | 155 | spinlock_t lock; |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 043376920f51..329ebcffa106 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -47,8 +47,8 @@ | |||
47 | * - (NOM / DEN) fits in (32 - LSH) bits. | 47 | * - (NOM / DEN) fits in (32 - LSH) bits. |
48 | * - (NOM % DEN) fits in (32 - LSH) bits. | 48 | * - (NOM % DEN) fits in (32 - LSH) bits. |
49 | */ | 49 | */ |
50 | #define SH_DIV(NOM,DEN,LSH) ( ((NOM / DEN) << LSH) \ | 50 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
51 | + (((NOM % DEN) << LSH) + DEN / 2) / DEN) | 51 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
52 | 52 | ||
53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ |
54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5c1ec1f84eab..181c69cad4e3 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -33,6 +33,7 @@ extern const char linux_banner[]; | |||
33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
34 | #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) | 34 | #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) |
35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
36 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | ||
36 | 37 | ||
37 | #define KERN_EMERG "<0>" /* system is unusable */ | 38 | #define KERN_EMERG "<0>" /* system is unusable */ |
38 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | 39 | #define KERN_ALERT "<1>" /* action must be taken immediately */ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 0503b2ed8bae..2d229327959e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -46,8 +46,6 @@ enum kobject_action { | |||
46 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ | 46 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
47 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | 47 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ |
48 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | 48 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ |
49 | KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */ | ||
50 | KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */ | ||
51 | }; | 49 | }; |
52 | 50 | ||
53 | struct kobject { | 51 | struct kobject { |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 7cce5dfa092f..1c65e7a9f186 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -28,7 +28,6 @@ struct task_struct *kthread_create(int (*threadfn)(void *data), | |||
28 | 28 | ||
29 | void kthread_bind(struct task_struct *k, unsigned int cpu); | 29 | void kthread_bind(struct task_struct *k, unsigned int cpu); |
30 | int kthread_stop(struct task_struct *k); | 30 | int kthread_stop(struct task_struct *k); |
31 | int kthread_stop_sem(struct task_struct *k, struct semaphore *s); | ||
32 | int kthread_should_stop(void); | 31 | int kthread_should_stop(void); |
33 | 32 | ||
34 | #endif /* _LINUX_KTHREAD_H */ | 33 | #endif /* _LINUX_KTHREAD_H */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index f4284bf89758..66c3100c2b94 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -131,6 +131,7 @@ enum { | |||
131 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | 131 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
132 | 132 | ||
133 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ | 133 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ |
134 | ATA_DFLAG_SUSPENDED = (1 << 9), /* device suspended */ | ||
134 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, | 135 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, |
135 | 136 | ||
136 | ATA_DFLAG_DETACH = (1 << 16), | 137 | ATA_DFLAG_DETACH = (1 << 16), |
@@ -160,22 +161,28 @@ enum { | |||
160 | ATA_FLAG_HRST_TO_RESUME = (1 << 11), /* hardreset to resume phy */ | 161 | ATA_FLAG_HRST_TO_RESUME = (1 << 11), /* hardreset to resume phy */ |
161 | ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H | 162 | ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H |
162 | * Register FIS clearing BSY */ | 163 | * Register FIS clearing BSY */ |
163 | |||
164 | ATA_FLAG_DEBUGMSG = (1 << 13), | 164 | ATA_FLAG_DEBUGMSG = (1 << 13), |
165 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 14), /* flush port task */ | ||
166 | 165 | ||
167 | ATA_FLAG_EH_PENDING = (1 << 15), /* EH pending */ | 166 | /* The following flag belongs to ap->pflags but is kept in |
168 | ATA_FLAG_EH_IN_PROGRESS = (1 << 16), /* EH in progress */ | 167 | * ap->flags because it's referenced in many LLDs and will be |
169 | ATA_FLAG_FROZEN = (1 << 17), /* port is frozen */ | 168 | * removed in not-too-distant future. |
170 | ATA_FLAG_RECOVERED = (1 << 18), /* recovery action performed */ | 169 | */ |
171 | ATA_FLAG_LOADING = (1 << 19), /* boot/loading probe */ | 170 | ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */ |
172 | ATA_FLAG_UNLOADING = (1 << 20), /* module is unloading */ | 171 | |
173 | ATA_FLAG_SCSI_HOTPLUG = (1 << 21), /* SCSI hotplug scheduled */ | 172 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
174 | 173 | ||
175 | ATA_FLAG_DISABLED = (1 << 22), /* port is disabled, ignore it */ | 174 | /* struct ata_port pflags */ |
176 | ATA_FLAG_SUSPENDED = (1 << 23), /* port is suspended (power) */ | 175 | ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */ |
176 | ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */ | ||
177 | ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */ | ||
178 | ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */ | ||
179 | ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */ | ||
180 | ATA_PFLAG_UNLOADING = (1 << 5), /* module is unloading */ | ||
181 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ | ||
177 | 182 | ||
178 | /* bits 24:31 of ap->flags are reserved for LLDD specific flags */ | 183 | ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ |
184 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | ||
185 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | ||
179 | 186 | ||
180 | /* struct ata_queued_cmd flags */ | 187 | /* struct ata_queued_cmd flags */ |
181 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ | 188 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
@@ -248,15 +255,24 @@ enum { | |||
248 | ATA_EH_REVALIDATE = (1 << 0), | 255 | ATA_EH_REVALIDATE = (1 << 0), |
249 | ATA_EH_SOFTRESET = (1 << 1), | 256 | ATA_EH_SOFTRESET = (1 << 1), |
250 | ATA_EH_HARDRESET = (1 << 2), | 257 | ATA_EH_HARDRESET = (1 << 2), |
258 | ATA_EH_SUSPEND = (1 << 3), | ||
259 | ATA_EH_RESUME = (1 << 4), | ||
260 | ATA_EH_PM_FREEZE = (1 << 5), | ||
251 | 261 | ||
252 | ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, | 262 | ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, |
253 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE, | 263 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE | ATA_EH_SUSPEND | |
264 | ATA_EH_RESUME | ATA_EH_PM_FREEZE, | ||
254 | 265 | ||
255 | /* ata_eh_info->flags */ | 266 | /* ata_eh_info->flags */ |
256 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ | 267 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ |
268 | ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ | ||
269 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ | ||
270 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ | ||
257 | 271 | ||
258 | ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ | 272 | ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ |
259 | 273 | ||
274 | ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, | ||
275 | |||
260 | /* max repeat if error condition is still set after ->error_handler */ | 276 | /* max repeat if error condition is still set after ->error_handler */ |
261 | ATA_EH_MAX_REPEAT = 5, | 277 | ATA_EH_MAX_REPEAT = 5, |
262 | 278 | ||
@@ -486,6 +502,7 @@ struct ata_port { | |||
486 | const struct ata_port_operations *ops; | 502 | const struct ata_port_operations *ops; |
487 | spinlock_t *lock; | 503 | spinlock_t *lock; |
488 | unsigned long flags; /* ATA_FLAG_xxx */ | 504 | unsigned long flags; /* ATA_FLAG_xxx */ |
505 | unsigned int pflags; /* ATA_PFLAG_xxx */ | ||
489 | unsigned int id; /* unique id req'd by scsi midlyr */ | 506 | unsigned int id; /* unique id req'd by scsi midlyr */ |
490 | unsigned int port_no; /* unique port #; from zero */ | 507 | unsigned int port_no; /* unique port #; from zero */ |
491 | unsigned int hard_port_no; /* hardware port #; from zero */ | 508 | unsigned int hard_port_no; /* hardware port #; from zero */ |
@@ -535,6 +552,9 @@ struct ata_port { | |||
535 | struct list_head eh_done_q; | 552 | struct list_head eh_done_q; |
536 | wait_queue_head_t eh_wait_q; | 553 | wait_queue_head_t eh_wait_q; |
537 | 554 | ||
555 | pm_message_t pm_mesg; | ||
556 | int *pm_result; | ||
557 | |||
538 | void *private_data; | 558 | void *private_data; |
539 | 559 | ||
540 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 560 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ |
@@ -589,6 +609,9 @@ struct ata_port_operations { | |||
589 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | 609 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, |
590 | u32 val); | 610 | u32 val); |
591 | 611 | ||
612 | int (*port_suspend) (struct ata_port *ap, pm_message_t mesg); | ||
613 | int (*port_resume) (struct ata_port *ap); | ||
614 | |||
592 | int (*port_start) (struct ata_port *ap); | 615 | int (*port_start) (struct ata_port *ap); |
593 | void (*port_stop) (struct ata_port *ap); | 616 | void (*port_stop) (struct ata_port *ap); |
594 | 617 | ||
@@ -622,9 +645,18 @@ struct ata_timing { | |||
622 | 645 | ||
623 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) | 646 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) |
624 | 647 | ||
625 | extern const unsigned long sata_deb_timing_boot[]; | 648 | extern const unsigned long sata_deb_timing_normal[]; |
626 | extern const unsigned long sata_deb_timing_eh[]; | 649 | extern const unsigned long sata_deb_timing_hotplug[]; |
627 | extern const unsigned long sata_deb_timing_before_fsrst[]; | 650 | extern const unsigned long sata_deb_timing_long[]; |
651 | |||
652 | static inline const unsigned long * | ||
653 | sata_ehc_deb_timing(struct ata_eh_context *ehc) | ||
654 | { | ||
655 | if (ehc->i.flags & ATA_EHI_HOTPLUGGED) | ||
656 | return sata_deb_timing_hotplug; | ||
657 | else | ||
658 | return sata_deb_timing_normal; | ||
659 | } | ||
628 | 660 | ||
629 | extern void ata_port_probe(struct ata_port *); | 661 | extern void ata_port_probe(struct ata_port *); |
630 | extern void __sata_phy_reset(struct ata_port *ap); | 662 | extern void __sata_phy_reset(struct ata_port *ap); |
@@ -644,6 +676,8 @@ extern void ata_std_ports(struct ata_ioports *ioaddr); | |||
644 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | 676 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, |
645 | unsigned int n_ports); | 677 | unsigned int n_ports); |
646 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 678 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
679 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state); | ||
680 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | ||
647 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); | 681 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); |
648 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 682 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
649 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 683 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
@@ -664,8 +698,9 @@ extern int ata_port_online(struct ata_port *ap); | |||
664 | extern int ata_port_offline(struct ata_port *ap); | 698 | extern int ata_port_offline(struct ata_port *ap); |
665 | extern int ata_scsi_device_resume(struct scsi_device *); | 699 | extern int ata_scsi_device_resume(struct scsi_device *); |
666 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); | 700 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); |
667 | extern int ata_device_resume(struct ata_device *); | 701 | extern int ata_host_set_suspend(struct ata_host_set *host_set, |
668 | extern int ata_device_suspend(struct ata_device *, pm_message_t state); | 702 | pm_message_t mesg); |
703 | extern void ata_host_set_resume(struct ata_host_set *host_set); | ||
669 | extern int ata_ratelimit(void); | 704 | extern int ata_ratelimit(void); |
670 | extern unsigned int ata_busy_sleep(struct ata_port *ap, | 705 | extern unsigned int ata_busy_sleep(struct ata_port *ap, |
671 | unsigned long timeout_pat, | 706 | unsigned long timeout_pat, |
@@ -825,19 +860,24 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
825 | (ehi)->desc_len = 0; \ | 860 | (ehi)->desc_len = 0; \ |
826 | } while (0) | 861 | } while (0) |
827 | 862 | ||
828 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | 863 | static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi) |
829 | { | 864 | { |
830 | if (ehi->flags & ATA_EHI_HOTPLUGGED) | 865 | if (ehi->flags & ATA_EHI_HOTPLUGGED) |
831 | return; | 866 | return; |
832 | 867 | ||
833 | ehi->flags |= ATA_EHI_HOTPLUGGED; | 868 | ehi->flags |= ATA_EHI_HOTPLUGGED | ATA_EHI_RESUME_LINK; |
834 | ehi->hotplug_timestamp = jiffies; | 869 | ehi->hotplug_timestamp = jiffies; |
835 | 870 | ||
836 | ehi->err_mask |= AC_ERR_ATA_BUS; | ||
837 | ehi->action |= ATA_EH_SOFTRESET; | 871 | ehi->action |= ATA_EH_SOFTRESET; |
838 | ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; | 872 | ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; |
839 | } | 873 | } |
840 | 874 | ||
875 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | ||
876 | { | ||
877 | __ata_ehi_hotplugged(ehi); | ||
878 | ehi->err_mask |= AC_ERR_ATA_BUS; | ||
879 | } | ||
880 | |||
841 | /* | 881 | /* |
842 | * qc helpers | 882 | * qc helpers |
843 | */ | 883 | */ |
@@ -921,6 +961,11 @@ static inline unsigned int ata_dev_absent(const struct ata_device *dev) | |||
921 | return ata_class_absent(dev->class); | 961 | return ata_class_absent(dev->class); |
922 | } | 962 | } |
923 | 963 | ||
964 | static inline unsigned int ata_dev_ready(const struct ata_device *dev) | ||
965 | { | ||
966 | return ata_dev_enabled(dev) && !(dev->flags & ATA_DFLAG_SUSPENDED); | ||
967 | } | ||
968 | |||
924 | /* | 969 | /* |
925 | * port helpers | 970 | * port helpers |
926 | */ | 971 | */ |
diff --git a/include/linux/list.h b/include/linux/list.h index 6b74adf5297f..65a5b5ceda49 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -265,6 +265,17 @@ static inline void list_move_tail(struct list_head *list, | |||
265 | } | 265 | } |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * list_is_last - tests whether @list is the last entry in list @head | ||
269 | * @list: the entry to test | ||
270 | * @head: the head of the list | ||
271 | */ | ||
272 | static inline int list_is_last(const struct list_head *list, | ||
273 | const struct list_head *head) | ||
274 | { | ||
275 | return list->next == head; | ||
276 | } | ||
277 | |||
278 | /** | ||
268 | * list_empty - tests whether a list is empty | 279 | * list_empty - tests whether a list is empty |
269 | * @head: the list to test. | 280 | * @head: the list to test. |
270 | */ | 281 | */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index aa4fe905bb4d..0d92c468d55a 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -123,7 +123,6 @@ struct nlm_block { | |||
123 | unsigned int b_id; /* block id */ | 123 | unsigned int b_id; /* block id */ |
124 | unsigned char b_queued; /* re-queued */ | 124 | unsigned char b_queued; /* re-queued */ |
125 | unsigned char b_granted; /* VFS granted lock */ | 125 | unsigned char b_granted; /* VFS granted lock */ |
126 | unsigned char b_done; /* callback complete */ | ||
127 | struct nlm_file * b_file; /* file in question */ | 126 | struct nlm_file * b_file; /* file in question */ |
128 | }; | 127 | }; |
129 | 128 | ||
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 316e0fb8d7b1..c040a8c969aa 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -120,7 +120,7 @@ struct lock_class { | |||
120 | */ | 120 | */ |
121 | struct lockdep_map { | 121 | struct lockdep_map { |
122 | struct lock_class_key *key; | 122 | struct lock_class_key *key; |
123 | struct lock_class *class[MAX_LOCKDEP_SUBCLASSES]; | 123 | struct lock_class *class_cache; |
124 | const char *name; | 124 | const char *name; |
125 | }; | 125 | }; |
126 | 126 | ||
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index bbc93ae217e1..432b2fa24929 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -89,4 +89,11 @@ extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ | |||
89 | # define RTC_VRT 0x80 /* valid RAM and time */ | 89 | # define RTC_VRT 0x80 /* valid RAM and time */ |
90 | /**********************************************************************/ | 90 | /**********************************************************************/ |
91 | 91 | ||
92 | #ifndef ARCH_RTC_LOCATION /* Override by <asm/mc146818rtc.h>? */ | ||
93 | |||
94 | #define RTC_IO_EXTENT 0x8 | ||
95 | #define RTC_IOMAPPED 1 /* Default to I/O mapping. */ | ||
96 | |||
97 | #endif /* ARCH_RTC_LOCATION */ | ||
98 | |||
92 | #endif /* _MC146818RTC_H */ | 99 | #endif /* _MC146818RTC_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index d06c74fb8c26..0dfb794c52d3 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -362,10 +362,8 @@ int is_module_address(unsigned long addr); | |||
362 | 362 | ||
363 | /* Returns module and fills in value, defined and namebuf, or NULL if | 363 | /* Returns module and fills in value, defined and namebuf, or NULL if |
364 | symnum out of range. */ | 364 | symnum out of range. */ |
365 | struct module *module_get_kallsym(unsigned int symnum, | 365 | struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, |
366 | unsigned long *value, | 366 | char *type, char *name, size_t namelen); |
367 | char *type, | ||
368 | char namebuf[128]); | ||
369 | 367 | ||
370 | /* Look for this name: can be of form module:name. */ | 368 | /* Look for this name: can be of form module:name. */ |
371 | unsigned long module_kallsyms_lookup_name(const char *name); | 369 | unsigned long module_kallsyms_lookup_name(const char *name); |
@@ -535,8 +533,8 @@ static inline const char *module_address_lookup(unsigned long addr, | |||
535 | 533 | ||
536 | static inline struct module *module_get_kallsym(unsigned int symnum, | 534 | static inline struct module *module_get_kallsym(unsigned int symnum, |
537 | unsigned long *value, | 535 | unsigned long *value, |
538 | char *type, | 536 | char *type, char *name, |
539 | char namebuf[128]) | 537 | size_t namelen) |
540 | { | 538 | { |
541 | return NULL; | 539 | return NULL; |
542 | } | 540 | } |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 58cb3d3d44b4..45511a5918d3 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -11,7 +11,7 @@ struct open_intent { | |||
11 | struct file *file; | 11 | struct file *file; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | enum { MAX_NESTED_LINKS = 5 }; | 14 | enum { MAX_NESTED_LINKS = 8 }; |
15 | 15 | ||
16 | struct nameidata { | 16 | struct nameidata { |
17 | struct dentry *dentry; | 17 | struct dentry *dentry; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 85f99f60deea..75f02d8c6ed3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -549,6 +549,7 @@ struct packet_type { | |||
549 | struct net_device *); | 549 | struct net_device *); |
550 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 550 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
551 | int features); | 551 | int features); |
552 | int (*gso_send_check)(struct sk_buff *skb); | ||
552 | void *af_packet_priv; | 553 | void *af_packet_priv; |
553 | struct list_head list; | 554 | struct list_head list; |
554 | }; | 555 | }; |
@@ -923,10 +924,10 @@ static inline void netif_tx_lock_bh(struct net_device *dev) | |||
923 | 924 | ||
924 | static inline int netif_tx_trylock(struct net_device *dev) | 925 | static inline int netif_tx_trylock(struct net_device *dev) |
925 | { | 926 | { |
926 | int err = spin_trylock(&dev->_xmit_lock); | 927 | int ok = spin_trylock(&dev->_xmit_lock); |
927 | if (!err) | 928 | if (likely(ok)) |
928 | dev->xmit_lock_owner = smp_processor_id(); | 929 | dev->xmit_lock_owner = smp_processor_id(); |
929 | return err; | 930 | return ok; |
930 | } | 931 | } |
931 | 932 | ||
932 | static inline void netif_tx_unlock(struct net_device *dev) | 933 | static inline void netif_tx_unlock(struct net_device *dev) |
@@ -1001,13 +1002,14 @@ static inline int net_gso_ok(int features, int gso_type) | |||
1001 | 1002 | ||
1002 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 1003 | static inline int skb_gso_ok(struct sk_buff *skb, int features) |
1003 | { | 1004 | { |
1004 | return net_gso_ok(features, skb_shinfo(skb)->gso_size ? | 1005 | return net_gso_ok(features, skb_shinfo(skb)->gso_type); |
1005 | skb_shinfo(skb)->gso_type : 0); | ||
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
1009 | { | 1009 | { |
1010 | return !skb_gso_ok(skb, dev->features); | 1010 | return skb_is_gso(skb) && |
1011 | (!skb_gso_ok(skb, dev->features) || | ||
1012 | unlikely(skb->ip_summed != CHECKSUM_HW)); | ||
1011 | } | 1013 | } |
1012 | 1014 | ||
1013 | #endif /* __KERNEL__ */ | 1015 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 87764022cc67..10c13dc4665b 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/netfilter.h> | 7 | #include <linux/netfilter.h> |
8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) | 8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) |
9 | #include <asm/atomic.h> | ||
10 | #include <linux/if_ether.h> | 9 | #include <linux/if_ether.h> |
11 | #endif | 10 | #endif |
12 | 11 | ||
@@ -79,6 +78,8 @@ struct bridge_skb_cb { | |||
79 | __u32 ipv4; | 78 | __u32 ipv4; |
80 | } daddr; | 79 | } daddr; |
81 | }; | 80 | }; |
81 | |||
82 | extern int brnf_deferred_hooks; | ||
82 | #endif /* CONFIG_BRIDGE_NETFILTER */ | 83 | #endif /* CONFIG_BRIDGE_NETFILTER */ |
83 | 84 | ||
84 | #endif /* __KERNEL__ */ | 85 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 5f681d534295..db05182ca0e8 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -157,6 +157,12 @@ enum nfs_opnum4 { | |||
157 | OP_ILLEGAL = 10044, | 157 | OP_ILLEGAL = 10044, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | /*Defining first and last NFS4 operations implemented. | ||
161 | Needs to be updated if more operations are defined in future.*/ | ||
162 | |||
163 | #define FIRST_NFS4_OP OP_ACCESS | ||
164 | #define LAST_NFS4_OP OP_RELEASE_LOCKOWNER | ||
165 | |||
160 | enum nfsstat4 { | 166 | enum nfsstat4 { |
161 | NFS4_OK = 0, | 167 | NFS4_OK = 0, |
162 | NFS4ERR_PERM = 1, | 168 | NFS4ERR_PERM = 1, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 55ea853d57bc..247434553ae8 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -476,10 +476,9 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) | |||
476 | } | 476 | } |
477 | 477 | ||
478 | /* | 478 | /* |
479 | * Allocate and free nfs_write_data structures | 479 | * Allocate nfs_write_data structures |
480 | */ | 480 | */ |
481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); | 481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); |
482 | extern void nfs_writedata_free(struct nfs_write_data *p); | ||
483 | 482 | ||
484 | /* | 483 | /* |
485 | * linux/fs/nfs/read.c | 484 | * linux/fs/nfs/read.c |
@@ -491,10 +490,9 @@ extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); | |||
491 | extern void nfs_readdata_release(void *data); | 490 | extern void nfs_readdata_release(void *data); |
492 | 491 | ||
493 | /* | 492 | /* |
494 | * Allocate and free nfs_read_data structures | 493 | * Allocate nfs_read_data structures |
495 | */ | 494 | */ |
496 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); | 495 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); |
497 | extern void nfs_readdata_free(struct nfs_read_data *p); | ||
498 | 496 | ||
499 | /* | 497 | /* |
500 | * linux/fs/nfs3proc.c | 498 | * linux/fs/nfs3proc.c |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 7c7320fa51aa..2d3fb6416d91 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -729,6 +729,7 @@ struct nfs_read_data { | |||
729 | struct list_head pages; /* Coalesced read requests */ | 729 | struct list_head pages; /* Coalesced read requests */ |
730 | struct nfs_page *req; /* multi ops per nfs_page */ | 730 | struct nfs_page *req; /* multi ops per nfs_page */ |
731 | struct page **pagevec; | 731 | struct page **pagevec; |
732 | unsigned int npages; /* active pages in pagevec */ | ||
732 | struct nfs_readargs args; | 733 | struct nfs_readargs args; |
733 | struct nfs_readres res; | 734 | struct nfs_readres res; |
734 | #ifdef CONFIG_NFS_V4 | 735 | #ifdef CONFIG_NFS_V4 |
@@ -747,6 +748,7 @@ struct nfs_write_data { | |||
747 | struct list_head pages; /* Coalesced requests we wish to flush */ | 748 | struct list_head pages; /* Coalesced requests we wish to flush */ |
748 | struct nfs_page *req; /* multi ops per nfs_page */ | 749 | struct nfs_page *req; /* multi ops per nfs_page */ |
749 | struct page **pagevec; | 750 | struct page **pagevec; |
751 | unsigned int npages; /* active pages in pagevec */ | ||
750 | struct nfs_writeargs args; /* argument struct */ | 752 | struct nfs_writeargs args; /* argument struct */ |
751 | struct nfs_writeres res; /* result struct */ | 753 | struct nfs_writeres res; /* result struct */ |
752 | #ifdef CONFIG_NFS_V4 | 754 | #ifdef CONFIG_NFS_V4 |
diff --git a/include/linux/nfsd/stats.h b/include/linux/nfsd/stats.h index b6f1e0cda4f2..28a82fdd922f 100644 --- a/include/linux/nfsd/stats.h +++ b/include/linux/nfsd/stats.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef LINUX_NFSD_STATS_H | 9 | #ifndef LINUX_NFSD_STATS_H |
10 | #define LINUX_NFSD_STATS_H | 10 | #define LINUX_NFSD_STATS_H |
11 | 11 | ||
12 | #include <linux/nfs4.h> | ||
13 | |||
12 | struct nfsd_stats { | 14 | struct nfsd_stats { |
13 | unsigned int rchits; /* repcache hits */ | 15 | unsigned int rchits; /* repcache hits */ |
14 | unsigned int rcmisses; /* repcache hits */ | 16 | unsigned int rcmisses; /* repcache hits */ |
@@ -27,6 +29,10 @@ struct nfsd_stats { | |||
27 | unsigned int ra_size; /* size of ra cache */ | 29 | unsigned int ra_size; /* size of ra cache */ |
28 | unsigned int ra_depth[11]; /* number of times ra entry was found that deep | 30 | unsigned int ra_depth[11]; /* number of times ra entry was found that deep |
29 | * in the cache (10percentiles). [10] = not found */ | 31 | * in the cache (10percentiles). [10] = not found */ |
32 | #ifdef CONFIG_NFSD_V4 | ||
33 | unsigned int nfs4_opcount[LAST_NFS4_OP + 1]; /* count of individual nfsv4 operations */ | ||
34 | #endif | ||
35 | |||
30 | }; | 36 | }; |
31 | 37 | ||
32 | /* thread usage wraps very million seconds (approx one fortnight) */ | 38 | /* thread usage wraps very million seconds (approx one fortnight) */ |
diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h index 135742cfada5..7da0cf3702ee 100644 --- a/include/linux/nsc_gpio.h +++ b/include/linux/nsc_gpio.h | |||
@@ -25,8 +25,6 @@ struct nsc_gpio_ops { | |||
25 | void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); | 25 | void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); |
26 | int (*gpio_get) (unsigned iminor); | 26 | int (*gpio_get) (unsigned iminor); |
27 | void (*gpio_set) (unsigned iminor, int state); | 27 | void (*gpio_set) (unsigned iminor, int state); |
28 | void (*gpio_set_high)(unsigned iminor); | ||
29 | void (*gpio_set_low) (unsigned iminor); | ||
30 | void (*gpio_change) (unsigned iminor); | 28 | void (*gpio_change) (unsigned iminor); |
31 | int (*gpio_current) (unsigned iminor); | 29 | int (*gpio_current) (unsigned iminor); |
32 | struct device* dev; /* for dev_dbg() support, set in init */ | 30 | struct device* dev; /* for dev_dbg() support, set in init */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 983fca251b25..8565b81d7fbc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -161,6 +161,7 @@ struct pci_dev { | |||
161 | unsigned int is_enabled:1; /* pci_enable_device has been called */ | 161 | unsigned int is_enabled:1; /* pci_enable_device has been called */ |
162 | unsigned int is_busmaster:1; /* device is busmaster */ | 162 | unsigned int is_busmaster:1; /* device is busmaster */ |
163 | unsigned int no_msi:1; /* device may not use msi */ | 163 | unsigned int no_msi:1; /* device may not use msi */ |
164 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ | ||
164 | unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ | 165 | unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ |
165 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 166 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
166 | unsigned int msi_enabled:1; | 167 | unsigned int msi_enabled:1; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 685081c01342..4eae06b08cf2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2019,6 +2019,13 @@ | |||
2019 | #define PCI_VENDOR_ID_TDI 0x192E | 2019 | #define PCI_VENDOR_ID_TDI 0x192E |
2020 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2020 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2021 | 2021 | ||
2022 | #define PCI_VENDOR_ID_JMICRON 0x197B | ||
2023 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | ||
2024 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | ||
2025 | #define PCI_DEVICE_ID_JMICRON_JMB363 0x2363 | ||
2026 | #define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 | ||
2027 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 | ||
2028 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 | ||
2022 | 2029 | ||
2023 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2030 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2024 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2031 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
@@ -2135,6 +2142,7 @@ | |||
2135 | #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 | 2142 | #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 |
2136 | #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 | 2143 | #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 |
2137 | #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 | 2144 | #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 |
2145 | #define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c | ||
2138 | #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 | 2146 | #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 |
2139 | #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 | 2147 | #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 |
2140 | #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 | 2148 | #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 6bce4a240364..96930cb5927c 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -422,7 +422,23 @@ | |||
422 | #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ | 422 | #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ |
423 | #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ | 423 | #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ |
424 | #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ | 424 | #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ |
425 | /* Correctable Err Reporting Enable */ | ||
426 | #define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 | ||
427 | /* Non-fatal Err Reporting Enable */ | ||
428 | #define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 | ||
429 | /* Fatal Err Reporting Enable */ | ||
430 | #define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 | ||
425 | #define PCI_ERR_ROOT_STATUS 48 | 431 | #define PCI_ERR_ROOT_STATUS 48 |
432 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ | ||
433 | /* Multi ERR_COR Received */ | ||
434 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 | ||
435 | /* ERR_FATAL/NONFATAL Recevied */ | ||
436 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 | ||
437 | /* Multi ERR_FATAL/NONFATAL Recevied */ | ||
438 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 | ||
439 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First Fatal */ | ||
440 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ | ||
441 | #define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ | ||
426 | #define PCI_ERR_ROOT_COR_SRC 52 | 442 | #define PCI_ERR_ROOT_COR_SRC 52 |
427 | #define PCI_ERR_ROOT_SRC 54 | 443 | #define PCI_ERR_ROOT_SRC 54 |
428 | 444 | ||
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 78027c533b94..514729a44688 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h | |||
@@ -15,11 +15,6 @@ struct pm_dev __deprecated * | |||
15 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | 15 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Unregister all devices with matching callback | ||
19 | */ | ||
20 | void __deprecated pm_unregister_all(pm_callback callback); | ||
21 | |||
22 | /* | ||
23 | * Send a request to all devices | 18 | * Send a request to all devices |
24 | */ | 19 | */ |
25 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | 20 | int __deprecated pm_send_all(pm_request_t rqst, void *data); |
@@ -35,8 +30,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type, | |||
35 | return NULL; | 30 | return NULL; |
36 | } | 31 | } |
37 | 32 | ||
38 | static inline void pm_unregister_all(pm_callback callback) {} | ||
39 | |||
40 | static inline int pm_send_all(pm_request_t rqst, void *data) | 33 | static inline int pm_send_all(pm_request_t rqst, void *data) |
41 | { | 34 | { |
42 | return 0; | 35 | return 0; |
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 2ed807ddc08c..783177387ac6 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -231,7 +231,6 @@ extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; | |||
231 | extern unsigned int pmu_power_flags; | 231 | extern unsigned int pmu_power_flags; |
232 | 232 | ||
233 | /* Backlight */ | 233 | /* Backlight */ |
234 | extern int disable_kernel_backlight; | 234 | extern void pmu_backlight_init(void); |
235 | extern void pmu_backlight_init(struct device_node*); | ||
236 | 235 | ||
237 | #endif /* __KERNEL__ */ | 236 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index c1e0ac55bab5..d28890295852 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -148,9 +148,10 @@ struct mddev_s | |||
148 | 148 | ||
149 | struct mdk_thread_s *thread; /* management thread */ | 149 | struct mdk_thread_s *thread; /* management thread */ |
150 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ | 150 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ |
151 | sector_t curr_resync; /* blocks scheduled */ | 151 | sector_t curr_resync; /* last block scheduled */ |
152 | unsigned long resync_mark; /* a recent timestamp */ | 152 | unsigned long resync_mark; /* a recent timestamp */ |
153 | sector_t resync_mark_cnt;/* blocks written at resync_mark */ | 153 | sector_t resync_mark_cnt;/* blocks written at resync_mark */ |
154 | sector_t curr_mark_cnt; /* blocks scheduled now */ | ||
154 | 155 | ||
155 | sector_t resync_max_sectors; /* may be set by personality */ | 156 | sector_t resync_max_sectors; /* may be set by personality */ |
156 | 157 | ||
diff --git a/include/linux/root_dev.h b/include/linux/root_dev.h index ea4bc9d13735..ed241aad7c17 100644 --- a/include/linux/root_dev.h +++ b/include/linux/root_dev.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _ROOT_DEV_H_ | 2 | #define _ROOT_DEV_H_ |
3 | 3 | ||
4 | #include <linux/major.h> | 4 | #include <linux/major.h> |
5 | #include <linux/types.h> | ||
6 | #include <linux/kdev_t.h> | ||
5 | 7 | ||
6 | enum { | 8 | enum { |
7 | Root_NFS = MKDEV(UNNAMED_MAJOR, 255), | 9 | Root_NFS = MKDEV(UNNAMED_MAJOR, 255), |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 658afb37c3f5..7b524b4109a0 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -61,12 +61,25 @@ extern void downgrade_write(struct rw_semaphore *sem); | |||
61 | 61 | ||
62 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 62 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
63 | /* | 63 | /* |
64 | * nested locking: | 64 | * nested locking. NOTE: rwsems are not allowed to recurse |
65 | * (which occurs if the same task tries to acquire the same | ||
66 | * lock instance multiple times), but multiple locks of the | ||
67 | * same lock class might be taken, if the order of the locks | ||
68 | * is always the same. This ordering rule can be expressed | ||
69 | * to lockdep via the _nested() APIs, but enumerating the | ||
70 | * subclasses that are used. (If the nesting relationship is | ||
71 | * static then another method for expressing nested locking is | ||
72 | * the explicit definition of lock class keys and the use of | ||
73 | * lockdep_set_class() at lock initialization time. | ||
74 | * See Documentation/lockdep-design.txt for more details.) | ||
65 | */ | 75 | */ |
66 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); | 76 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); |
67 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); | 77 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); |
68 | /* | 78 | /* |
69 | * Take/release a lock when not the owner will release it: | 79 | * Take/release a lock when not the owner will release it. |
80 | * | ||
81 | * [ This API should be avoided as much as possible - the | ||
82 | * proper abstraction for this case is completions. ] | ||
70 | */ | 83 | */ |
71 | extern void down_read_non_owner(struct rw_semaphore *sem); | 84 | extern void down_read_non_owner(struct rw_semaphore *sem); |
72 | extern void up_read_non_owner(struct rw_semaphore *sem); | 85 | extern void up_read_non_owner(struct rw_semaphore *sem); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1c876e27ff93..6afa72e080cb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -463,6 +463,10 @@ struct signal_struct { | |||
463 | #ifdef CONFIG_BSD_PROCESS_ACCT | 463 | #ifdef CONFIG_BSD_PROCESS_ACCT |
464 | struct pacct_struct pacct; /* per-process accounting information */ | 464 | struct pacct_struct pacct; /* per-process accounting information */ |
465 | #endif | 465 | #endif |
466 | #ifdef CONFIG_TASKSTATS | ||
467 | spinlock_t stats_lock; | ||
468 | struct taskstats *stats; | ||
469 | #endif | ||
466 | }; | 470 | }; |
467 | 471 | ||
468 | /* Context switch must be unlocked if interrupts are to be enabled */ | 472 | /* Context switch must be unlocked if interrupts are to be enabled */ |
@@ -537,7 +541,7 @@ extern struct user_struct root_user; | |||
537 | struct backing_dev_info; | 541 | struct backing_dev_info; |
538 | struct reclaim_state; | 542 | struct reclaim_state; |
539 | 543 | ||
540 | #ifdef CONFIG_SCHEDSTATS | 544 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
541 | struct sched_info { | 545 | struct sched_info { |
542 | /* cumulative counters */ | 546 | /* cumulative counters */ |
543 | unsigned long cpu_time, /* time spent on the cpu */ | 547 | unsigned long cpu_time, /* time spent on the cpu */ |
@@ -548,9 +552,53 @@ struct sched_info { | |||
548 | unsigned long last_arrival, /* when we last ran on a cpu */ | 552 | unsigned long last_arrival, /* when we last ran on a cpu */ |
549 | last_queued; /* when we were last queued to run */ | 553 | last_queued; /* when we were last queued to run */ |
550 | }; | 554 | }; |
555 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ | ||
551 | 556 | ||
557 | #ifdef CONFIG_SCHEDSTATS | ||
552 | extern struct file_operations proc_schedstat_operations; | 558 | extern struct file_operations proc_schedstat_operations; |
559 | #endif /* CONFIG_SCHEDSTATS */ | ||
560 | |||
561 | #ifdef CONFIG_TASK_DELAY_ACCT | ||
562 | struct task_delay_info { | ||
563 | spinlock_t lock; | ||
564 | unsigned int flags; /* Private per-task flags */ | ||
565 | |||
566 | /* For each stat XXX, add following, aligned appropriately | ||
567 | * | ||
568 | * struct timespec XXX_start, XXX_end; | ||
569 | * u64 XXX_delay; | ||
570 | * u32 XXX_count; | ||
571 | * | ||
572 | * Atomicity of updates to XXX_delay, XXX_count protected by | ||
573 | * single lock above (split into XXX_lock if contention is an issue). | ||
574 | */ | ||
575 | |||
576 | /* | ||
577 | * XXX_count is incremented on every XXX operation, the delay | ||
578 | * associated with the operation is added to XXX_delay. | ||
579 | * XXX_delay contains the accumulated delay time in nanoseconds. | ||
580 | */ | ||
581 | struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */ | ||
582 | u64 blkio_delay; /* wait for sync block io completion */ | ||
583 | u64 swapin_delay; /* wait for swapin block io completion */ | ||
584 | u32 blkio_count; /* total count of the number of sync block */ | ||
585 | /* io operations performed */ | ||
586 | u32 swapin_count; /* total count of the number of swapin block */ | ||
587 | /* io operations performed */ | ||
588 | }; | ||
589 | #endif /* CONFIG_TASK_DELAY_ACCT */ | ||
590 | |||
591 | static inline int sched_info_on(void) | ||
592 | { | ||
593 | #ifdef CONFIG_SCHEDSTATS | ||
594 | return 1; | ||
595 | #elif defined(CONFIG_TASK_DELAY_ACCT) | ||
596 | extern int delayacct_on; | ||
597 | return delayacct_on; | ||
598 | #else | ||
599 | return 0; | ||
553 | #endif | 600 | #endif |
601 | } | ||
554 | 602 | ||
555 | enum idle_type | 603 | enum idle_type |
556 | { | 604 | { |
@@ -747,7 +795,7 @@ struct task_struct { | |||
747 | cpumask_t cpus_allowed; | 795 | cpumask_t cpus_allowed; |
748 | unsigned int time_slice, first_time_slice; | 796 | unsigned int time_slice, first_time_slice; |
749 | 797 | ||
750 | #ifdef CONFIG_SCHEDSTATS | 798 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
751 | struct sched_info sched_info; | 799 | struct sched_info sched_info; |
752 | #endif | 800 | #endif |
753 | 801 | ||
@@ -945,6 +993,10 @@ struct task_struct { | |||
945 | * cache last used pipe for splice | 993 | * cache last used pipe for splice |
946 | */ | 994 | */ |
947 | struct pipe_inode_info *splice_pipe; | 995 | struct pipe_inode_info *splice_pipe; |
996 | #ifdef CONFIG_TASK_DELAY_ACCT | ||
997 | spinlock_t delays_lock; | ||
998 | struct task_delay_info *delays; | ||
999 | #endif | ||
948 | }; | 1000 | }; |
949 | 1001 | ||
950 | static inline pid_t process_group(struct task_struct *tsk) | 1002 | static inline pid_t process_group(struct task_struct *tsk) |
diff --git a/include/linux/security.h b/include/linux/security.h index f75303831d09..6bc2aad494ff 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1109,6 +1109,16 @@ struct swap_info_struct; | |||
1109 | * @name contains the name of the security module being unstacked. | 1109 | * @name contains the name of the security module being unstacked. |
1110 | * @ops contains a pointer to the struct security_operations of the module to unstack. | 1110 | * @ops contains a pointer to the struct security_operations of the module to unstack. |
1111 | * | 1111 | * |
1112 | * @secid_to_secctx: | ||
1113 | * Convert secid to security context. | ||
1114 | * @secid contains the security ID. | ||
1115 | * @secdata contains the pointer that stores the converted security context. | ||
1116 | * | ||
1117 | * @release_secctx: | ||
1118 | * Release the security context. | ||
1119 | * @secdata contains the security context. | ||
1120 | * @seclen contains the length of the security context. | ||
1121 | * | ||
1112 | * This is the main security structure. | 1122 | * This is the main security structure. |
1113 | */ | 1123 | */ |
1114 | struct security_operations { | 1124 | struct security_operations { |
@@ -1289,6 +1299,8 @@ struct security_operations { | |||
1289 | 1299 | ||
1290 | int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); | 1300 | int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); |
1291 | int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); | 1301 | int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); |
1302 | int (*secid_to_secctx)(u32 secid, char **secdata, u32 *seclen); | ||
1303 | void (*release_secctx)(char *secdata, u32 seclen); | ||
1292 | 1304 | ||
1293 | #ifdef CONFIG_SECURITY_NETWORK | 1305 | #ifdef CONFIG_SECURITY_NETWORK |
1294 | int (*unix_stream_connect) (struct socket * sock, | 1306 | int (*unix_stream_connect) (struct socket * sock, |
@@ -1317,7 +1329,7 @@ struct security_operations { | |||
1317 | int (*socket_shutdown) (struct socket * sock, int how); | 1329 | int (*socket_shutdown) (struct socket * sock, int how); |
1318 | int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); | 1330 | int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); |
1319 | int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); | 1331 | int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); |
1320 | int (*socket_getpeersec_dgram) (struct sk_buff *skb, char **secdata, u32 *seclen); | 1332 | int (*socket_getpeersec_dgram) (struct socket *sock, struct sk_buff *skb, u32 *secid); |
1321 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); | 1333 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); |
1322 | void (*sk_free_security) (struct sock *sk); | 1334 | void (*sk_free_security) (struct sock *sk); |
1323 | unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); | 1335 | unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); |
@@ -2059,6 +2071,16 @@ static inline int security_netlink_recv(struct sk_buff * skb, int cap) | |||
2059 | return security_ops->netlink_recv(skb, cap); | 2071 | return security_ops->netlink_recv(skb, cap); |
2060 | } | 2072 | } |
2061 | 2073 | ||
2074 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | ||
2075 | { | ||
2076 | return security_ops->secid_to_secctx(secid, secdata, seclen); | ||
2077 | } | ||
2078 | |||
2079 | static inline void security_release_secctx(char *secdata, u32 seclen) | ||
2080 | { | ||
2081 | return security_ops->release_secctx(secdata, seclen); | ||
2082 | } | ||
2083 | |||
2062 | /* prototypes */ | 2084 | /* prototypes */ |
2063 | extern int security_init (void); | 2085 | extern int security_init (void); |
2064 | extern int register_security (struct security_operations *ops); | 2086 | extern int register_security (struct security_operations *ops); |
@@ -2725,6 +2747,14 @@ static inline void securityfs_remove(struct dentry *dentry) | |||
2725 | { | 2747 | { |
2726 | } | 2748 | } |
2727 | 2749 | ||
2750 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | ||
2751 | { | ||
2752 | return -EOPNOTSUPP; | ||
2753 | } | ||
2754 | |||
2755 | static inline void security_release_secctx(char *secdata, u32 seclen) | ||
2756 | { | ||
2757 | } | ||
2728 | #endif /* CONFIG_SECURITY */ | 2758 | #endif /* CONFIG_SECURITY */ |
2729 | 2759 | ||
2730 | #ifdef CONFIG_SECURITY_NETWORK | 2760 | #ifdef CONFIG_SECURITY_NETWORK |
@@ -2840,10 +2870,9 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ | |||
2840 | return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); | 2870 | return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); |
2841 | } | 2871 | } |
2842 | 2872 | ||
2843 | static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, | 2873 | static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) |
2844 | u32 *seclen) | ||
2845 | { | 2874 | { |
2846 | return security_ops->socket_getpeersec_dgram(skb, secdata, seclen); | 2875 | return security_ops->socket_getpeersec_dgram(sock, skb, secid); |
2847 | } | 2876 | } |
2848 | 2877 | ||
2849 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) | 2878 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) |
@@ -2968,8 +2997,7 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ | |||
2968 | return -ENOPROTOOPT; | 2997 | return -ENOPROTOOPT; |
2969 | } | 2998 | } |
2970 | 2999 | ||
2971 | static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, | 3000 | static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) |
2972 | u32 *seclen) | ||
2973 | { | 3001 | { |
2974 | return -ENOPROTOOPT; | 3002 | return -ENOPROTOOPT; |
2975 | } | 3003 | } |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 058cba70818a..86501a3de2ac 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -227,6 +227,7 @@ struct uart_port { | |||
227 | #define UPIO_MEM (2) | 227 | #define UPIO_MEM (2) |
228 | #define UPIO_MEM32 (3) | 228 | #define UPIO_MEM32 (3) |
229 | #define UPIO_AU (4) /* Au1x00 type IO */ | 229 | #define UPIO_AU (4) /* Au1x00 type IO */ |
230 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ | ||
230 | 231 | ||
231 | unsigned int read_status_mask; /* driver specific */ | 232 | unsigned int read_status_mask; /* driver specific */ |
232 | unsigned int ignore_status_mask; /* driver specific */ | 233 | unsigned int ignore_status_mask; /* driver specific */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3597b4f14389..19c96d498e20 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -604,12 +604,17 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) | |||
604 | return list_->qlen; | 604 | return list_->qlen; |
605 | } | 605 | } |
606 | 606 | ||
607 | extern struct lock_class_key skb_queue_lock_key; | 607 | /* |
608 | 608 | * This function creates a split out lock class for each invocation; | |
609 | * this is needed for now since a whole lot of users of the skb-queue | ||
610 | * infrastructure in drivers have different locking usage (in hardirq) | ||
611 | * than the networking core (in softirq only). In the long run either the | ||
612 | * network layer or drivers should need annotation to consolidate the | ||
613 | * main types of usage into 3 classes. | ||
614 | */ | ||
609 | static inline void skb_queue_head_init(struct sk_buff_head *list) | 615 | static inline void skb_queue_head_init(struct sk_buff_head *list) |
610 | { | 616 | { |
611 | spin_lock_init(&list->lock); | 617 | spin_lock_init(&list->lock); |
612 | lockdep_set_class(&list->lock, &skb_queue_lock_key); | ||
613 | list->prev = list->next = (struct sk_buff *)list; | 618 | list->prev = list->next = (struct sk_buff *)list; |
614 | list->qlen = 0; | 619 | list->qlen = 0; |
615 | } | 620 | } |
@@ -1066,9 +1071,8 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1066 | kfree_skb(skb); | 1071 | kfree_skb(skb); |
1067 | } | 1072 | } |
1068 | 1073 | ||
1069 | #ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB | ||
1070 | /** | 1074 | /** |
1071 | * __dev_alloc_skb - allocate an skbuff for sending | 1075 | * __dev_alloc_skb - allocate an skbuff for receiving |
1072 | * @length: length to allocate | 1076 | * @length: length to allocate |
1073 | * @gfp_mask: get_free_pages mask, passed to alloc_skb | 1077 | * @gfp_mask: get_free_pages mask, passed to alloc_skb |
1074 | * | 1078 | * |
@@ -1087,12 +1091,9 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | |||
1087 | skb_reserve(skb, NET_SKB_PAD); | 1091 | skb_reserve(skb, NET_SKB_PAD); |
1088 | return skb; | 1092 | return skb; |
1089 | } | 1093 | } |
1090 | #else | ||
1091 | extern struct sk_buff *__dev_alloc_skb(unsigned int length, int gfp_mask); | ||
1092 | #endif | ||
1093 | 1094 | ||
1094 | /** | 1095 | /** |
1095 | * dev_alloc_skb - allocate an skbuff for sending | 1096 | * dev_alloc_skb - allocate an skbuff for receiving |
1096 | * @length: length to allocate | 1097 | * @length: length to allocate |
1097 | * | 1098 | * |
1098 | * Allocate a new &sk_buff and assign it a usage count of one. The | 1099 | * Allocate a new &sk_buff and assign it a usage count of one. The |
@@ -1108,6 +1109,28 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) | |||
1108 | return __dev_alloc_skb(length, GFP_ATOMIC); | 1109 | return __dev_alloc_skb(length, GFP_ATOMIC); |
1109 | } | 1110 | } |
1110 | 1111 | ||
1112 | extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, | ||
1113 | unsigned int length, gfp_t gfp_mask); | ||
1114 | |||
1115 | /** | ||
1116 | * netdev_alloc_skb - allocate an skbuff for rx on a specific device | ||
1117 | * @dev: network device to receive on | ||
1118 | * @length: length to allocate | ||
1119 | * | ||
1120 | * Allocate a new &sk_buff and assign it a usage count of one. The | ||
1121 | * buffer has unspecified headroom built in. Users should allocate | ||
1122 | * the headroom they think they need without accounting for the | ||
1123 | * built in space. The built in space is used for optimisations. | ||
1124 | * | ||
1125 | * %NULL is returned if there is no free memory. Although this function | ||
1126 | * allocates memory it can be called from an interrupt. | ||
1127 | */ | ||
1128 | static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | ||
1129 | unsigned int length) | ||
1130 | { | ||
1131 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); | ||
1132 | } | ||
1133 | |||
1111 | /** | 1134 | /** |
1112 | * skb_cow - copy header of skb when it is required | 1135 | * skb_cow - copy header of skb when it is required |
1113 | * @skb: buffer to cow | 1136 | * @skb: buffer to cow |
@@ -1455,5 +1478,10 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1455 | { } | 1478 | { } |
1456 | #endif | 1479 | #endif |
1457 | 1480 | ||
1481 | static inline int skb_is_gso(const struct sk_buff *skb) | ||
1482 | { | ||
1483 | return skb_shinfo(skb)->gso_size; | ||
1484 | } | ||
1485 | |||
1458 | #endif /* __KERNEL__ */ | 1486 | #endif /* __KERNEL__ */ |
1459 | #endif /* _LINUX_SKBUFF_H */ | 1487 | #endif /* _LINUX_SKBUFF_H */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index e8bbe8118de8..840e47a4ccc5 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -229,7 +229,7 @@ int xprt_reserve_xprt(struct rpc_task *task); | |||
229 | int xprt_reserve_xprt_cong(struct rpc_task *task); | 229 | int xprt_reserve_xprt_cong(struct rpc_task *task); |
230 | int xprt_prepare_transmit(struct rpc_task *task); | 230 | int xprt_prepare_transmit(struct rpc_task *task); |
231 | void xprt_transmit(struct rpc_task *task); | 231 | void xprt_transmit(struct rpc_task *task); |
232 | void xprt_abort_transmit(struct rpc_task *task); | 232 | void xprt_end_transmit(struct rpc_task *task); |
233 | int xprt_adjust_timeout(struct rpc_rqst *req); | 233 | int xprt_adjust_timeout(struct rpc_rqst *req); |
234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h new file mode 100644 index 000000000000..f1cb6cddd19d --- /dev/null +++ b/include/linux/taskstats.h | |||
@@ -0,0 +1,137 @@ | |||
1 | /* taskstats.h - exporting per-task statistics | ||
2 | * | ||
3 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 | ||
4 | * (C) Balbir Singh, IBM Corp. 2006 | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of version 2.1 of the GNU Lesser General Public License | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it would be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | */ | ||
14 | |||
15 | #ifndef _LINUX_TASKSTATS_H | ||
16 | #define _LINUX_TASKSTATS_H | ||
17 | |||
18 | /* Format for per-task data returned to userland when | ||
19 | * - a task exits | ||
20 | * - listener requests stats for a task | ||
21 | * | ||
22 | * The struct is versioned. Newer versions should only add fields to | ||
23 | * the bottom of the struct to maintain backward compatibility. | ||
24 | * | ||
25 | * | ||
26 | * To add new fields | ||
27 | * a) bump up TASKSTATS_VERSION | ||
28 | * b) add comment indicating new version number at end of struct | ||
29 | * c) add new fields after version comment; maintain 64-bit alignment | ||
30 | */ | ||
31 | |||
32 | #define TASKSTATS_VERSION 1 | ||
33 | |||
34 | struct taskstats { | ||
35 | |||
36 | /* Version 1 */ | ||
37 | __u16 version; | ||
38 | __u16 padding[3]; /* Userspace should not interpret the padding | ||
39 | * field which can be replaced by useful | ||
40 | * fields if struct taskstats is extended. | ||
41 | */ | ||
42 | |||
43 | /* Delay accounting fields start | ||
44 | * | ||
45 | * All values, until comment "Delay accounting fields end" are | ||
46 | * available only if delay accounting is enabled, even though the last | ||
47 | * few fields are not delays | ||
48 | * | ||
49 | * xxx_count is the number of delay values recorded | ||
50 | * xxx_delay_total is the corresponding cumulative delay in nanoseconds | ||
51 | * | ||
52 | * xxx_delay_total wraps around to zero on overflow | ||
53 | * xxx_count incremented regardless of overflow | ||
54 | */ | ||
55 | |||
56 | /* Delay waiting for cpu, while runnable | ||
57 | * count, delay_total NOT updated atomically | ||
58 | */ | ||
59 | __u64 cpu_count; | ||
60 | __u64 cpu_delay_total; | ||
61 | |||
62 | /* Following four fields atomically updated using task->delays->lock */ | ||
63 | |||
64 | /* Delay waiting for synchronous block I/O to complete | ||
65 | * does not account for delays in I/O submission | ||
66 | */ | ||
67 | __u64 blkio_count; | ||
68 | __u64 blkio_delay_total; | ||
69 | |||
70 | /* Delay waiting for page fault I/O (swap in only) */ | ||
71 | __u64 swapin_count; | ||
72 | __u64 swapin_delay_total; | ||
73 | |||
74 | /* cpu "wall-clock" running time | ||
75 | * On some architectures, value will adjust for cpu time stolen | ||
76 | * from the kernel in involuntary waits due to virtualization. | ||
77 | * Value is cumulative, in nanoseconds, without a corresponding count | ||
78 | * and wraps around to zero silently on overflow | ||
79 | */ | ||
80 | __u64 cpu_run_real_total; | ||
81 | |||
82 | /* cpu "virtual" running time | ||
83 | * Uses time intervals seen by the kernel i.e. no adjustment | ||
84 | * for kernel's involuntary waits due to virtualization. | ||
85 | * Value is cumulative, in nanoseconds, without a corresponding count | ||
86 | * and wraps around to zero silently on overflow | ||
87 | */ | ||
88 | __u64 cpu_run_virtual_total; | ||
89 | /* Delay accounting fields end */ | ||
90 | /* version 1 ends here */ | ||
91 | }; | ||
92 | |||
93 | |||
94 | /* | ||
95 | * Commands sent from userspace | ||
96 | * Not versioned. New commands should only be inserted at the enum's end | ||
97 | * prior to __TASKSTATS_CMD_MAX | ||
98 | */ | ||
99 | |||
100 | enum { | ||
101 | TASKSTATS_CMD_UNSPEC = 0, /* Reserved */ | ||
102 | TASKSTATS_CMD_GET, /* user->kernel request/get-response */ | ||
103 | TASKSTATS_CMD_NEW, /* kernel->user event */ | ||
104 | __TASKSTATS_CMD_MAX, | ||
105 | }; | ||
106 | |||
107 | #define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1) | ||
108 | |||
109 | enum { | ||
110 | TASKSTATS_TYPE_UNSPEC = 0, /* Reserved */ | ||
111 | TASKSTATS_TYPE_PID, /* Process id */ | ||
112 | TASKSTATS_TYPE_TGID, /* Thread group id */ | ||
113 | TASKSTATS_TYPE_STATS, /* taskstats structure */ | ||
114 | TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */ | ||
115 | TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */ | ||
116 | __TASKSTATS_TYPE_MAX, | ||
117 | }; | ||
118 | |||
119 | #define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1) | ||
120 | |||
121 | enum { | ||
122 | TASKSTATS_CMD_ATTR_UNSPEC = 0, | ||
123 | TASKSTATS_CMD_ATTR_PID, | ||
124 | TASKSTATS_CMD_ATTR_TGID, | ||
125 | TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, | ||
126 | TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, | ||
127 | __TASKSTATS_CMD_ATTR_MAX, | ||
128 | }; | ||
129 | |||
130 | #define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1) | ||
131 | |||
132 | /* NETLINK_GENERIC related info */ | ||
133 | |||
134 | #define TASKSTATS_GENL_NAME "TASKSTATS" | ||
135 | #define TASKSTATS_GENL_VERSION 0x1 | ||
136 | |||
137 | #endif /* _LINUX_TASKSTATS_H */ | ||
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h new file mode 100644 index 000000000000..16894b7edcc8 --- /dev/null +++ b/include/linux/taskstats_kern.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* taskstats_kern.h - kernel header for per-task statistics interface | ||
2 | * | ||
3 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 | ||
4 | * (C) Balbir Singh, IBM Corp. 2006 | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_TASKSTATS_KERN_H | ||
8 | #define _LINUX_TASKSTATS_KERN_H | ||
9 | |||
10 | #include <linux/taskstats.h> | ||
11 | #include <linux/sched.h> | ||
12 | #include <net/genetlink.h> | ||
13 | |||
14 | #ifdef CONFIG_TASKSTATS | ||
15 | extern kmem_cache_t *taskstats_cache; | ||
16 | extern struct mutex taskstats_exit_mutex; | ||
17 | |||
18 | static inline void taskstats_exit_free(struct taskstats *tidstats) | ||
19 | { | ||
20 | if (tidstats) | ||
21 | kmem_cache_free(taskstats_cache, tidstats); | ||
22 | } | ||
23 | |||
24 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
25 | { | ||
26 | spin_lock_init(&sig->stats_lock); | ||
27 | sig->stats = NULL; | ||
28 | } | ||
29 | |||
30 | static inline void taskstats_tgid_alloc(struct signal_struct *sig) | ||
31 | { | ||
32 | struct taskstats *stats; | ||
33 | unsigned long flags; | ||
34 | |||
35 | stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); | ||
36 | if (!stats) | ||
37 | return; | ||
38 | |||
39 | spin_lock_irqsave(&sig->stats_lock, flags); | ||
40 | if (!sig->stats) { | ||
41 | sig->stats = stats; | ||
42 | stats = NULL; | ||
43 | } | ||
44 | spin_unlock_irqrestore(&sig->stats_lock, flags); | ||
45 | |||
46 | if (stats) | ||
47 | kmem_cache_free(taskstats_cache, stats); | ||
48 | } | ||
49 | |||
50 | static inline void taskstats_tgid_free(struct signal_struct *sig) | ||
51 | { | ||
52 | struct taskstats *stats = NULL; | ||
53 | unsigned long flags; | ||
54 | |||
55 | spin_lock_irqsave(&sig->stats_lock, flags); | ||
56 | if (sig->stats) { | ||
57 | stats = sig->stats; | ||
58 | sig->stats = NULL; | ||
59 | } | ||
60 | spin_unlock_irqrestore(&sig->stats_lock, flags); | ||
61 | if (stats) | ||
62 | kmem_cache_free(taskstats_cache, stats); | ||
63 | } | ||
64 | |||
65 | extern void taskstats_exit_alloc(struct taskstats **, unsigned int *); | ||
66 | extern void taskstats_exit_send(struct task_struct *, struct taskstats *, int, unsigned int); | ||
67 | extern void taskstats_init_early(void); | ||
68 | extern void taskstats_tgid_alloc(struct signal_struct *); | ||
69 | #else | ||
70 | static inline void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu) | ||
71 | {} | ||
72 | static inline void taskstats_exit_free(struct taskstats *ptidstats) | ||
73 | {} | ||
74 | static inline void taskstats_exit_send(struct task_struct *tsk, | ||
75 | struct taskstats *tidstats, | ||
76 | int group_dead, unsigned int cpu) | ||
77 | {} | ||
78 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
79 | {} | ||
80 | static inline void taskstats_tgid_alloc(struct signal_struct *sig) | ||
81 | {} | ||
82 | static inline void taskstats_tgid_free(struct signal_struct *sig) | ||
83 | {} | ||
84 | static inline void taskstats_init_early(void) | ||
85 | {} | ||
86 | #endif /* CONFIG_TASKSTATS */ | ||
87 | |||
88 | #endif | ||
89 | |||
diff --git a/include/linux/time.h b/include/linux/time.h index c05f8bb9a323..a5b739967b74 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -71,6 +71,18 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon, | |||
71 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); | 71 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * sub = lhs - rhs, in normalized form | ||
75 | */ | ||
76 | static inline struct timespec timespec_sub(struct timespec lhs, | ||
77 | struct timespec rhs) | ||
78 | { | ||
79 | struct timespec ts_delta; | ||
80 | set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, | ||
81 | lhs.tv_nsec - rhs.tv_nsec); | ||
82 | return ts_delta; | ||
83 | } | ||
84 | |||
85 | /* | ||
74 | * Returns true if the timespec is norm, false if denorm: | 86 | * Returns true if the timespec is norm, false if denorm: |
75 | */ | 87 | */ |
76 | #define timespec_valid(ts) \ | 88 | #define timespec_valid(ts) \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index b3b807e4b050..e421d5e34818 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -5,16 +5,6 @@ | |||
5 | * 'tty.h' defines some structures used by tty_io.c and some defines. | 5 | * 'tty.h' defines some structures used by tty_io.c and some defines. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /* | ||
9 | * These constants are also useful for user-level apps (e.g., VC | ||
10 | * resizing). | ||
11 | */ | ||
12 | #define MIN_NR_CONSOLES 1 /* must be at least 1 */ | ||
13 | #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ | ||
14 | #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */ | ||
15 | /* Note: the ioctl VT_GETSTATE does not work for | ||
16 | consoles 16 and higher (since it returns a short) */ | ||
17 | |||
18 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
19 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
20 | #include <linux/major.h> | 10 | #include <linux/major.h> |
@@ -22,7 +12,6 @@ | |||
22 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
23 | #include <linux/tty_driver.h> | 13 | #include <linux/tty_driver.h> |
24 | #include <linux/tty_ldisc.h> | 14 | #include <linux/tty_ldisc.h> |
25 | #include <linux/screen_info.h> | ||
26 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
27 | 16 | ||
28 | #include <asm/system.h> | 17 | #include <asm/system.h> |
@@ -270,7 +259,6 @@ struct tty_struct { | |||
270 | extern void tty_write_flush(struct tty_struct *); | 259 | extern void tty_write_flush(struct tty_struct *); |
271 | 260 | ||
272 | extern struct termios tty_std_termios; | 261 | extern struct termios tty_std_termios; |
273 | extern int fg_console, last_console, want_console; | ||
274 | 262 | ||
275 | extern int kmsg_redirect; | 263 | extern int kmsg_redirect; |
276 | 264 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8dead32e7ebf..d2bd0c8e0154 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -48,7 +48,7 @@ struct ep_device; | |||
48 | * @urb_list: urbs queued to this endpoint; maintained by usbcore | 48 | * @urb_list: urbs queued to this endpoint; maintained by usbcore |
49 | * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) | 49 | * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) |
50 | * with one or more transfer descriptors (TDs) per urb | 50 | * with one or more transfer descriptors (TDs) per urb |
51 | * @kobj: kobject for sysfs info | 51 | * @ep_dev: ep_device for sysfs info |
52 | * @extra: descriptors following this endpoint in the configuration | 52 | * @extra: descriptors following this endpoint in the configuration |
53 | * @extralen: how many bytes of "extra" are valid | 53 | * @extralen: how many bytes of "extra" are valid |
54 | * | 54 | * |
@@ -103,8 +103,7 @@ enum usb_interface_condition { | |||
103 | * @condition: binding state of the interface: not bound, binding | 103 | * @condition: binding state of the interface: not bound, binding |
104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
105 | * @dev: driver model's view of this device | 105 | * @dev: driver model's view of this device |
106 | * @usb_dev: if an interface is bound to the USB major, this will point | 106 | * @class_dev: driver model's class view of this device. |
107 | * to the sysfs representation for that device. | ||
108 | * | 107 | * |
109 | * USB device drivers attach to interfaces on a physical device. Each | 108 | * USB device drivers attach to interfaces on a physical device. Each |
110 | * interface encapsulates a single high level function, such as feeding | 109 | * interface encapsulates a single high level function, such as feeding |
@@ -144,7 +143,7 @@ struct usb_interface { | |||
144 | * bound to */ | 143 | * bound to */ |
145 | enum usb_interface_condition condition; /* state of binding */ | 144 | enum usb_interface_condition condition; /* state of binding */ |
146 | struct device dev; /* interface specific device info */ | 145 | struct device dev; /* interface specific device info */ |
147 | struct device *usb_dev; /* pointer to the usb class's device, if any */ | 146 | struct class_device *class_dev; |
148 | }; | 147 | }; |
149 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 148 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
150 | #define interface_to_usbdev(intf) \ | 149 | #define interface_to_usbdev(intf) \ |
@@ -361,7 +360,7 @@ struct usb_device { | |||
361 | char *serial; /* iSerialNumber string, if present */ | 360 | char *serial; /* iSerialNumber string, if present */ |
362 | 361 | ||
363 | struct list_head filelist; | 362 | struct list_head filelist; |
364 | struct device *usbfs_dev; | 363 | struct class_device *class_dev; |
365 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 364 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
366 | 365 | ||
367 | /* | 366 | /* |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h new file mode 100644 index 000000000000..91c983eef899 --- /dev/null +++ b/include/linux/usb/serial.h | |||
@@ -0,0 +1,300 @@ | |||
1 | /* | ||
2 | * USB Serial Converter stuff | ||
3 | * | ||
4 | * Copyright (C) 1999 - 2005 | ||
5 | * Greg Kroah-Hartman (greg@kroah.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | |||
14 | #ifndef __LINUX_USB_SERIAL_H | ||
15 | #define __LINUX_USB_SERIAL_H | ||
16 | |||
17 | #include <linux/kref.h> | ||
18 | #include <linux/mutex.h> | ||
19 | |||
20 | #define SERIAL_TTY_MAJOR 188 /* Nice legal number now */ | ||
21 | #define SERIAL_TTY_MINORS 255 /* loads of devices :) */ | ||
22 | |||
23 | #define MAX_NUM_PORTS 8 /* The maximum number of ports one device can grab at once */ | ||
24 | |||
25 | /* parity check flag */ | ||
26 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) | ||
27 | |||
28 | /** | ||
29 | * usb_serial_port: structure for the specific ports of a device. | ||
30 | * @serial: pointer back to the struct usb_serial owner of this port. | ||
31 | * @tty: pointer to the corresponding tty for this port. | ||
32 | * @lock: spinlock to grab when updating portions of this structure. | ||
33 | * @mutex: mutex used to synchronize serial_open() and serial_close() | ||
34 | * access for this port. | ||
35 | * @number: the number of the port (the minor number). | ||
36 | * @interrupt_in_buffer: pointer to the interrupt in buffer for this port. | ||
37 | * @interrupt_in_urb: pointer to the interrupt in struct urb for this port. | ||
38 | * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe | ||
39 | * for this port. | ||
40 | * @interrupt_out_buffer: pointer to the interrupt out buffer for this port. | ||
41 | * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes. | ||
42 | * @interrupt_out_urb: pointer to the interrupt out struct urb for this port. | ||
43 | * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe | ||
44 | * for this port. | ||
45 | * @bulk_in_buffer: pointer to the bulk in buffer for this port. | ||
46 | * @read_urb: pointer to the bulk in struct urb for this port. | ||
47 | * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this | ||
48 | * port. | ||
49 | * @bulk_out_buffer: pointer to the bulk out buffer for this port. | ||
50 | * @bulk_out_size: the size of the bulk_out_buffer, in bytes. | ||
51 | * @write_urb: pointer to the bulk out struct urb for this port. | ||
52 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this | ||
53 | * port. | ||
54 | * @write_wait: a wait_queue_head_t used by the port. | ||
55 | * @work: work queue entry for the line discipline waking up. | ||
56 | * @open_count: number of times this port has been opened. | ||
57 | * | ||
58 | * This structure is used by the usb-serial core and drivers for the specific | ||
59 | * ports of a device. | ||
60 | */ | ||
61 | struct usb_serial_port { | ||
62 | struct usb_serial * serial; | ||
63 | struct tty_struct * tty; | ||
64 | spinlock_t lock; | ||
65 | struct mutex mutex; | ||
66 | unsigned char number; | ||
67 | |||
68 | unsigned char * interrupt_in_buffer; | ||
69 | struct urb * interrupt_in_urb; | ||
70 | __u8 interrupt_in_endpointAddress; | ||
71 | |||
72 | unsigned char * interrupt_out_buffer; | ||
73 | int interrupt_out_size; | ||
74 | struct urb * interrupt_out_urb; | ||
75 | __u8 interrupt_out_endpointAddress; | ||
76 | |||
77 | unsigned char * bulk_in_buffer; | ||
78 | int bulk_in_size; | ||
79 | struct urb * read_urb; | ||
80 | __u8 bulk_in_endpointAddress; | ||
81 | |||
82 | unsigned char * bulk_out_buffer; | ||
83 | int bulk_out_size; | ||
84 | struct urb * write_urb; | ||
85 | int write_urb_busy; | ||
86 | __u8 bulk_out_endpointAddress; | ||
87 | |||
88 | wait_queue_head_t write_wait; | ||
89 | struct work_struct work; | ||
90 | int open_count; | ||
91 | struct device dev; | ||
92 | }; | ||
93 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) | ||
94 | |||
95 | /* get and set the port private data pointer helper functions */ | ||
96 | static inline void *usb_get_serial_port_data (struct usb_serial_port *port) | ||
97 | { | ||
98 | return dev_get_drvdata(&port->dev); | ||
99 | } | ||
100 | |||
101 | static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data) | ||
102 | { | ||
103 | dev_set_drvdata(&port->dev, data); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * usb_serial - structure used by the usb-serial core for a device | ||
108 | * @dev: pointer to the struct usb_device for this device | ||
109 | * @type: pointer to the struct usb_serial_driver for this device | ||
110 | * @interface: pointer to the struct usb_interface for this device | ||
111 | * @minor: the starting minor number for this device | ||
112 | * @num_ports: the number of ports this device has | ||
113 | * @num_interrupt_in: number of interrupt in endpoints we have | ||
114 | * @num_interrupt_out: number of interrupt out endpoints we have | ||
115 | * @num_bulk_in: number of bulk in endpoints we have | ||
116 | * @num_bulk_out: number of bulk out endpoints we have | ||
117 | * @port: array of struct usb_serial_port structures for the different ports. | ||
118 | * @private: place to put any driver specific information that is needed. The | ||
119 | * usb-serial driver is required to manage this data, the usb-serial core | ||
120 | * will not touch this. Use usb_get_serial_data() and | ||
121 | * usb_set_serial_data() to access this. | ||
122 | */ | ||
123 | struct usb_serial { | ||
124 | struct usb_device * dev; | ||
125 | struct usb_serial_driver * type; | ||
126 | struct usb_interface * interface; | ||
127 | unsigned char minor; | ||
128 | unsigned char num_ports; | ||
129 | unsigned char num_port_pointers; | ||
130 | char num_interrupt_in; | ||
131 | char num_interrupt_out; | ||
132 | char num_bulk_in; | ||
133 | char num_bulk_out; | ||
134 | struct usb_serial_port * port[MAX_NUM_PORTS]; | ||
135 | struct kref kref; | ||
136 | void * private; | ||
137 | }; | ||
138 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) | ||
139 | |||
140 | #define NUM_DONT_CARE (-1) | ||
141 | |||
142 | /* get and set the serial private data pointer helper functions */ | ||
143 | static inline void *usb_get_serial_data (struct usb_serial *serial) | ||
144 | { | ||
145 | return serial->private; | ||
146 | } | ||
147 | |||
148 | static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | ||
149 | { | ||
150 | serial->private = data; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * usb_serial_driver - describes a usb serial driver | ||
155 | * @description: pointer to a string that describes this driver. This string used | ||
156 | * in the syslog messages when a device is inserted or removed. | ||
157 | * @id_table: pointer to a list of usb_device_id structures that define all | ||
158 | * of the devices this structure can support. | ||
159 | * @num_interrupt_in: the number of interrupt in endpoints this device will | ||
160 | * have. | ||
161 | * @num_interrupt_out: the number of interrupt out endpoints this device will | ||
162 | * have. | ||
163 | * @num_bulk_in: the number of bulk in endpoints this device will have. | ||
164 | * @num_bulk_out: the number of bulk out endpoints this device will have. | ||
165 | * @num_ports: the number of different ports this device will have. | ||
166 | * @calc_num_ports: pointer to a function to determine how many ports this | ||
167 | * device has dynamically. It will be called after the probe() | ||
168 | * callback is called, but before attach() | ||
169 | * @probe: pointer to the driver's probe function. | ||
170 | * This will be called when the device is inserted into the system, | ||
171 | * but before the device has been fully initialized by the usb_serial | ||
172 | * subsystem. Use this function to download any firmware to the device, | ||
173 | * or any other early initialization that might be needed. | ||
174 | * Return 0 to continue on with the initialization sequence. Anything | ||
175 | * else will abort it. | ||
176 | * @attach: pointer to the driver's attach function. | ||
177 | * This will be called when the struct usb_serial structure is fully set | ||
178 | * set up. Do any local initialization of the device, or any private | ||
179 | * memory structure allocation at this point in time. | ||
180 | * @shutdown: pointer to the driver's shutdown function. This will be | ||
181 | * called when the device is removed from the system. | ||
182 | * | ||
183 | * This structure is defines a USB Serial driver. It provides all of | ||
184 | * the information that the USB serial core code needs. If the function | ||
185 | * pointers are defined, then the USB serial core code will call them when | ||
186 | * the corresponding tty port functions are called. If they are not | ||
187 | * called, the generic serial function will be used instead. | ||
188 | * | ||
189 | * The driver.owner field should be set to the module owner of this driver. | ||
190 | * The driver.name field should be set to the name of this driver (remember | ||
191 | * it will show up in sysfs, so it needs to be short and to the point. | ||
192 | * Useing the module name is a good idea.) | ||
193 | */ | ||
194 | struct usb_serial_driver { | ||
195 | const char *description; | ||
196 | const struct usb_device_id *id_table; | ||
197 | char num_interrupt_in; | ||
198 | char num_interrupt_out; | ||
199 | char num_bulk_in; | ||
200 | char num_bulk_out; | ||
201 | char num_ports; | ||
202 | |||
203 | struct list_head driver_list; | ||
204 | struct device_driver driver; | ||
205 | |||
206 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); | ||
207 | int (*attach) (struct usb_serial *serial); | ||
208 | int (*calc_num_ports) (struct usb_serial *serial); | ||
209 | |||
210 | void (*shutdown) (struct usb_serial *serial); | ||
211 | |||
212 | int (*port_probe) (struct usb_serial_port *port); | ||
213 | int (*port_remove) (struct usb_serial_port *port); | ||
214 | |||
215 | /* serial function calls */ | ||
216 | int (*open) (struct usb_serial_port *port, struct file * filp); | ||
217 | void (*close) (struct usb_serial_port *port, struct file * filp); | ||
218 | int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count); | ||
219 | int (*write_room) (struct usb_serial_port *port); | ||
220 | int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); | ||
221 | void (*set_termios) (struct usb_serial_port *port, struct termios * old); | ||
222 | void (*break_ctl) (struct usb_serial_port *port, int break_state); | ||
223 | int (*chars_in_buffer) (struct usb_serial_port *port); | ||
224 | void (*throttle) (struct usb_serial_port *port); | ||
225 | void (*unthrottle) (struct usb_serial_port *port); | ||
226 | int (*tiocmget) (struct usb_serial_port *port, struct file *file); | ||
227 | int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear); | ||
228 | |||
229 | void (*read_int_callback)(struct urb *urb, struct pt_regs *regs); | ||
230 | void (*write_int_callback)(struct urb *urb, struct pt_regs *regs); | ||
231 | void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); | ||
232 | void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); | ||
233 | }; | ||
234 | #define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver) | ||
235 | |||
236 | extern int usb_serial_register(struct usb_serial_driver *driver); | ||
237 | extern void usb_serial_deregister(struct usb_serial_driver *driver); | ||
238 | extern void usb_serial_port_softint(struct usb_serial_port *port); | ||
239 | |||
240 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); | ||
241 | extern void usb_serial_disconnect(struct usb_interface *iface); | ||
242 | |||
243 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); | ||
244 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); | ||
245 | |||
246 | /* USB Serial console functions */ | ||
247 | #ifdef CONFIG_USB_SERIAL_CONSOLE | ||
248 | extern void usb_serial_console_init (int debug, int minor); | ||
249 | extern void usb_serial_console_exit (void); | ||
250 | extern void usb_serial_console_disconnect(struct usb_serial *serial); | ||
251 | #else | ||
252 | static inline void usb_serial_console_init (int debug, int minor) { } | ||
253 | static inline void usb_serial_console_exit (void) { } | ||
254 | static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} | ||
255 | #endif | ||
256 | |||
257 | /* Functions needed by other parts of the usbserial core */ | ||
258 | extern struct usb_serial *usb_serial_get_by_index (unsigned int minor); | ||
259 | extern void usb_serial_put(struct usb_serial *serial); | ||
260 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); | ||
261 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); | ||
262 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); | ||
263 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); | ||
264 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); | ||
265 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs); | ||
266 | extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs); | ||
267 | extern void usb_serial_generic_shutdown (struct usb_serial *serial); | ||
268 | extern int usb_serial_generic_register (int debug); | ||
269 | extern void usb_serial_generic_deregister (void); | ||
270 | |||
271 | extern int usb_serial_bus_register (struct usb_serial_driver *device); | ||
272 | extern void usb_serial_bus_deregister (struct usb_serial_driver *device); | ||
273 | |||
274 | extern struct usb_serial_driver usb_serial_generic_device; | ||
275 | extern struct bus_type usb_serial_bus_type; | ||
276 | extern struct tty_driver *usb_serial_tty_driver; | ||
277 | |||
278 | static inline void usb_serial_debug_data(int debug, | ||
279 | struct device *dev, | ||
280 | const char *function, int size, | ||
281 | const unsigned char *data) | ||
282 | { | ||
283 | int i; | ||
284 | |||
285 | if (debug) { | ||
286 | dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", function, size); | ||
287 | for (i = 0; i < size; ++i) | ||
288 | printk ("%.2x ", data[i]); | ||
289 | printk ("\n"); | ||
290 | } | ||
291 | } | ||
292 | |||
293 | /* Use our own dbg macro */ | ||
294 | #undef dbg | ||
295 | #define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0) | ||
296 | |||
297 | |||
298 | |||
299 | #endif /* ifdef __LINUX_USB_SERIAL_H */ | ||
300 | |||
diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index a2aacfc7af2f..c720d107ff29 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h | |||
@@ -51,6 +51,9 @@ | |||
51 | #define USB_RECIP_INTERFACE 0x01 | 51 | #define USB_RECIP_INTERFACE 0x01 |
52 | #define USB_RECIP_ENDPOINT 0x02 | 52 | #define USB_RECIP_ENDPOINT 0x02 |
53 | #define USB_RECIP_OTHER 0x03 | 53 | #define USB_RECIP_OTHER 0x03 |
54 | /* From Wireless USB 1.0 */ | ||
55 | #define USB_RECIP_PORT 0x04 | ||
56 | #define USB_RECIP_RPIPE 0x05 | ||
54 | 57 | ||
55 | /* | 58 | /* |
56 | * Standard requests, for the bRequest field of a SETUP packet. | 59 | * Standard requests, for the bRequest field of a SETUP packet. |
@@ -73,7 +76,9 @@ | |||
73 | 76 | ||
74 | #define USB_REQ_SET_ENCRYPTION 0x0D /* Wireless USB */ | 77 | #define USB_REQ_SET_ENCRYPTION 0x0D /* Wireless USB */ |
75 | #define USB_REQ_GET_ENCRYPTION 0x0E | 78 | #define USB_REQ_GET_ENCRYPTION 0x0E |
79 | #define USB_REQ_RPIPE_ABORT 0x0E | ||
76 | #define USB_REQ_SET_HANDSHAKE 0x0F | 80 | #define USB_REQ_SET_HANDSHAKE 0x0F |
81 | #define USB_REQ_RPIPE_RESET 0x0F | ||
77 | #define USB_REQ_GET_HANDSHAKE 0x10 | 82 | #define USB_REQ_GET_HANDSHAKE 0x10 |
78 | #define USB_REQ_SET_CONNECTION 0x11 | 83 | #define USB_REQ_SET_CONNECTION 0x11 |
79 | #define USB_REQ_SET_SECURITY_DATA 0x12 | 84 | #define USB_REQ_SET_SECURITY_DATA 0x12 |
@@ -159,6 +164,8 @@ struct usb_ctrlrequest { | |||
159 | #define USB_DT_BOS 0x0f | 164 | #define USB_DT_BOS 0x0f |
160 | #define USB_DT_DEVICE_CAPABILITY 0x10 | 165 | #define USB_DT_DEVICE_CAPABILITY 0x10 |
161 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 | 166 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 |
167 | #define USB_DT_WIRE_ADAPTER 0x21 | ||
168 | #define USB_DT_RPIPE 0x22 | ||
162 | 169 | ||
163 | /* conventional codes for class-specific descriptors */ | 170 | /* conventional codes for class-specific descriptors */ |
164 | #define USB_DT_CS_DEVICE 0x21 | 171 | #define USB_DT_CS_DEVICE 0x21 |
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index 1d78870ed8af..e17186dbcdca 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -872,9 +872,9 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config, | |||
872 | /* utility wrapping a simple endpoint selection policy */ | 872 | /* utility wrapping a simple endpoint selection policy */ |
873 | 873 | ||
874 | extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *, | 874 | extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *, |
875 | struct usb_endpoint_descriptor *) __init; | 875 | struct usb_endpoint_descriptor *) __devinit; |
876 | 876 | ||
877 | extern void usb_ep_autoconfig_reset (struct usb_gadget *) __init; | 877 | extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit; |
878 | 878 | ||
879 | #endif /* __KERNEL__ */ | 879 | #endif /* __KERNEL__ */ |
880 | 880 | ||
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 608487a62c98..e7fc5fed5b98 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -43,6 +43,10 @@ | |||
43 | /* Need delay after Command phase */ \ | 43 | /* Need delay after Command phase */ \ |
44 | US_FLAG(NO_WP_DETECT, 0x00000200) \ | 44 | US_FLAG(NO_WP_DETECT, 0x00000200) \ |
45 | /* Don't check for write-protect */ \ | 45 | /* Don't check for write-protect */ \ |
46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ | ||
47 | /* Sets max_sectors to 64 */ \ | ||
48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | ||
49 | /* Don't claim device */ | ||
46 | 50 | ||
47 | #define US_FLAG(name, value) US_FL_##name = value , | 51 | #define US_FLAG(name, value) US_FL_##name = value , |
48 | enum { US_DO_ALL_FLAGS }; | 52 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 41bc7e9603cd..518c7a32175e 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -12,10 +12,11 @@ | |||
12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
14 | 14 | ||
15 | #define HAVE_V4L1 1 | ||
16 | |||
17 | #include <linux/videodev2.h> | 15 | #include <linux/videodev2.h> |
18 | 16 | ||
17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
18 | #define HAVE_V4L1 1 | ||
19 | |||
19 | struct video_capability | 20 | struct video_capability |
20 | { | 21 | { |
21 | char name[32]; | 22 | char name[32]; |
@@ -336,6 +337,8 @@ struct video_code | |||
336 | #define VID_HARDWARE_SN9C102 38 | 337 | #define VID_HARDWARE_SN9C102 38 |
337 | #define VID_HARDWARE_ARV 39 | 338 | #define VID_HARDWARE_ARV 39 |
338 | 339 | ||
340 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
341 | |||
339 | #endif /* __LINUX_VIDEODEV_H */ | 342 | #endif /* __LINUX_VIDEODEV_H */ |
340 | 343 | ||
341 | /* | 344 | /* |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a62673dad76e..b7146956a929 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -716,7 +716,7 @@ struct v4l2_ext_control | |||
716 | __s64 value64; | 716 | __s64 value64; |
717 | void *reserved; | 717 | void *reserved; |
718 | }; | 718 | }; |
719 | }; | 719 | } __attribute__ ((packed)); |
720 | 720 | ||
721 | struct v4l2_ext_controls | 721 | struct v4l2_ext_controls |
722 | { | 722 | { |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index f6024ab4eff0..71b6363caaaf 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -11,6 +11,7 @@ struct vm_area_struct; | |||
11 | #define VM_ALLOC 0x00000002 /* vmalloc() */ | 11 | #define VM_ALLOC 0x00000002 /* vmalloc() */ |
12 | #define VM_MAP 0x00000004 /* vmap()ed pages */ | 12 | #define VM_MAP 0x00000004 /* vmap()ed pages */ |
13 | #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ | 13 | #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ |
14 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ | ||
14 | /* bits [20..32] reserved for arch specific ioremap internals */ | 15 | /* bits [20..32] reserved for arch specific ioremap internals */ |
15 | 16 | ||
16 | /* | 17 | /* |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 3e0daf54133e..1ab806c47514 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -57,7 +57,7 @@ static inline void __count_vm_events(enum vm_event_item item, long delta) | |||
57 | 57 | ||
58 | static inline void count_vm_events(enum vm_event_item item, long delta) | 58 | static inline void count_vm_events(enum vm_event_item item, long delta) |
59 | { | 59 | { |
60 | get_cpu_var(vm_event_states.event[item])++; | 60 | get_cpu_var(vm_event_states.event[item]) += delta; |
61 | put_cpu(); | 61 | put_cpu(); |
62 | } | 62 | } |
63 | 63 | ||
@@ -186,11 +186,16 @@ static inline void __mod_zone_page_state(struct zone *zone, | |||
186 | zone_page_state_add(delta, zone, item); | 186 | zone_page_state_add(delta, zone, item); |
187 | } | 187 | } |
188 | 188 | ||
189 | static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) | ||
190 | { | ||
191 | atomic_long_inc(&zone->vm_stat[item]); | ||
192 | atomic_long_inc(&vm_stat[item]); | ||
193 | } | ||
194 | |||
189 | static inline void __inc_zone_page_state(struct page *page, | 195 | static inline void __inc_zone_page_state(struct page *page, |
190 | enum zone_stat_item item) | 196 | enum zone_stat_item item) |
191 | { | 197 | { |
192 | atomic_long_inc(&page_zone(page)->vm_stat[item]); | 198 | __inc_zone_state(page_zone(page), item); |
193 | atomic_long_inc(&vm_stat[item]); | ||
194 | } | 199 | } |
195 | 200 | ||
196 | static inline void __dec_zone_page_state(struct page *page, | 201 | static inline void __dec_zone_page_state(struct page *page, |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 9f95b0bea5b3..8ab334a48222 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -1,6 +1,16 @@ | |||
1 | #ifndef _LINUX_VT_H | 1 | #ifndef _LINUX_VT_H |
2 | #define _LINUX_VT_H | 2 | #define _LINUX_VT_H |
3 | 3 | ||
4 | /* | ||
5 | * These constants are also useful for user-level apps (e.g., VC | ||
6 | * resizing). | ||
7 | */ | ||
8 | #define MIN_NR_CONSOLES 1 /* must be at least 1 */ | ||
9 | #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ | ||
10 | #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */ | ||
11 | /* Note: the ioctl VT_GETSTATE does not work for | ||
12 | consoles 16 and higher (since it returns a short) */ | ||
13 | |||
4 | /* 0x56 is 'V', to avoid collision with termios and kd */ | 14 | /* 0x56 is 'V', to avoid collision with termios and kd */ |
5 | 15 | ||
6 | #define VT_OPENQRY 0x5600 /* find available vt */ | 16 | #define VT_OPENQRY 0x5600 /* find available vt */ |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 940d0261a545..918a29763aea 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | extern void kd_mksound(unsigned int hz, unsigned int ticks); | 27 | extern void kd_mksound(unsigned int hz, unsigned int ticks); |
28 | extern int kbd_rate(struct kbd_repeat *rep); | 28 | extern int kbd_rate(struct kbd_repeat *rep); |
29 | extern int fg_console, last_console, want_console; | ||
29 | 30 | ||
30 | /* console.c */ | 31 | /* console.c */ |
31 | 32 | ||
diff --git a/include/linux/wait.h b/include/linux/wait.h index 794be7af58ae..b3b9048421d8 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -77,17 +77,7 @@ struct task_struct; | |||
77 | #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ | 77 | #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ |
78 | { .flags = word, .bit_nr = bit, } | 78 | { .flags = word, .bit_nr = bit, } |
79 | 79 | ||
80 | /* | 80 | extern void init_waitqueue_head(wait_queue_head_t *q); |
81 | * lockdep: we want one lock-class for all waitqueue locks. | ||
82 | */ | ||
83 | extern struct lock_class_key waitqueue_lock_key; | ||
84 | |||
85 | static inline void init_waitqueue_head(wait_queue_head_t *q) | ||
86 | { | ||
87 | spin_lock_init(&q->lock); | ||
88 | lockdep_set_class(&q->lock, &waitqueue_lock_key); | ||
89 | INIT_LIST_HEAD(&q->task_list); | ||
90 | } | ||
91 | 81 | ||
92 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) | 82 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) |
93 | { | 83 | { |