diff options
Diffstat (limited to 'include/linux')
34 files changed, 301 insertions, 166 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a67b6227d272..ca9b9b9bd331 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -67,6 +67,7 @@ header-y += falloc.h | |||
67 | header-y += fd.h | 67 | header-y += fd.h |
68 | header-y += fdreg.h | 68 | header-y += fdreg.h |
69 | header-y += fib_rules.h | 69 | header-y += fib_rules.h |
70 | header-y += fiemap.h | ||
70 | header-y += firewire-cdev.h | 71 | header-y += firewire-cdev.h |
71 | header-y += firewire-constants.h | 72 | header-y += firewire-constants.h |
72 | header-y += fuse.h | 73 | header-y += fuse.h |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 77b4a9e46004..6638b8148de7 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -35,8 +35,7 @@ struct linux_binprm{ | |||
35 | #endif | 35 | #endif |
36 | struct mm_struct *mm; | 36 | struct mm_struct *mm; |
37 | unsigned long p; /* current top of mem */ | 37 | unsigned long p; /* current top of mem */ |
38 | unsigned int sh_bang:1, | 38 | unsigned int |
39 | misc_bang:1, | ||
40 | cred_prepared:1,/* true if creds already prepared (multiple | 39 | cred_prepared:1,/* true if creds already prepared (multiple |
41 | * preps happen for interpreters) */ | 40 | * preps happen for interpreters) */ |
42 | cap_effective:1;/* true if has elevated effective capabilities, | 41 | cap_effective:1;/* true if has elevated effective capabilities, |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 3d7bcde2e332..7b73bb8f1970 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -332,22 +332,10 @@ extern int __set_page_dirty_buffers(struct page *page); | |||
332 | 332 | ||
333 | static inline void buffer_init(void) {} | 333 | static inline void buffer_init(void) {} |
334 | static inline int try_to_free_buffers(struct page *page) { return 1; } | 334 | static inline int try_to_free_buffers(struct page *page) { return 1; } |
335 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } | ||
336 | static inline int inode_has_buffers(struct inode *inode) { return 0; } | 335 | static inline int inode_has_buffers(struct inode *inode) { return 0; } |
337 | static inline void invalidate_inode_buffers(struct inode *inode) {} | 336 | static inline void invalidate_inode_buffers(struct inode *inode) {} |
338 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } | 337 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } |
339 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } | 338 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } |
340 | static inline void invalidate_bdev(struct block_device *bdev) {} | ||
341 | |||
342 | static inline struct super_block *freeze_bdev(struct block_device *sb) | ||
343 | { | ||
344 | return NULL; | ||
345 | } | ||
346 | |||
347 | static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb) | ||
348 | { | ||
349 | return 0; | ||
350 | } | ||
351 | 339 | ||
352 | #endif /* CONFIG_BLOCK */ | 340 | #endif /* CONFIG_BLOCK */ |
353 | #endif /* _LINUX_BUFFER_HEAD_H */ | 341 | #endif /* _LINUX_BUFFER_HEAD_H */ |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 499900d0cee7..4316a546beb5 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/cgroupstats.h> | 15 | #include <linux/cgroupstats.h> |
16 | #include <linux/prio_heap.h> | 16 | #include <linux/prio_heap.h> |
17 | #include <linux/rwsem.h> | 17 | #include <linux/rwsem.h> |
18 | #include <linux/idr.h> | ||
18 | 19 | ||
19 | #ifdef CONFIG_CGROUPS | 20 | #ifdef CONFIG_CGROUPS |
20 | 21 | ||
@@ -22,6 +23,7 @@ struct cgroupfs_root; | |||
22 | struct cgroup_subsys; | 23 | struct cgroup_subsys; |
23 | struct inode; | 24 | struct inode; |
24 | struct cgroup; | 25 | struct cgroup; |
26 | struct css_id; | ||
25 | 27 | ||
26 | extern int cgroup_init_early(void); | 28 | extern int cgroup_init_early(void); |
27 | extern int cgroup_init(void); | 29 | extern int cgroup_init(void); |
@@ -47,18 +49,24 @@ enum cgroup_subsys_id { | |||
47 | 49 | ||
48 | /* Per-subsystem/per-cgroup state maintained by the system. */ | 50 | /* Per-subsystem/per-cgroup state maintained by the system. */ |
49 | struct cgroup_subsys_state { | 51 | struct cgroup_subsys_state { |
50 | /* The cgroup that this subsystem is attached to. Useful | 52 | /* |
53 | * The cgroup that this subsystem is attached to. Useful | ||
51 | * for subsystems that want to know about the cgroup | 54 | * for subsystems that want to know about the cgroup |
52 | * hierarchy structure */ | 55 | * hierarchy structure |
56 | */ | ||
53 | struct cgroup *cgroup; | 57 | struct cgroup *cgroup; |
54 | 58 | ||
55 | /* State maintained by the cgroup system to allow subsystems | 59 | /* |
60 | * State maintained by the cgroup system to allow subsystems | ||
56 | * to be "busy". Should be accessed via css_get(), | 61 | * to be "busy". Should be accessed via css_get(), |
57 | * css_tryget() and and css_put(). */ | 62 | * css_tryget() and and css_put(). |
63 | */ | ||
58 | 64 | ||
59 | atomic_t refcnt; | 65 | atomic_t refcnt; |
60 | 66 | ||
61 | unsigned long flags; | 67 | unsigned long flags; |
68 | /* ID for this css, if possible */ | ||
69 | struct css_id *id; | ||
62 | }; | 70 | }; |
63 | 71 | ||
64 | /* bits in struct cgroup_subsys_state flags field */ | 72 | /* bits in struct cgroup_subsys_state flags field */ |
@@ -120,19 +128,26 @@ static inline void css_put(struct cgroup_subsys_state *css) | |||
120 | enum { | 128 | enum { |
121 | /* Control Group is dead */ | 129 | /* Control Group is dead */ |
122 | CGRP_REMOVED, | 130 | CGRP_REMOVED, |
123 | /* Control Group has previously had a child cgroup or a task, | 131 | /* |
124 | * but no longer (only if CGRP_NOTIFY_ON_RELEASE is set) */ | 132 | * Control Group has previously had a child cgroup or a task, |
133 | * but no longer (only if CGRP_NOTIFY_ON_RELEASE is set) | ||
134 | */ | ||
125 | CGRP_RELEASABLE, | 135 | CGRP_RELEASABLE, |
126 | /* Control Group requires release notifications to userspace */ | 136 | /* Control Group requires release notifications to userspace */ |
127 | CGRP_NOTIFY_ON_RELEASE, | 137 | CGRP_NOTIFY_ON_RELEASE, |
138 | /* | ||
139 | * A thread in rmdir() is wating for this cgroup. | ||
140 | */ | ||
141 | CGRP_WAIT_ON_RMDIR, | ||
128 | }; | 142 | }; |
129 | 143 | ||
130 | struct cgroup { | 144 | struct cgroup { |
131 | unsigned long flags; /* "unsigned long" so bitops work */ | 145 | unsigned long flags; /* "unsigned long" so bitops work */ |
132 | 146 | ||
133 | /* count users of this cgroup. >0 means busy, but doesn't | 147 | /* |
134 | * necessarily indicate the number of tasks in the | 148 | * count users of this cgroup. >0 means busy, but doesn't |
135 | * cgroup */ | 149 | * necessarily indicate the number of tasks in the cgroup |
150 | */ | ||
136 | atomic_t count; | 151 | atomic_t count; |
137 | 152 | ||
138 | /* | 153 | /* |
@@ -142,7 +157,7 @@ struct cgroup { | |||
142 | struct list_head sibling; /* my parent's children */ | 157 | struct list_head sibling; /* my parent's children */ |
143 | struct list_head children; /* my children */ | 158 | struct list_head children; /* my children */ |
144 | 159 | ||
145 | struct cgroup *parent; /* my parent */ | 160 | struct cgroup *parent; /* my parent */ |
146 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ | 161 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ |
147 | 162 | ||
148 | /* Private pointers for each registered subsystem */ | 163 | /* Private pointers for each registered subsystem */ |
@@ -177,11 +192,12 @@ struct cgroup { | |||
177 | struct rcu_head rcu_head; | 192 | struct rcu_head rcu_head; |
178 | }; | 193 | }; |
179 | 194 | ||
180 | /* A css_set is a structure holding pointers to a set of | 195 | /* |
196 | * A css_set is a structure holding pointers to a set of | ||
181 | * cgroup_subsys_state objects. This saves space in the task struct | 197 | * cgroup_subsys_state objects. This saves space in the task struct |
182 | * object and speeds up fork()/exit(), since a single inc/dec and a | 198 | * object and speeds up fork()/exit(), since a single inc/dec and a |
183 | * list_add()/del() can bump the reference count on the entire | 199 | * list_add()/del() can bump the reference count on the entire cgroup |
184 | * cgroup set for a task. | 200 | * set for a task. |
185 | */ | 201 | */ |
186 | 202 | ||
187 | struct css_set { | 203 | struct css_set { |
@@ -226,13 +242,8 @@ struct cgroup_map_cb { | |||
226 | void *state; | 242 | void *state; |
227 | }; | 243 | }; |
228 | 244 | ||
229 | /* struct cftype: | 245 | /* |
230 | * | 246 | * struct cftype: handler definitions for cgroup control files |
231 | * The files in the cgroup filesystem mostly have a very simple read/write | ||
232 | * handling, some common function will take care of it. Nevertheless some cases | ||
233 | * (read tasks) are special and therefore I define this structure for every | ||
234 | * kind of file. | ||
235 | * | ||
236 | * | 247 | * |
237 | * When reading/writing to a file: | 248 | * When reading/writing to a file: |
238 | * - the cgroup to use is file->f_dentry->d_parent->d_fsdata | 249 | * - the cgroup to use is file->f_dentry->d_parent->d_fsdata |
@@ -241,10 +252,17 @@ struct cgroup_map_cb { | |||
241 | 252 | ||
242 | #define MAX_CFTYPE_NAME 64 | 253 | #define MAX_CFTYPE_NAME 64 |
243 | struct cftype { | 254 | struct cftype { |
244 | /* By convention, the name should begin with the name of the | 255 | /* |
245 | * subsystem, followed by a period */ | 256 | * By convention, the name should begin with the name of the |
257 | * subsystem, followed by a period | ||
258 | */ | ||
246 | char name[MAX_CFTYPE_NAME]; | 259 | char name[MAX_CFTYPE_NAME]; |
247 | int private; | 260 | int private; |
261 | /* | ||
262 | * If not 0, file mode is set to this value, otherwise it will | ||
263 | * be figured out automatically | ||
264 | */ | ||
265 | mode_t mode; | ||
248 | 266 | ||
249 | /* | 267 | /* |
250 | * If non-zero, defines the maximum length of string that can | 268 | * If non-zero, defines the maximum length of string that can |
@@ -319,15 +337,20 @@ struct cgroup_scanner { | |||
319 | void (*process_task)(struct task_struct *p, | 337 | void (*process_task)(struct task_struct *p, |
320 | struct cgroup_scanner *scan); | 338 | struct cgroup_scanner *scan); |
321 | struct ptr_heap *heap; | 339 | struct ptr_heap *heap; |
340 | void *data; | ||
322 | }; | 341 | }; |
323 | 342 | ||
324 | /* Add a new file to the given cgroup directory. Should only be | 343 | /* |
325 | * called by subsystems from within a populate() method */ | 344 | * Add a new file to the given cgroup directory. Should only be |
345 | * called by subsystems from within a populate() method | ||
346 | */ | ||
326 | int cgroup_add_file(struct cgroup *cgrp, struct cgroup_subsys *subsys, | 347 | int cgroup_add_file(struct cgroup *cgrp, struct cgroup_subsys *subsys, |
327 | const struct cftype *cft); | 348 | const struct cftype *cft); |
328 | 349 | ||
329 | /* Add a set of new files to the given cgroup directory. Should | 350 | /* |
330 | * only be called by subsystems from within a populate() method */ | 351 | * Add a set of new files to the given cgroup directory. Should |
352 | * only be called by subsystems from within a populate() method | ||
353 | */ | ||
331 | int cgroup_add_files(struct cgroup *cgrp, | 354 | int cgroup_add_files(struct cgroup *cgrp, |
332 | struct cgroup_subsys *subsys, | 355 | struct cgroup_subsys *subsys, |
333 | const struct cftype cft[], | 356 | const struct cftype cft[], |
@@ -339,15 +362,15 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); | |||
339 | 362 | ||
340 | int cgroup_task_count(const struct cgroup *cgrp); | 363 | int cgroup_task_count(const struct cgroup *cgrp); |
341 | 364 | ||
342 | /* Return true if the cgroup is a descendant of the current cgroup */ | 365 | /* Return true if cgrp is a descendant of the task's cgroup */ |
343 | int cgroup_is_descendant(const struct cgroup *cgrp); | 366 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); |
344 | 367 | ||
345 | /* Control Group subsystem type. See Documentation/cgroups.txt for details */ | 368 | /* Control Group subsystem type. See Documentation/cgroups.txt for details */ |
346 | 369 | ||
347 | struct cgroup_subsys { | 370 | struct cgroup_subsys { |
348 | struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss, | 371 | struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss, |
349 | struct cgroup *cgrp); | 372 | struct cgroup *cgrp); |
350 | void (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 373 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
351 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 374 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
352 | int (*can_attach)(struct cgroup_subsys *ss, | 375 | int (*can_attach)(struct cgroup_subsys *ss, |
353 | struct cgroup *cgrp, struct task_struct *tsk); | 376 | struct cgroup *cgrp, struct task_struct *tsk); |
@@ -364,6 +387,11 @@ struct cgroup_subsys { | |||
364 | int active; | 387 | int active; |
365 | int disabled; | 388 | int disabled; |
366 | int early_init; | 389 | int early_init; |
390 | /* | ||
391 | * True if this subsys uses ID. ID is not available before cgroup_init() | ||
392 | * (not available in early_init time.) | ||
393 | */ | ||
394 | bool use_id; | ||
367 | #define MAX_CGROUP_TYPE_NAMELEN 32 | 395 | #define MAX_CGROUP_TYPE_NAMELEN 32 |
368 | const char *name; | 396 | const char *name; |
369 | 397 | ||
@@ -386,6 +414,9 @@ struct cgroup_subsys { | |||
386 | */ | 414 | */ |
387 | struct cgroupfs_root *root; | 415 | struct cgroupfs_root *root; |
388 | struct list_head sibling; | 416 | struct list_head sibling; |
417 | /* used when use_id == true */ | ||
418 | struct idr idr; | ||
419 | spinlock_t id_lock; | ||
389 | }; | 420 | }; |
390 | 421 | ||
391 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; | 422 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; |
@@ -419,7 +450,8 @@ struct cgroup_iter { | |||
419 | struct list_head *task; | 450 | struct list_head *task; |
420 | }; | 451 | }; |
421 | 452 | ||
422 | /* To iterate across the tasks in a cgroup: | 453 | /* |
454 | * To iterate across the tasks in a cgroup: | ||
423 | * | 455 | * |
424 | * 1) call cgroup_iter_start to intialize an iterator | 456 | * 1) call cgroup_iter_start to intialize an iterator |
425 | * | 457 | * |
@@ -428,9 +460,10 @@ struct cgroup_iter { | |||
428 | * | 460 | * |
429 | * 3) call cgroup_iter_end() to destroy the iterator. | 461 | * 3) call cgroup_iter_end() to destroy the iterator. |
430 | * | 462 | * |
431 | * Or, call cgroup_scan_tasks() to iterate through every task in a cpuset. | 463 | * Or, call cgroup_scan_tasks() to iterate through every task in a |
432 | * - cgroup_scan_tasks() holds the css_set_lock when calling the test_task() | 464 | * cgroup - cgroup_scan_tasks() holds the css_set_lock when calling |
433 | * callback, but not while calling the process_task() callback. | 465 | * the test_task() callback, but not while calling the process_task() |
466 | * callback. | ||
434 | */ | 467 | */ |
435 | void cgroup_iter_start(struct cgroup *cgrp, struct cgroup_iter *it); | 468 | void cgroup_iter_start(struct cgroup *cgrp, struct cgroup_iter *it); |
436 | struct task_struct *cgroup_iter_next(struct cgroup *cgrp, | 469 | struct task_struct *cgroup_iter_next(struct cgroup *cgrp, |
@@ -439,6 +472,44 @@ void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); | |||
439 | int cgroup_scan_tasks(struct cgroup_scanner *scan); | 472 | int cgroup_scan_tasks(struct cgroup_scanner *scan); |
440 | int cgroup_attach_task(struct cgroup *, struct task_struct *); | 473 | int cgroup_attach_task(struct cgroup *, struct task_struct *); |
441 | 474 | ||
475 | /* | ||
476 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works | ||
477 | * if cgroup_subsys.use_id == true. It can be used for looking up and scanning. | ||
478 | * CSS ID is assigned at cgroup allocation (create) automatically | ||
479 | * and removed when subsys calls free_css_id() function. This is because | ||
480 | * the lifetime of cgroup_subsys_state is subsys's matter. | ||
481 | * | ||
482 | * Looking up and scanning function should be called under rcu_read_lock(). | ||
483 | * Taking cgroup_mutex()/hierarchy_mutex() is not necessary for following calls. | ||
484 | * But the css returned by this routine can be "not populated yet" or "being | ||
485 | * destroyed". The caller should check css and cgroup's status. | ||
486 | */ | ||
487 | |||
488 | /* | ||
489 | * Typically Called at ->destroy(), or somewhere the subsys frees | ||
490 | * cgroup_subsys_state. | ||
491 | */ | ||
492 | void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css); | ||
493 | |||
494 | /* Find a cgroup_subsys_state which has given ID */ | ||
495 | |||
496 | struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id); | ||
497 | |||
498 | /* | ||
499 | * Get a cgroup whose id is greater than or equal to id under tree of root. | ||
500 | * Returning a cgroup_subsys_state or NULL. | ||
501 | */ | ||
502 | struct cgroup_subsys_state *css_get_next(struct cgroup_subsys *ss, int id, | ||
503 | struct cgroup_subsys_state *root, int *foundid); | ||
504 | |||
505 | /* Returns true if root is ancestor of cg */ | ||
506 | bool css_is_ancestor(struct cgroup_subsys_state *cg, | ||
507 | const struct cgroup_subsys_state *root); | ||
508 | |||
509 | /* Get id and depth of css */ | ||
510 | unsigned short css_id(struct cgroup_subsys_state *css); | ||
511 | unsigned short css_depth(struct cgroup_subsys_state *css); | ||
512 | |||
442 | #else /* !CONFIG_CGROUPS */ | 513 | #else /* !CONFIG_CGROUPS */ |
443 | 514 | ||
444 | static inline int cgroup_init_early(void) { return 0; } | 515 | static inline int cgroup_init_early(void) { return 0; } |
diff --git a/include/linux/compat.h b/include/linux/compat.h index b880864672de..9723edd6455c 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -191,6 +191,12 @@ asmlinkage ssize_t compat_sys_readv(unsigned long fd, | |||
191 | const struct compat_iovec __user *vec, unsigned long vlen); | 191 | const struct compat_iovec __user *vec, unsigned long vlen); |
192 | asmlinkage ssize_t compat_sys_writev(unsigned long fd, | 192 | asmlinkage ssize_t compat_sys_writev(unsigned long fd, |
193 | const struct compat_iovec __user *vec, unsigned long vlen); | 193 | const struct compat_iovec __user *vec, unsigned long vlen); |
194 | asmlinkage ssize_t compat_sys_preadv(unsigned long fd, | ||
195 | const struct compat_iovec __user *vec, | ||
196 | unsigned long vlen, u32 pos_high, u32 pos_low); | ||
197 | asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, | ||
198 | const struct compat_iovec __user *vec, | ||
199 | unsigned long vlen, u32 pos_high, u32 pos_low); | ||
194 | 200 | ||
195 | int compat_do_execve(char * filename, compat_uptr_t __user *argv, | 201 | int compat_do_execve(char * filename, compat_uptr_t __user *argv, |
196 | compat_uptr_t __user *envp, struct pt_regs * regs); | 202 | compat_uptr_t __user *envp, struct pt_regs * regs); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index c2747ac2ae43..2643d848df90 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/node.h> | 23 | #include <linux/node.h> |
24 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
25 | #include <linux/cpumask.h> | 25 | #include <linux/cpumask.h> |
26 | #include <linux/mutex.h> | ||
27 | 26 | ||
28 | struct cpu { | 27 | struct cpu { |
29 | int node_id; /* The node which contains the CPU */ | 28 | int node_id; /* The node which contains the CPU */ |
@@ -103,16 +102,6 @@ extern struct sysdev_class cpu_sysdev_class; | |||
103 | #ifdef CONFIG_HOTPLUG_CPU | 102 | #ifdef CONFIG_HOTPLUG_CPU |
104 | /* Stop CPUs going up and down. */ | 103 | /* Stop CPUs going up and down. */ |
105 | 104 | ||
106 | static inline void cpuhotplug_mutex_lock(struct mutex *cpu_hp_mutex) | ||
107 | { | ||
108 | mutex_lock(cpu_hp_mutex); | ||
109 | } | ||
110 | |||
111 | static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | ||
112 | { | ||
113 | mutex_unlock(cpu_hp_mutex); | ||
114 | } | ||
115 | |||
116 | extern void get_online_cpus(void); | 105 | extern void get_online_cpus(void); |
117 | extern void put_online_cpus(void); | 106 | extern void put_online_cpus(void); |
118 | #define hotcpu_notifier(fn, pri) { \ | 107 | #define hotcpu_notifier(fn, pri) { \ |
@@ -126,11 +115,6 @@ int cpu_down(unsigned int cpu); | |||
126 | 115 | ||
127 | #else /* CONFIG_HOTPLUG_CPU */ | 116 | #else /* CONFIG_HOTPLUG_CPU */ |
128 | 117 | ||
129 | static inline void cpuhotplug_mutex_lock(struct mutex *cpu_hp_mutex) | ||
130 | { } | ||
131 | static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | ||
132 | { } | ||
133 | |||
134 | #define get_online_cpus() do { } while (0) | 118 | #define get_online_cpus() do { } while (0) |
135 | #define put_online_cpus() do { } while (0) | 119 | #define put_online_cpus() do { } while (0) |
136 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) | 120 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 2e0d79678deb..05ea1dd7d681 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <linux/cgroup.h> | 14 | #include <linux/cgroup.h> |
15 | #include <linux/mm.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_CPUSETS | 17 | #ifdef CONFIG_CPUSETS |
17 | 18 | ||
@@ -29,19 +30,29 @@ void cpuset_init_current_mems_allowed(void); | |||
29 | void cpuset_update_task_memory_state(void); | 30 | void cpuset_update_task_memory_state(void); |
30 | int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask); | 31 | int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask); |
31 | 32 | ||
32 | extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask); | 33 | extern int __cpuset_node_allowed_softwall(int node, gfp_t gfp_mask); |
33 | extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask); | 34 | extern int __cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask); |
34 | 35 | ||
35 | static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | 36 | static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask) |
36 | { | 37 | { |
37 | return number_of_cpusets <= 1 || | 38 | return number_of_cpusets <= 1 || |
38 | __cpuset_zone_allowed_softwall(z, gfp_mask); | 39 | __cpuset_node_allowed_softwall(node, gfp_mask); |
39 | } | 40 | } |
40 | 41 | ||
41 | static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | 42 | static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask) |
42 | { | 43 | { |
43 | return number_of_cpusets <= 1 || | 44 | return number_of_cpusets <= 1 || |
44 | __cpuset_zone_allowed_hardwall(z, gfp_mask); | 45 | __cpuset_node_allowed_hardwall(node, gfp_mask); |
46 | } | ||
47 | |||
48 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | ||
49 | { | ||
50 | return cpuset_node_allowed_softwall(zone_to_nid(z), gfp_mask); | ||
51 | } | ||
52 | |||
53 | static inline int cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | ||
54 | { | ||
55 | return cpuset_node_allowed_hardwall(zone_to_nid(z), gfp_mask); | ||
45 | } | 56 | } |
46 | 57 | ||
47 | extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, | 58 | extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, |
@@ -112,6 +123,16 @@ static inline int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask) | |||
112 | return 1; | 123 | return 1; |
113 | } | 124 | } |
114 | 125 | ||
126 | static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask) | ||
127 | { | ||
128 | return 1; | ||
129 | } | ||
130 | |||
131 | static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask) | ||
132 | { | ||
133 | return 1; | ||
134 | } | ||
135 | |||
115 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | 136 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) |
116 | { | 137 | { |
117 | return 1; | 138 | return 1; |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index dd495b8c3091..e263acaa405b 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -893,9 +893,8 @@ extern int ext3_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | |||
893 | u64 start, u64 len); | 893 | u64 start, u64 len); |
894 | 894 | ||
895 | /* ioctl.c */ | 895 | /* ioctl.c */ |
896 | extern int ext3_ioctl (struct inode *, struct file *, unsigned int, | 896 | extern long ext3_ioctl(struct file *, unsigned int, unsigned long); |
897 | unsigned long); | 897 | extern long ext3_compat_ioctl(struct file *, unsigned int, unsigned long); |
898 | extern long ext3_compat_ioctl (struct file *, unsigned int, unsigned long); | ||
899 | 898 | ||
900 | /* namei.c */ | 899 | /* namei.c */ |
901 | extern int ext3_orphan_add(handle_t *, struct inode *); | 900 | extern int ext3_orphan_add(handle_t *, struct inode *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 61211ad823fe..a09e17c8f5fd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1741,6 +1741,8 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
1741 | 1741 | ||
1742 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1742 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
1743 | 1743 | ||
1744 | extern int current_umask(void); | ||
1745 | |||
1744 | /* /sys/fs */ | 1746 | /* /sys/fs */ |
1745 | extern struct kobject *fs_kobj; | 1747 | extern struct kobject *fs_kobj; |
1746 | 1748 | ||
@@ -1885,6 +1887,18 @@ extern int fsync_super(struct super_block *); | |||
1885 | extern int fsync_no_super(struct block_device *); | 1887 | extern int fsync_no_super(struct block_device *); |
1886 | #else | 1888 | #else |
1887 | static inline void bd_forget(struct inode *inode) {} | 1889 | static inline void bd_forget(struct inode *inode) {} |
1890 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } | ||
1891 | static inline void invalidate_bdev(struct block_device *bdev) {} | ||
1892 | |||
1893 | static inline struct super_block *freeze_bdev(struct block_device *sb) | ||
1894 | { | ||
1895 | return NULL; | ||
1896 | } | ||
1897 | |||
1898 | static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb) | ||
1899 | { | ||
1900 | return 0; | ||
1901 | } | ||
1888 | #endif | 1902 | #endif |
1889 | extern const struct file_operations def_blk_fops; | 1903 | extern const struct file_operations def_blk_fops; |
1890 | extern const struct file_operations def_chr_fops; | 1904 | extern const struct file_operations def_chr_fops; |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 18b467dbe278..78a05bfcd8eb 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -4,12 +4,10 @@ | |||
4 | #include <linux/path.h> | 4 | #include <linux/path.h> |
5 | 5 | ||
6 | struct fs_struct { | 6 | struct fs_struct { |
7 | atomic_t count; /* This usage count is used by check_unsafe_exec() for | 7 | int users; |
8 | * security checking purposes - therefore it may not be | ||
9 | * incremented, except by clone(CLONE_FS). | ||
10 | */ | ||
11 | rwlock_t lock; | 8 | rwlock_t lock; |
12 | int umask; | 9 | int umask; |
10 | int in_exec; | ||
13 | struct path root, pwd; | 11 | struct path root, pwd; |
14 | }; | 12 | }; |
15 | 13 | ||
@@ -19,6 +17,8 @@ extern void exit_fs(struct task_struct *); | |||
19 | extern void set_fs_root(struct fs_struct *, struct path *); | 17 | extern void set_fs_root(struct fs_struct *, struct path *); |
20 | extern void set_fs_pwd(struct fs_struct *, struct path *); | 18 | extern void set_fs_pwd(struct fs_struct *, struct path *); |
21 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); | 19 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
22 | extern void put_fs_struct(struct fs_struct *); | 20 | extern void free_fs_struct(struct fs_struct *); |
21 | extern void daemonize_fs_struct(void); | ||
22 | extern int unshare_fs_struct(void); | ||
23 | 23 | ||
24 | #endif /* _LINUX_FS_STRUCT_H */ | 24 | #endif /* _LINUX_FS_STRUCT_H */ |
diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h index f6edd522a929..8ace93024d60 100644 --- a/include/linux/i2c/at24.h +++ b/include/linux/i2c/at24.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_AT24_H | 2 | #define _LINUX_AT24_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/memory.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * As seen through Linux I2C, differences between the most common types of I2C | 8 | * As seen through Linux I2C, differences between the most common types of I2C |
@@ -23,6 +24,9 @@ struct at24_platform_data { | |||
23 | #define AT24_FLAG_READONLY 0x40 /* sysfs-entry will be read-only */ | 24 | #define AT24_FLAG_READONLY 0x40 /* sysfs-entry will be read-only */ |
24 | #define AT24_FLAG_IRUGO 0x20 /* sysfs-entry will be world-readable */ | 25 | #define AT24_FLAG_IRUGO 0x20 /* sysfs-entry will be world-readable */ |
25 | #define AT24_FLAG_TAKE8ADDR 0x10 /* take always 8 addresses (24c00) */ | 26 | #define AT24_FLAG_TAKE8ADDR 0x10 /* take always 8 addresses (24c00) */ |
27 | |||
28 | void (*setup)(struct memory_accessor *, void *context); | ||
29 | void *context; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | #endif /* _LINUX_AT24_H */ | 32 | #endif /* _LINUX_AT24_H */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index dd846df8cd32..e968db71e33a 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -106,6 +106,7 @@ int idr_get_new(struct idr *idp, void *ptr, int *id); | |||
106 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 106 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
107 | int idr_for_each(struct idr *idp, | 107 | int idr_for_each(struct idr *idp, |
108 | int (*fn)(int id, void *p, void *data), void *data); | 108 | int (*fn)(int id, void *p, void *data), void *data); |
109 | void *idr_get_next(struct idr *idp, int *nextid); | ||
109 | void *idr_replace(struct idr *idp, void *ptr, int id); | 110 | void *idr_replace(struct idr *idp, void *ptr, int id); |
110 | void idr_remove(struct idr *idp, int id); | 111 | void idr_remove(struct idr *idp, int id); |
111 | void idr_remove_all(struct idr *idp); | 112 | void idr_remove_all(struct idr *idp); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e720b0da7751..556d781e69fe 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -242,6 +242,7 @@ extern struct ratelimit_state printk_ratelimit_state; | |||
242 | extern int printk_ratelimit(void); | 242 | extern int printk_ratelimit(void); |
243 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 243 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
244 | unsigned int interval_msec); | 244 | unsigned int interval_msec); |
245 | void log_buf_kexec_setup(void); | ||
245 | #else | 246 | #else |
246 | static inline int vprintk(const char *s, va_list args) | 247 | static inline int vprintk(const char *s, va_list args) |
247 | __attribute__ ((format (printf, 1, 0))); | 248 | __attribute__ ((format (printf, 1, 0))); |
@@ -253,6 +254,9 @@ static inline int printk_ratelimit(void) { return 0; } | |||
253 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | 254 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ |
254 | unsigned int interval_msec) \ | 255 | unsigned int interval_msec) \ |
255 | { return false; } | 256 | { return false; } |
257 | static inline void log_buf_kexec_setup(void) | ||
258 | { | ||
259 | } | ||
256 | #endif | 260 | #endif |
257 | 261 | ||
258 | extern int printk_needs_cpu(int cpu); | 262 | extern int printk_needs_cpu(int cpu); |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 5a58ea3e91e9..da5a5a1f4cd2 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -364,6 +364,23 @@ do { \ | |||
364 | 364 | ||
365 | #endif /* CONFIG_LOCK_STAT */ | 365 | #endif /* CONFIG_LOCK_STAT */ |
366 | 366 | ||
367 | #ifdef CONFIG_LOCKDEP | ||
368 | |||
369 | /* | ||
370 | * On lockdep we dont want the hand-coded irq-enable of | ||
371 | * _raw_*_lock_flags() code, because lockdep assumes | ||
372 | * that interrupts are not re-enabled during lock-acquire: | ||
373 | */ | ||
374 | #define LOCK_CONTENDED_FLAGS(_lock, try, lock, lockfl, flags) \ | ||
375 | LOCK_CONTENDED((_lock), (try), (lock)) | ||
376 | |||
377 | #else /* CONFIG_LOCKDEP */ | ||
378 | |||
379 | #define LOCK_CONTENDED_FLAGS(_lock, try, lock, lockfl, flags) \ | ||
380 | lockfl((_lock), (flags)) | ||
381 | |||
382 | #endif /* CONFIG_LOCKDEP */ | ||
383 | |||
367 | #ifdef CONFIG_GENERIC_HARDIRQS | 384 | #ifdef CONFIG_GENERIC_HARDIRQS |
368 | extern void early_init_irq_lock_class(void); | 385 | extern void early_init_irq_lock_class(void); |
369 | #else | 386 | #else |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 326f45c86530..18146c980b68 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -88,9 +88,6 @@ extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
88 | /* | 88 | /* |
89 | * For memory reclaim. | 89 | * For memory reclaim. |
90 | */ | 90 | */ |
91 | extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem); | ||
92 | extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem); | ||
93 | |||
94 | extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem); | 91 | extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem); |
95 | extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, | 92 | extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, |
96 | int priority); | 93 | int priority); |
@@ -104,6 +101,8 @@ struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, | |||
104 | struct zone *zone); | 101 | struct zone *zone); |
105 | struct zone_reclaim_stat* | 102 | struct zone_reclaim_stat* |
106 | mem_cgroup_get_reclaim_stat_from_page(struct page *page); | 103 | mem_cgroup_get_reclaim_stat_from_page(struct page *page); |
104 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | ||
105 | struct task_struct *p); | ||
107 | 106 | ||
108 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 107 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
109 | extern int do_swap_account; | 108 | extern int do_swap_account; |
@@ -209,16 +208,6 @@ static inline void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
209 | { | 208 | { |
210 | } | 209 | } |
211 | 210 | ||
212 | static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) | ||
213 | { | ||
214 | return 0; | ||
215 | } | ||
216 | |||
217 | static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem) | ||
218 | { | ||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem) | 211 | static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem) |
223 | { | 212 | { |
224 | return 0; | 213 | return 0; |
@@ -270,6 +259,11 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page) | |||
270 | return NULL; | 259 | return NULL; |
271 | } | 260 | } |
272 | 261 | ||
262 | static inline void | ||
263 | mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | ||
264 | { | ||
265 | } | ||
266 | |||
273 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 267 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
274 | 268 | ||
275 | #endif /* _LINUX_MEMCONTROL_H */ | 269 | #endif /* _LINUX_MEMCONTROL_H */ |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 3fdc10806d31..42767d1a62e7 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -99,4 +99,15 @@ enum mem_add_context { BOOT, HOTPLUG }; | |||
99 | #define hotplug_memory_notifier(fn, pri) do { } while (0) | 99 | #define hotplug_memory_notifier(fn, pri) do { } while (0) |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | /* | ||
103 | * 'struct memory_accessor' is a generic interface to provide | ||
104 | * in-kernel access to persistent memory such as i2c or SPI EEPROMs | ||
105 | */ | ||
106 | struct memory_accessor { | ||
107 | ssize_t (*read)(struct memory_accessor *, char *buf, off_t offset, | ||
108 | size_t count); | ||
109 | ssize_t (*write)(struct memory_accessor *, const char *buf, | ||
110 | off_t offset, size_t count); | ||
111 | }; | ||
112 | |||
102 | #endif /* _LINUX_MEMORY_H_ */ | 113 | #endif /* _LINUX_MEMORY_H_ */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index aeabe953ba4f..bff1f0d475c7 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1079,7 +1079,7 @@ static inline void setup_per_cpu_pageset(void) {} | |||
1079 | #endif | 1079 | #endif |
1080 | 1080 | ||
1081 | /* nommu.c */ | 1081 | /* nommu.c */ |
1082 | extern atomic_t mmap_pages_allocated; | 1082 | extern atomic_long_t mmap_pages_allocated; |
1083 | 1083 | ||
1084 | /* prio_tree.c */ | 1084 | /* prio_tree.c */ |
1085 | void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); | 1085 | void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ddadb4defe00..0e80e26ecf21 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -95,6 +95,9 @@ struct page { | |||
95 | void *virtual; /* Kernel virtual address (NULL if | 95 | void *virtual; /* Kernel virtual address (NULL if |
96 | not kmapped, ie. highmem) */ | 96 | not kmapped, ie. highmem) */ |
97 | #endif /* WANT_PAGE_VIRTUAL */ | 97 | #endif /* WANT_PAGE_VIRTUAL */ |
98 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | ||
99 | unsigned long debug_flags; /* Use atomic bitops on this */ | ||
100 | #endif | ||
98 | }; | 101 | }; |
99 | 102 | ||
100 | /* | 103 | /* |
@@ -175,9 +178,6 @@ struct vm_area_struct { | |||
175 | #ifdef CONFIG_NUMA | 178 | #ifdef CONFIG_NUMA |
176 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ | 179 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ |
177 | #endif | 180 | #endif |
178 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | ||
179 | unsigned long debug_flags; /* Use atomic bitops on this */ | ||
180 | #endif | ||
181 | }; | 181 | }; |
182 | 182 | ||
183 | struct core_thread { | 183 | struct core_thread { |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 830bbcd449d6..3a059298cc19 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -22,6 +22,8 @@ struct proc_mounts { | |||
22 | int event; | 22 | int event; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | struct fs_struct; | ||
26 | |||
25 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 27 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
26 | struct fs_struct *); | 28 | struct fs_struct *); |
27 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 29 | extern void __put_mnt_ns(struct mnt_namespace *ns); |
diff --git a/include/linux/mpage.h b/include/linux/mpage.h index 5c42821da2d1..068a0c9946af 100644 --- a/include/linux/mpage.h +++ b/include/linux/mpage.h | |||
@@ -11,21 +11,11 @@ | |||
11 | */ | 11 | */ |
12 | #ifdef CONFIG_BLOCK | 12 | #ifdef CONFIG_BLOCK |
13 | 13 | ||
14 | struct mpage_data { | ||
15 | struct bio *bio; | ||
16 | sector_t last_block_in_bio; | ||
17 | get_block_t *get_block; | ||
18 | unsigned use_writepage; | ||
19 | }; | ||
20 | |||
21 | struct writeback_control; | 14 | struct writeback_control; |
22 | 15 | ||
23 | struct bio *mpage_bio_submit(int rw, struct bio *bio); | ||
24 | int mpage_readpages(struct address_space *mapping, struct list_head *pages, | 16 | int mpage_readpages(struct address_space *mapping, struct list_head *pages, |
25 | unsigned nr_pages, get_block_t get_block); | 17 | unsigned nr_pages, get_block_t get_block); |
26 | int mpage_readpage(struct page *page, get_block_t get_block); | 18 | int mpage_readpage(struct page *page, get_block_t get_block); |
27 | int __mpage_writepage(struct page *page, struct writeback_control *wbc, | ||
28 | void *data); | ||
29 | int mpage_writepages(struct address_space *mapping, | 19 | int mpage_writepages(struct address_space *mapping, |
30 | struct writeback_control *wbc, get_block_t get_block); | 20 | struct writeback_control *wbc, get_block_t get_block); |
31 | int mpage_writepage(struct page *page, get_block_t *get_block, | 21 | int mpage_writepage(struct page *page, get_block_t *get_block, |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index afad7dec1b36..7b370c7cfeff 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -8,6 +8,7 @@ struct mnt_namespace; | |||
8 | struct uts_namespace; | 8 | struct uts_namespace; |
9 | struct ipc_namespace; | 9 | struct ipc_namespace; |
10 | struct pid_namespace; | 10 | struct pid_namespace; |
11 | struct fs_struct; | ||
11 | 12 | ||
12 | /* | 13 | /* |
13 | * A structure to contain pointers to all per-process | 14 | * A structure to contain pointers to all per-process |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 602cc1fdee90..7339c7bf7331 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -91,24 +91,23 @@ static inline void page_cgroup_init(void) | |||
91 | 91 | ||
92 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 92 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
93 | #include <linux/swap.h> | 93 | #include <linux/swap.h> |
94 | extern struct mem_cgroup * | 94 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
95 | swap_cgroup_record(swp_entry_t ent, struct mem_cgroup *mem); | 95 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); |
96 | extern struct mem_cgroup *lookup_swap_cgroup(swp_entry_t ent); | ||
97 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | 96 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |
98 | extern void swap_cgroup_swapoff(int type); | 97 | extern void swap_cgroup_swapoff(int type); |
99 | #else | 98 | #else |
100 | #include <linux/swap.h> | 99 | #include <linux/swap.h> |
101 | 100 | ||
102 | static inline | 101 | static inline |
103 | struct mem_cgroup *swap_cgroup_record(swp_entry_t ent, struct mem_cgroup *mem) | 102 | unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id) |
104 | { | 103 | { |
105 | return NULL; | 104 | return 0; |
106 | } | 105 | } |
107 | 106 | ||
108 | static inline | 107 | static inline |
109 | struct mem_cgroup *lookup_swap_cgroup(swp_entry_t ent) | 108 | unsigned short lookup_swap_cgroup(swp_entry_t ent) |
110 | { | 109 | { |
111 | return NULL; | 110 | return 0; |
112 | } | 111 | } |
113 | 112 | ||
114 | static inline int | 113 | static inline int |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 01ca0856caff..076a7dc67c2b 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -18,9 +18,14 @@ | |||
18 | * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page | 18 | * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page |
19 | * allocation mode flags. | 19 | * allocation mode flags. |
20 | */ | 20 | */ |
21 | #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */ | 21 | enum mapping_flags { |
22 | #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */ | 22 | AS_EIO = __GFP_BITS_SHIFT + 0, /* IO error on async write */ |
23 | #define AS_MM_ALL_LOCKS (__GFP_BITS_SHIFT + 2) /* under mm_take_all_locks() */ | 23 | AS_ENOSPC = __GFP_BITS_SHIFT + 1, /* ENOSPC on async write */ |
24 | AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT + 2, /* under mm_take_all_locks() */ | ||
25 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
26 | AS_UNEVICTABLE = __GFP_BITS_SHIFT + 3, /* e.g., ramdisk, SHM_LOCK */ | ||
27 | #endif | ||
28 | }; | ||
24 | 29 | ||
25 | static inline void mapping_set_error(struct address_space *mapping, int error) | 30 | static inline void mapping_set_error(struct address_space *mapping, int error) |
26 | { | 31 | { |
@@ -33,7 +38,6 @@ static inline void mapping_set_error(struct address_space *mapping, int error) | |||
33 | } | 38 | } |
34 | 39 | ||
35 | #ifdef CONFIG_UNEVICTABLE_LRU | 40 | #ifdef CONFIG_UNEVICTABLE_LRU |
36 | #define AS_UNEVICTABLE (__GFP_BITS_SHIFT + 2) /* e.g., ramdisk, SHM_LOCK */ | ||
37 | 41 | ||
38 | static inline void mapping_set_unevictable(struct address_space *mapping) | 42 | static inline void mapping_set_unevictable(struct address_space *mapping) |
39 | { | 43 | { |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cb14fd260837..170f8b1f22db 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -526,6 +526,7 @@ | |||
526 | #define PCI_DEVICE_ID_AMD_OPUS_7443 0x7443 | 526 | #define PCI_DEVICE_ID_AMD_OPUS_7443 0x7443 |
527 | #define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443 | 527 | #define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443 |
528 | #define PCI_DEVICE_ID_AMD_OPUS_7445 0x7445 | 528 | #define PCI_DEVICE_ID_AMD_OPUS_7445 0x7445 |
529 | #define PCI_DEVICE_ID_AMD_8111_PCI 0x7460 | ||
529 | #define PCI_DEVICE_ID_AMD_8111_LPC 0x7468 | 530 | #define PCI_DEVICE_ID_AMD_8111_LPC 0x7468 |
530 | #define PCI_DEVICE_ID_AMD_8111_IDE 0x7469 | 531 | #define PCI_DEVICE_ID_AMD_8111_IDE 0x7469 |
531 | #define PCI_DEVICE_ID_AMD_8111_SMBUS2 0x746a | 532 | #define PCI_DEVICE_ID_AMD_8111_SMBUS2 0x746a |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 98b93ca4db06..67c15653fc23 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -94,6 +94,7 @@ extern void ptrace_notify(int exit_code); | |||
94 | extern void __ptrace_link(struct task_struct *child, | 94 | extern void __ptrace_link(struct task_struct *child, |
95 | struct task_struct *new_parent); | 95 | struct task_struct *new_parent); |
96 | extern void __ptrace_unlink(struct task_struct *child); | 96 | extern void __ptrace_unlink(struct task_struct *child); |
97 | extern void exit_ptrace(struct task_struct *tracer); | ||
97 | extern void ptrace_fork(struct task_struct *task, unsigned long clone_flags); | 98 | extern void ptrace_fork(struct task_struct *task, unsigned long clone_flags); |
98 | #define PTRACE_MODE_READ 1 | 99 | #define PTRACE_MODE_READ 1 |
99 | #define PTRACE_MODE_ATTACH 2 | 100 | #define PTRACE_MODE_ATTACH 2 |
diff --git a/include/linux/rtc-v3020.h b/include/linux/rtc-v3020.h index bf74e63c98fe..8ba646e610d9 100644 --- a/include/linux/rtc-v3020.h +++ b/include/linux/rtc-v3020.h | |||
@@ -14,6 +14,12 @@ | |||
14 | * is used depends on the board. */ | 14 | * is used depends on the board. */ |
15 | struct v3020_platform_data { | 15 | struct v3020_platform_data { |
16 | int leftshift; /* (1<<(leftshift)) & readl() */ | 16 | int leftshift; /* (1<<(leftshift)) & readl() */ |
17 | |||
18 | int use_gpio:1; | ||
19 | unsigned int gpio_cs; | ||
20 | unsigned int gpio_wr; | ||
21 | unsigned int gpio_rd; | ||
22 | unsigned int gpio_io; | ||
17 | }; | 23 | }; |
18 | 24 | ||
19 | #define V3020_STATUS_0 0x00 | 25 | #define V3020_STATUS_0 0x00 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 481fad3a9b42..9da5aa0771ef 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -68,7 +68,7 @@ struct sched_param { | |||
68 | #include <linux/smp.h> | 68 | #include <linux/smp.h> |
69 | #include <linux/sem.h> | 69 | #include <linux/sem.h> |
70 | #include <linux/signal.h> | 70 | #include <linux/signal.h> |
71 | #include <linux/fs_struct.h> | 71 | #include <linux/path.h> |
72 | #include <linux/compiler.h> | 72 | #include <linux/compiler.h> |
73 | #include <linux/completion.h> | 73 | #include <linux/completion.h> |
74 | #include <linux/pid.h> | 74 | #include <linux/pid.h> |
@@ -97,6 +97,7 @@ struct futex_pi_state; | |||
97 | struct robust_list_head; | 97 | struct robust_list_head; |
98 | struct bio; | 98 | struct bio; |
99 | struct bts_tracer; | 99 | struct bts_tracer; |
100 | struct fs_struct; | ||
100 | 101 | ||
101 | /* | 102 | /* |
102 | * List of flags we want to share for kernel threads, | 103 | * List of flags we want to share for kernel threads, |
@@ -547,25 +548,8 @@ struct signal_struct { | |||
547 | 548 | ||
548 | struct list_head cpu_timers[3]; | 549 | struct list_head cpu_timers[3]; |
549 | 550 | ||
550 | /* job control IDs */ | ||
551 | |||
552 | /* | ||
553 | * pgrp and session fields are deprecated. | ||
554 | * use the task_session_Xnr and task_pgrp_Xnr routines below | ||
555 | */ | ||
556 | |||
557 | union { | ||
558 | pid_t pgrp __deprecated; | ||
559 | pid_t __pgrp; | ||
560 | }; | ||
561 | |||
562 | struct pid *tty_old_pgrp; | 551 | struct pid *tty_old_pgrp; |
563 | 552 | ||
564 | union { | ||
565 | pid_t session __deprecated; | ||
566 | pid_t __session; | ||
567 | }; | ||
568 | |||
569 | /* boolean value for session group leader */ | 553 | /* boolean value for session group leader */ |
570 | int leader; | 554 | int leader; |
571 | 555 | ||
@@ -1469,16 +1453,6 @@ static inline int rt_task(struct task_struct *p) | |||
1469 | return rt_prio(p->prio); | 1453 | return rt_prio(p->prio); |
1470 | } | 1454 | } |
1471 | 1455 | ||
1472 | static inline void set_task_session(struct task_struct *tsk, pid_t session) | ||
1473 | { | ||
1474 | tsk->signal->__session = session; | ||
1475 | } | ||
1476 | |||
1477 | static inline void set_task_pgrp(struct task_struct *tsk, pid_t pgrp) | ||
1478 | { | ||
1479 | tsk->signal->__pgrp = pgrp; | ||
1480 | } | ||
1481 | |||
1482 | static inline struct pid *task_pid(struct task_struct *task) | 1456 | static inline struct pid *task_pid(struct task_struct *task) |
1483 | { | 1457 | { |
1484 | return task->pids[PIDTYPE_PID].pid; | 1458 | return task->pids[PIDTYPE_PID].pid; |
@@ -1489,6 +1463,11 @@ static inline struct pid *task_tgid(struct task_struct *task) | |||
1489 | return task->group_leader->pids[PIDTYPE_PID].pid; | 1463 | return task->group_leader->pids[PIDTYPE_PID].pid; |
1490 | } | 1464 | } |
1491 | 1465 | ||
1466 | /* | ||
1467 | * Without tasklist or rcu lock it is not safe to dereference | ||
1468 | * the result of task_pgrp/task_session even if task == current, | ||
1469 | * we can race with another thread doing sys_setsid/sys_setpgid. | ||
1470 | */ | ||
1492 | static inline struct pid *task_pgrp(struct task_struct *task) | 1471 | static inline struct pid *task_pgrp(struct task_struct *task) |
1493 | { | 1472 | { |
1494 | return task->group_leader->pids[PIDTYPE_PGID].pid; | 1473 | return task->group_leader->pids[PIDTYPE_PGID].pid; |
@@ -1514,17 +1493,23 @@ struct pid_namespace; | |||
1514 | * | 1493 | * |
1515 | * see also pid_nr() etc in include/linux/pid.h | 1494 | * see also pid_nr() etc in include/linux/pid.h |
1516 | */ | 1495 | */ |
1496 | pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, | ||
1497 | struct pid_namespace *ns); | ||
1517 | 1498 | ||
1518 | static inline pid_t task_pid_nr(struct task_struct *tsk) | 1499 | static inline pid_t task_pid_nr(struct task_struct *tsk) |
1519 | { | 1500 | { |
1520 | return tsk->pid; | 1501 | return tsk->pid; |
1521 | } | 1502 | } |
1522 | 1503 | ||
1523 | pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); | 1504 | static inline pid_t task_pid_nr_ns(struct task_struct *tsk, |
1505 | struct pid_namespace *ns) | ||
1506 | { | ||
1507 | return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns); | ||
1508 | } | ||
1524 | 1509 | ||
1525 | static inline pid_t task_pid_vnr(struct task_struct *tsk) | 1510 | static inline pid_t task_pid_vnr(struct task_struct *tsk) |
1526 | { | 1511 | { |
1527 | return pid_vnr(task_pid(tsk)); | 1512 | return __task_pid_nr_ns(tsk, PIDTYPE_PID, NULL); |
1528 | } | 1513 | } |
1529 | 1514 | ||
1530 | 1515 | ||
@@ -1541,31 +1526,34 @@ static inline pid_t task_tgid_vnr(struct task_struct *tsk) | |||
1541 | } | 1526 | } |
1542 | 1527 | ||
1543 | 1528 | ||
1544 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) | 1529 | static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, |
1530 | struct pid_namespace *ns) | ||
1545 | { | 1531 | { |
1546 | return tsk->signal->__pgrp; | 1532 | return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); |
1547 | } | 1533 | } |
1548 | 1534 | ||
1549 | pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); | ||
1550 | |||
1551 | static inline pid_t task_pgrp_vnr(struct task_struct *tsk) | 1535 | static inline pid_t task_pgrp_vnr(struct task_struct *tsk) |
1552 | { | 1536 | { |
1553 | return pid_vnr(task_pgrp(tsk)); | 1537 | return __task_pid_nr_ns(tsk, PIDTYPE_PGID, NULL); |
1554 | } | 1538 | } |
1555 | 1539 | ||
1556 | 1540 | ||
1557 | static inline pid_t task_session_nr(struct task_struct *tsk) | 1541 | static inline pid_t task_session_nr_ns(struct task_struct *tsk, |
1542 | struct pid_namespace *ns) | ||
1558 | { | 1543 | { |
1559 | return tsk->signal->__session; | 1544 | return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns); |
1560 | } | 1545 | } |
1561 | 1546 | ||
1562 | pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); | ||
1563 | |||
1564 | static inline pid_t task_session_vnr(struct task_struct *tsk) | 1547 | static inline pid_t task_session_vnr(struct task_struct *tsk) |
1565 | { | 1548 | { |
1566 | return pid_vnr(task_session(tsk)); | 1549 | return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); |
1567 | } | 1550 | } |
1568 | 1551 | ||
1552 | /* obsolete, do not use */ | ||
1553 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) | ||
1554 | { | ||
1555 | return task_pgrp_nr_ns(tsk, &init_pid_ns); | ||
1556 | } | ||
1569 | 1557 | ||
1570 | /** | 1558 | /** |
1571 | * pid_alive - check that a task structure is not stale | 1559 | * pid_alive - check that a task structure is not stale |
@@ -1975,7 +1963,8 @@ extern void mm_release(struct task_struct *, struct mm_struct *); | |||
1975 | /* Allocate a new mm structure and copy contents from tsk->mm */ | 1963 | /* Allocate a new mm structure and copy contents from tsk->mm */ |
1976 | extern struct mm_struct *dup_mm(struct task_struct *tsk); | 1964 | extern struct mm_struct *dup_mm(struct task_struct *tsk); |
1977 | 1965 | ||
1978 | extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *); | 1966 | extern int copy_thread(unsigned long, unsigned long, unsigned long, |
1967 | struct task_struct *, struct pt_regs *); | ||
1979 | extern void flush_thread(void); | 1968 | extern void flush_thread(void); |
1980 | extern void exit_thread(void); | 1969 | extern void exit_thread(void); |
1981 | 1970 | ||
@@ -2060,6 +2049,11 @@ static inline int thread_group_empty(struct task_struct *p) | |||
2060 | #define delay_group_leader(p) \ | 2049 | #define delay_group_leader(p) \ |
2061 | (thread_group_leader(p) && !thread_group_empty(p)) | 2050 | (thread_group_leader(p) && !thread_group_empty(p)) |
2062 | 2051 | ||
2052 | static inline int task_detached(struct task_struct *p) | ||
2053 | { | ||
2054 | return p->exit_signal == -1; | ||
2055 | } | ||
2056 | |||
2063 | /* | 2057 | /* |
2064 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring | 2058 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring |
2065 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | 2059 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
diff --git a/include/linux/spi/eeprom.h b/include/linux/spi/eeprom.h index 1085212c446e..306e7b1c69ed 100644 --- a/include/linux/spi/eeprom.h +++ b/include/linux/spi/eeprom.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_SPI_EEPROM_H | 1 | #ifndef __LINUX_SPI_EEPROM_H |
2 | #define __LINUX_SPI_EEPROM_H | 2 | #define __LINUX_SPI_EEPROM_H |
3 | 3 | ||
4 | #include <linux/memory.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * Put one of these structures in platform_data for SPI EEPROMS handled | 7 | * Put one of these structures in platform_data for SPI EEPROMS handled |
6 | * by the "at25" driver. On SPI, most EEPROMS understand the same core | 8 | * by the "at25" driver. On SPI, most EEPROMS understand the same core |
@@ -17,6 +19,10 @@ struct spi_eeprom { | |||
17 | #define EE_ADDR2 0x0002 /* 16 bit addrs */ | 19 | #define EE_ADDR2 0x0002 /* 16 bit addrs */ |
18 | #define EE_ADDR3 0x0004 /* 24 bit addrs */ | 20 | #define EE_ADDR3 0x0004 /* 24 bit addrs */ |
19 | #define EE_READONLY 0x0008 /* disallow writes */ | 21 | #define EE_READONLY 0x0008 /* disallow writes */ |
22 | |||
23 | /* for exporting this chip's data to other kernel code */ | ||
24 | void (*setup)(struct memory_accessor *mem, void *context); | ||
25 | void *context; | ||
20 | }; | 26 | }; |
21 | 27 | ||
22 | #endif /* __LINUX_SPI_EEPROM_H */ | 28 | #endif /* __LINUX_SPI_EEPROM_H */ |
diff --git a/include/linux/spi/spi_gpio.h b/include/linux/spi/spi_gpio.h index 0f01a0f1f40c..ca6782ee4b9f 100644 --- a/include/linux/spi/spi_gpio.h +++ b/include/linux/spi/spi_gpio.h | |||
@@ -25,10 +25,16 @@ | |||
25 | * ... | 25 | * ... |
26 | * }; | 26 | * }; |
27 | * | 27 | * |
28 | * If chipselect is not used (there's only one device on the bus), assign | ||
29 | * SPI_GPIO_NO_CHIPSELECT to the controller_data: | ||
30 | * .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT; | ||
31 | * | ||
28 | * If the bitbanged bus is later switched to a "native" controller, | 32 | * If the bitbanged bus is later switched to a "native" controller, |
29 | * that platform_device and controller_data should be removed. | 33 | * that platform_device and controller_data should be removed. |
30 | */ | 34 | */ |
31 | 35 | ||
36 | #define SPI_GPIO_NO_CHIPSELECT ((unsigned long)-1l) | ||
37 | |||
32 | /** | 38 | /** |
33 | * struct spi_gpio_platform_data - parameter for bitbanged SPI master | 39 | * struct spi_gpio_platform_data - parameter for bitbanged SPI master |
34 | * @sck: number of the GPIO used for clock output | 40 | * @sck: number of the GPIO used for clock output |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index a0c66a2e00ad..252b245cfcf4 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -153,9 +153,11 @@ do { \ | |||
153 | extern int _raw_spin_trylock(spinlock_t *lock); | 153 | extern int _raw_spin_trylock(spinlock_t *lock); |
154 | extern void _raw_spin_unlock(spinlock_t *lock); | 154 | extern void _raw_spin_unlock(spinlock_t *lock); |
155 | extern void _raw_read_lock(rwlock_t *lock); | 155 | extern void _raw_read_lock(rwlock_t *lock); |
156 | #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock) | ||
156 | extern int _raw_read_trylock(rwlock_t *lock); | 157 | extern int _raw_read_trylock(rwlock_t *lock); |
157 | extern void _raw_read_unlock(rwlock_t *lock); | 158 | extern void _raw_read_unlock(rwlock_t *lock); |
158 | extern void _raw_write_lock(rwlock_t *lock); | 159 | extern void _raw_write_lock(rwlock_t *lock); |
160 | #define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock) | ||
159 | extern int _raw_write_trylock(rwlock_t *lock); | 161 | extern int _raw_write_trylock(rwlock_t *lock); |
160 | extern void _raw_write_unlock(rwlock_t *lock); | 162 | extern void _raw_write_unlock(rwlock_t *lock); |
161 | #else | 163 | #else |
@@ -165,9 +167,13 @@ do { \ | |||
165 | # define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock) | 167 | # define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock) |
166 | # define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | 168 | # define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) |
167 | # define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock) | 169 | # define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock) |
170 | # define _raw_read_lock_flags(lock, flags) \ | ||
171 | __raw_read_lock_flags(&(lock)->raw_lock, *(flags)) | ||
168 | # define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock) | 172 | # define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock) |
169 | # define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock) | 173 | # define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock) |
170 | # define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock) | 174 | # define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock) |
175 | # define _raw_write_lock_flags(lock, flags) \ | ||
176 | __raw_write_lock_flags(&(lock)->raw_lock, *(flags)) | ||
171 | # define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock) | 177 | # define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock) |
172 | # define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock) | 178 | # define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock) |
173 | #endif | 179 | #endif |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 99b8bdb17b2b..0ff2779c44d0 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
@@ -125,6 +125,7 @@ | |||
125 | #define MGSL_MODE_MONOSYNC 3 | 125 | #define MGSL_MODE_MONOSYNC 3 |
126 | #define MGSL_MODE_BISYNC 4 | 126 | #define MGSL_MODE_BISYNC 4 |
127 | #define MGSL_MODE_RAW 6 | 127 | #define MGSL_MODE_RAW 6 |
128 | #define MGSL_MODE_BASE_CLOCK 7 | ||
128 | 129 | ||
129 | #define MGSL_BUS_TYPE_ISA 1 | 130 | #define MGSL_BUS_TYPE_ISA 1 |
130 | #define MGSL_BUS_TYPE_EISA 2 | 131 | #define MGSL_BUS_TYPE_EISA 2 |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index f9f900cfd066..b299a82a05e7 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -461,6 +461,10 @@ asmlinkage long sys_pread64(unsigned int fd, char __user *buf, | |||
461 | size_t count, loff_t pos); | 461 | size_t count, loff_t pos); |
462 | asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf, | 462 | asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf, |
463 | size_t count, loff_t pos); | 463 | size_t count, loff_t pos); |
464 | asmlinkage long sys_preadv(unsigned long fd, const struct iovec __user *vec, | ||
465 | unsigned long vlen, u32 pos_high, u32 pos_low); | ||
466 | asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec, | ||
467 | unsigned long vlen, u32 pos_high, u32 pos_low); | ||
464 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); | 468 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); |
465 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); | 469 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); |
466 | asmlinkage long sys_chdir(const char __user *filename); | 470 | asmlinkage long sys_chdir(const char __user *filename); |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 6186a789d6c7..c7aa154f4bfc 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -388,17 +388,14 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info, | |||
388 | * tracehook_consider_ignored_signal - suppress short-circuit of ignored signal | 388 | * tracehook_consider_ignored_signal - suppress short-circuit of ignored signal |
389 | * @task: task receiving the signal | 389 | * @task: task receiving the signal |
390 | * @sig: signal number being sent | 390 | * @sig: signal number being sent |
391 | * @handler: %SIG_IGN or %SIG_DFL | ||
392 | * | 391 | * |
393 | * Return zero iff tracing doesn't care to examine this ignored signal, | 392 | * Return zero iff tracing doesn't care to examine this ignored signal, |
394 | * so it can short-circuit normal delivery and never even get queued. | 393 | * so it can short-circuit normal delivery and never even get queued. |
395 | * Either @handler is %SIG_DFL and @sig's default is ignore, or it's %SIG_IGN. | ||
396 | * | 394 | * |
397 | * Called with @task->sighand->siglock held. | 395 | * Called with @task->sighand->siglock held. |
398 | */ | 396 | */ |
399 | static inline int tracehook_consider_ignored_signal(struct task_struct *task, | 397 | static inline int tracehook_consider_ignored_signal(struct task_struct *task, |
400 | int sig, | 398 | int sig) |
401 | void __user *handler) | ||
402 | { | 399 | { |
403 | return (task_ptrace(task) & PT_PTRACED) != 0; | 400 | return (task_ptrace(task) & PT_PTRACED) != 0; |
404 | } | 401 | } |
@@ -407,19 +404,17 @@ static inline int tracehook_consider_ignored_signal(struct task_struct *task, | |||
407 | * tracehook_consider_fatal_signal - suppress special handling of fatal signal | 404 | * tracehook_consider_fatal_signal - suppress special handling of fatal signal |
408 | * @task: task receiving the signal | 405 | * @task: task receiving the signal |
409 | * @sig: signal number being sent | 406 | * @sig: signal number being sent |
410 | * @handler: %SIG_DFL or %SIG_IGN | ||
411 | * | 407 | * |
412 | * Return nonzero to prevent special handling of this termination signal. | 408 | * Return nonzero to prevent special handling of this termination signal. |
413 | * Normally @handler is %SIG_DFL. It can be %SIG_IGN if @sig is ignored, | 409 | * Normally handler for signal is %SIG_DFL. It can be %SIG_IGN if @sig is |
414 | * in which case force_sig() is about to reset it to %SIG_DFL. | 410 | * ignored, in which case force_sig() is about to reset it to %SIG_DFL. |
415 | * When this returns zero, this signal might cause a quick termination | 411 | * When this returns zero, this signal might cause a quick termination |
416 | * that does not give the debugger a chance to intercept the signal. | 412 | * that does not give the debugger a chance to intercept the signal. |
417 | * | 413 | * |
418 | * Called with or without @task->sighand->siglock held. | 414 | * Called with or without @task->sighand->siglock held. |
419 | */ | 415 | */ |
420 | static inline int tracehook_consider_fatal_signal(struct task_struct *task, | 416 | static inline int tracehook_consider_fatal_signal(struct task_struct *task, |
421 | int sig, | 417 | int sig) |
422 | void __user *handler) | ||
423 | { | 418 | { |
424 | return (task_ptrace(task) & PT_PTRACED) != 0; | 419 | return (task_ptrace(task) & PT_PTRACED) != 0; |
425 | } | 420 | } |
@@ -507,7 +502,7 @@ static inline int tracehook_notify_jctl(int notify, int why) | |||
507 | static inline int tracehook_notify_death(struct task_struct *task, | 502 | static inline int tracehook_notify_death(struct task_struct *task, |
508 | void **death_cookie, int group_dead) | 503 | void **death_cookie, int group_dead) |
509 | { | 504 | { |
510 | if (task->exit_signal == -1) | 505 | if (task_detached(task)) |
511 | return task->ptrace ? SIGCHLD : DEATH_REAP; | 506 | return task->ptrace ? SIGCHLD : DEATH_REAP; |
512 | 507 | ||
513 | /* | 508 | /* |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 3cd51e579ab1..13e1adf55c4c 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -41,6 +41,11 @@ struct delayed_work { | |||
41 | struct timer_list timer; | 41 | struct timer_list timer; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) | ||
45 | { | ||
46 | return container_of(work, struct delayed_work, work); | ||
47 | } | ||
48 | |||
44 | struct execute_work { | 49 | struct execute_work { |
45 | struct work_struct work; | 50 | struct work_struct work; |
46 | }; | 51 | }; |