diff options
Diffstat (limited to 'include/linux')
39 files changed, 381 insertions, 81 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 1feed71551c..5a5385749e1 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -330,6 +330,7 @@ unifdef-y += scc.h | |||
330 | unifdef-y += sched.h | 330 | unifdef-y += sched.h |
331 | unifdef-y += screen_info.h | 331 | unifdef-y += screen_info.h |
332 | unifdef-y += sdla.h | 332 | unifdef-y += sdla.h |
333 | unifdef-y += securebits.h | ||
333 | unifdef-y += selinux_netlink.h | 334 | unifdef-y += selinux_netlink.h |
334 | unifdef-y += sem.h | 335 | unifdef-y += sem.h |
335 | unifdef-y += serial_core.h | 336 | unifdef-y += serial_core.h |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index dd97fb8408a..b10ec49ee2d 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -53,6 +53,7 @@ extern void free_bootmem_node(pg_data_t *pgdat, | |||
53 | unsigned long addr, | 53 | unsigned long addr, |
54 | unsigned long size); | 54 | unsigned long size); |
55 | extern void free_bootmem(unsigned long addr, unsigned long size); | 55 | extern void free_bootmem(unsigned long addr, unsigned long size); |
56 | extern void free_bootmem_late(unsigned long addr, unsigned long size); | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * Flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE, | 59 | * Flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE, |
diff --git a/include/linux/capability.h b/include/linux/capability.h index c8f2a5f70ed..39e5ff512fb 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -92,9 +92,7 @@ struct vfs_cap_data { | |||
92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | 92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 |
93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | 93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 |
94 | 94 | ||
95 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
96 | extern int file_caps_enabled; | 95 | extern int file_caps_enabled; |
97 | #endif | ||
98 | 96 | ||
99 | typedef struct kernel_cap_struct { | 97 | typedef struct kernel_cap_struct { |
100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; | 98 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 450fa597c94..ab3af40a53c 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -36,4 +36,18 @@ | |||
36 | the kernel context */ | 36 | the kernel context */ |
37 | #define __cold __attribute__((__cold__)) | 37 | #define __cold __attribute__((__cold__)) |
38 | 38 | ||
39 | |||
40 | #if __GNUC_MINOR__ >= 5 | ||
41 | /* | ||
42 | * Mark a position in code as unreachable. This can be used to | ||
43 | * suppress control flow warnings after asm blocks that transfer | ||
44 | * control elsewhere. | ||
45 | * | ||
46 | * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
47 | * this in the preprocessor, but we can live with this because they're | ||
48 | * unreleased. Really, we need to have autoconf for the kernel. | ||
49 | */ | ||
50 | #define unreachable() __builtin_unreachable() | ||
51 | #endif | ||
52 | |||
39 | #endif | 53 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 04fb5135b4e..59f208926d1 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -144,6 +144,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
144 | # define barrier() __memory_barrier() | 144 | # define barrier() __memory_barrier() |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | /* Unreachable code */ | ||
148 | #ifndef unreachable | ||
149 | # define unreachable() do { } while (1) | ||
150 | #endif | ||
151 | |||
147 | #ifndef RELOC_HIDE | 152 | #ifndef RELOC_HIDE |
148 | # define RELOC_HIDE(ptr, off) \ | 153 | # define RELOC_HIDE(ptr, off) \ |
149 | ({ unsigned long __ptr; \ | 154 | ({ unsigned long __ptr; \ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 44717eb4763..79a2340d83c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -291,8 +291,15 @@ struct global_attr { | |||
291 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 291 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
292 | int cpufreq_update_policy(unsigned int cpu); | 292 | int cpufreq_update_policy(unsigned int cpu); |
293 | 293 | ||
294 | #ifdef CONFIG_CPU_FREQ | ||
294 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 295 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
295 | unsigned int cpufreq_get(unsigned int cpu); | 296 | unsigned int cpufreq_get(unsigned int cpu); |
297 | #else | ||
298 | static inline unsigned int cpufreq_get(unsigned int cpu) | ||
299 | { | ||
300 | return 0; | ||
301 | } | ||
302 | #endif | ||
296 | 303 | ||
297 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ | 304 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
298 | #ifdef CONFIG_CPU_FREQ | 305 | #ifdef CONFIG_CPU_FREQ |
diff --git a/include/linux/device.h b/include/linux/device.h index aca31bf7d8e..2ea3e492181 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -124,7 +124,9 @@ struct device_driver { | |||
124 | struct bus_type *bus; | 124 | struct bus_type *bus; |
125 | 125 | ||
126 | struct module *owner; | 126 | struct module *owner; |
127 | const char *mod_name; /* used for built-in modules */ | 127 | const char *mod_name; /* used for built-in modules */ |
128 | |||
129 | bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ | ||
128 | 130 | ||
129 | int (*probe) (struct device *dev); | 131 | int (*probe) (struct device *dev); |
130 | int (*remove) (struct device *dev); | 132 | int (*remove) (struct device *dev); |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 4a2b162c256..5de4c9e5856 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -208,16 +208,9 @@ struct dmar_atsr_unit { | |||
208 | u8 include_all:1; /* include all ports */ | 208 | u8 include_all:1; /* include all ports */ |
209 | }; | 209 | }; |
210 | 210 | ||
211 | /* Intel DMAR initialization functions */ | ||
212 | extern int intel_iommu_init(void); | 211 | extern int intel_iommu_init(void); |
213 | #else | 212 | #else /* !CONFIG_DMAR: */ |
214 | static inline int intel_iommu_init(void) | 213 | static inline int intel_iommu_init(void) { return -ENODEV; } |
215 | { | 214 | #endif /* CONFIG_DMAR */ |
216 | #ifdef CONFIG_INTR_REMAP | 215 | |
217 | return dmar_dev_scope_init(); | ||
218 | #else | ||
219 | return -ENODEV; | ||
220 | #endif | ||
221 | } | ||
222 | #endif /* !CONFIG_DMAR */ | ||
223 | #endif /* __DMAR_H__ */ | 216 | #endif /* __DMAR_H__ */ |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index ca1bfe90004..93e7428156b 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -137,6 +137,14 @@ struct ext3_inode_info { | |||
137 | * by other means, so we have truncate_mutex. | 137 | * by other means, so we have truncate_mutex. |
138 | */ | 138 | */ |
139 | struct mutex truncate_mutex; | 139 | struct mutex truncate_mutex; |
140 | |||
141 | /* | ||
142 | * Transactions that contain inode's metadata needed to complete | ||
143 | * fsync and fdatasync, respectively. | ||
144 | */ | ||
145 | atomic_t i_sync_tid; | ||
146 | atomic_t i_datasync_tid; | ||
147 | |||
140 | struct inode vfs_inode; | 148 | struct inode vfs_inode; |
141 | }; | 149 | }; |
142 | 150 | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index a34bdf5a9d2..de9c722e7b9 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -669,12 +669,6 @@ struct fb_ops { | |||
669 | /* perform fb specific mmap */ | 669 | /* perform fb specific mmap */ |
670 | int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma); | 670 | int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma); |
671 | 671 | ||
672 | /* save current hardware state */ | ||
673 | void (*fb_save_state)(struct fb_info *info); | ||
674 | |||
675 | /* restore saved state */ | ||
676 | void (*fb_restore_state)(struct fb_info *info); | ||
677 | |||
678 | /* get capability given var */ | 672 | /* get capability given var */ |
679 | void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps, | 673 | void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps, |
680 | struct fb_var_screeninfo *var); | 674 | struct fb_var_screeninfo *var); |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 84d3532dd3e..7be0c6fbe88 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -91,6 +91,8 @@ struct fscache_operation { | |||
91 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ | 91 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ |
92 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ | 92 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ |
93 | #define FSCACHE_OP_DEAD 6 /* op is now dead */ | 93 | #define FSCACHE_OP_DEAD 6 /* op is now dead */ |
94 | #define FSCACHE_OP_DEC_READ_CNT 7 /* decrement object->n_reads on destruction */ | ||
95 | #define FSCACHE_OP_KEEP_FLAGS 0xc0 /* flags to keep when repurposing an op */ | ||
94 | 96 | ||
95 | atomic_t usage; | 97 | atomic_t usage; |
96 | unsigned debug_id; /* debugging ID */ | 98 | unsigned debug_id; /* debugging ID */ |
@@ -102,6 +104,16 @@ struct fscache_operation { | |||
102 | 104 | ||
103 | /* operation releaser */ | 105 | /* operation releaser */ |
104 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
107 | |||
108 | #ifdef CONFIG_SLOW_WORK_PROC | ||
109 | const char *name; /* operation name */ | ||
110 | const char *state; /* operation state */ | ||
111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | ||
112 | #define fscache_set_op_state(OP, S) do { (OP)->state = (S); } while(0) | ||
113 | #else | ||
114 | #define fscache_set_op_name(OP, N) do { } while(0) | ||
115 | #define fscache_set_op_state(OP, S) do { } while(0) | ||
116 | #endif | ||
105 | }; | 117 | }; |
106 | 118 | ||
107 | extern atomic_t fscache_op_debug_id; | 119 | extern atomic_t fscache_op_debug_id; |
@@ -125,6 +137,7 @@ static inline void fscache_operation_init(struct fscache_operation *op, | |||
125 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); | 137 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); |
126 | op->release = release; | 138 | op->release = release; |
127 | INIT_LIST_HEAD(&op->pend_link); | 139 | INIT_LIST_HEAD(&op->pend_link); |
140 | fscache_set_op_state(op, "Init"); | ||
128 | } | 141 | } |
129 | 142 | ||
130 | /** | 143 | /** |
@@ -221,8 +234,10 @@ struct fscache_cache_ops { | |||
221 | struct fscache_object *(*alloc_object)(struct fscache_cache *cache, | 234 | struct fscache_object *(*alloc_object)(struct fscache_cache *cache, |
222 | struct fscache_cookie *cookie); | 235 | struct fscache_cookie *cookie); |
223 | 236 | ||
224 | /* look up the object for a cookie */ | 237 | /* look up the object for a cookie |
225 | void (*lookup_object)(struct fscache_object *object); | 238 | * - return -ETIMEDOUT to be requeued |
239 | */ | ||
240 | int (*lookup_object)(struct fscache_object *object); | ||
226 | 241 | ||
227 | /* finished looking up */ | 242 | /* finished looking up */ |
228 | void (*lookup_complete)(struct fscache_object *object); | 243 | void (*lookup_complete)(struct fscache_object *object); |
@@ -297,12 +312,14 @@ struct fscache_cookie { | |||
297 | atomic_t usage; /* number of users of this cookie */ | 312 | atomic_t usage; /* number of users of this cookie */ |
298 | atomic_t n_children; /* number of children of this cookie */ | 313 | atomic_t n_children; /* number of children of this cookie */ |
299 | spinlock_t lock; | 314 | spinlock_t lock; |
315 | spinlock_t stores_lock; /* lock on page store tree */ | ||
300 | struct hlist_head backing_objects; /* object(s) backing this file/index */ | 316 | struct hlist_head backing_objects; /* object(s) backing this file/index */ |
301 | const struct fscache_cookie_def *def; /* definition */ | 317 | const struct fscache_cookie_def *def; /* definition */ |
302 | struct fscache_cookie *parent; /* parent of this entry */ | 318 | struct fscache_cookie *parent; /* parent of this entry */ |
303 | void *netfs_data; /* back pointer to netfs */ | 319 | void *netfs_data; /* back pointer to netfs */ |
304 | struct radix_tree_root stores; /* pages to be stored on this cookie */ | 320 | struct radix_tree_root stores; /* pages to be stored on this cookie */ |
305 | #define FSCACHE_COOKIE_PENDING_TAG 0 /* pages tag: pending write to cache */ | 321 | #define FSCACHE_COOKIE_PENDING_TAG 0 /* pages tag: pending write to cache */ |
322 | #define FSCACHE_COOKIE_STORING_TAG 1 /* pages tag: writing to cache */ | ||
306 | 323 | ||
307 | unsigned long flags; | 324 | unsigned long flags; |
308 | #define FSCACHE_COOKIE_LOOKING_UP 0 /* T if non-index cookie being looked up still */ | 325 | #define FSCACHE_COOKIE_LOOKING_UP 0 /* T if non-index cookie being looked up still */ |
@@ -337,6 +354,7 @@ struct fscache_object { | |||
337 | FSCACHE_OBJECT_RECYCLING, /* retiring object */ | 354 | FSCACHE_OBJECT_RECYCLING, /* retiring object */ |
338 | FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */ | 355 | FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */ |
339 | FSCACHE_OBJECT_DEAD, /* object is now dead */ | 356 | FSCACHE_OBJECT_DEAD, /* object is now dead */ |
357 | FSCACHE_OBJECT__NSTATES | ||
340 | } state; | 358 | } state; |
341 | 359 | ||
342 | int debug_id; /* debugging ID */ | 360 | int debug_id; /* debugging ID */ |
@@ -345,6 +363,7 @@ struct fscache_object { | |||
345 | int n_obj_ops; /* number of object ops outstanding on object */ | 363 | int n_obj_ops; /* number of object ops outstanding on object */ |
346 | int n_in_progress; /* number of ops in progress */ | 364 | int n_in_progress; /* number of ops in progress */ |
347 | int n_exclusive; /* number of exclusive ops queued */ | 365 | int n_exclusive; /* number of exclusive ops queued */ |
366 | atomic_t n_reads; /* number of read ops in progress */ | ||
348 | spinlock_t lock; /* state and operations lock */ | 367 | spinlock_t lock; /* state and operations lock */ |
349 | 368 | ||
350 | unsigned long lookup_jif; /* time at which lookup started */ | 369 | unsigned long lookup_jif; /* time at which lookup started */ |
@@ -358,6 +377,7 @@ struct fscache_object { | |||
358 | #define FSCACHE_OBJECT_EV_RELEASE 4 /* T if netfs requested object release */ | 377 | #define FSCACHE_OBJECT_EV_RELEASE 4 /* T if netfs requested object release */ |
359 | #define FSCACHE_OBJECT_EV_RETIRE 5 /* T if netfs requested object retirement */ | 378 | #define FSCACHE_OBJECT_EV_RETIRE 5 /* T if netfs requested object retirement */ |
360 | #define FSCACHE_OBJECT_EV_WITHDRAW 6 /* T if cache requested object withdrawal */ | 379 | #define FSCACHE_OBJECT_EV_WITHDRAW 6 /* T if cache requested object withdrawal */ |
380 | #define FSCACHE_OBJECT_EVENTS_MASK 0x7f /* mask of all events*/ | ||
361 | 381 | ||
362 | unsigned long flags; | 382 | unsigned long flags; |
363 | #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ | 383 | #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ |
@@ -373,7 +393,11 @@ struct fscache_object { | |||
373 | struct list_head dependents; /* FIFO of dependent objects */ | 393 | struct list_head dependents; /* FIFO of dependent objects */ |
374 | struct list_head dep_link; /* link in parent's dependents list */ | 394 | struct list_head dep_link; /* link in parent's dependents list */ |
375 | struct list_head pending_ops; /* unstarted operations on this object */ | 395 | struct list_head pending_ops; /* unstarted operations on this object */ |
396 | #ifdef CONFIG_FSCACHE_OBJECT_LIST | ||
397 | struct rb_node objlist_link; /* link in global object list */ | ||
398 | #endif | ||
376 | pgoff_t store_limit; /* current storage limit */ | 399 | pgoff_t store_limit; /* current storage limit */ |
400 | loff_t store_limit_l; /* current storage limit */ | ||
377 | }; | 401 | }; |
378 | 402 | ||
379 | extern const char *fscache_object_states[]; | 403 | extern const char *fscache_object_states[]; |
@@ -383,6 +407,10 @@ extern const char *fscache_object_states[]; | |||
383 | (obj)->state >= FSCACHE_OBJECT_AVAILABLE && \ | 407 | (obj)->state >= FSCACHE_OBJECT_AVAILABLE && \ |
384 | (obj)->state < FSCACHE_OBJECT_DYING) | 408 | (obj)->state < FSCACHE_OBJECT_DYING) |
385 | 409 | ||
410 | #define fscache_object_is_dead(obj) \ | ||
411 | (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \ | ||
412 | (obj)->state >= FSCACHE_OBJECT_DYING) | ||
413 | |||
386 | extern const struct slow_work_ops fscache_object_slow_work_ops; | 414 | extern const struct slow_work_ops fscache_object_slow_work_ops; |
387 | 415 | ||
388 | /** | 416 | /** |
@@ -414,6 +442,7 @@ void fscache_object_init(struct fscache_object *object, | |||
414 | object->events = object->event_mask = 0; | 442 | object->events = object->event_mask = 0; |
415 | object->flags = 0; | 443 | object->flags = 0; |
416 | object->store_limit = 0; | 444 | object->store_limit = 0; |
445 | object->store_limit_l = 0; | ||
417 | object->cache = cache; | 446 | object->cache = cache; |
418 | object->cookie = cookie; | 447 | object->cookie = cookie; |
419 | object->parent = NULL; | 448 | object->parent = NULL; |
@@ -422,6 +451,12 @@ void fscache_object_init(struct fscache_object *object, | |||
422 | extern void fscache_object_lookup_negative(struct fscache_object *object); | 451 | extern void fscache_object_lookup_negative(struct fscache_object *object); |
423 | extern void fscache_obtained_object(struct fscache_object *object); | 452 | extern void fscache_obtained_object(struct fscache_object *object); |
424 | 453 | ||
454 | #ifdef CONFIG_FSCACHE_OBJECT_LIST | ||
455 | extern void fscache_object_destroy(struct fscache_object *object); | ||
456 | #else | ||
457 | #define fscache_object_destroy(object) do {} while(0) | ||
458 | #endif | ||
459 | |||
425 | /** | 460 | /** |
426 | * fscache_object_destroyed - Note destruction of an object in a cache | 461 | * fscache_object_destroyed - Note destruction of an object in a cache |
427 | * @cache: The cache from which the object came | 462 | * @cache: The cache from which the object came |
@@ -460,6 +495,7 @@ static inline void fscache_object_lookup_error(struct fscache_object *object) | |||
460 | static inline | 495 | static inline |
461 | void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) | 496 | void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) |
462 | { | 497 | { |
498 | object->store_limit_l = i_size; | ||
463 | object->store_limit = i_size >> PAGE_SHIFT; | 499 | object->store_limit = i_size >> PAGE_SHIFT; |
464 | if (i_size & ~PAGE_MASK) | 500 | if (i_size & ~PAGE_MASK) |
465 | object->store_limit++; | 501 | object->store_limit++; |
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index 6d8ee466e0a..595ce49288b 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
@@ -202,6 +202,8 @@ extern int __fscache_write_page(struct fscache_cookie *, struct page *, gfp_t); | |||
202 | extern void __fscache_uncache_page(struct fscache_cookie *, struct page *); | 202 | extern void __fscache_uncache_page(struct fscache_cookie *, struct page *); |
203 | extern bool __fscache_check_page_write(struct fscache_cookie *, struct page *); | 203 | extern bool __fscache_check_page_write(struct fscache_cookie *, struct page *); |
204 | extern void __fscache_wait_on_page_write(struct fscache_cookie *, struct page *); | 204 | extern void __fscache_wait_on_page_write(struct fscache_cookie *, struct page *); |
205 | extern bool __fscache_maybe_release_page(struct fscache_cookie *, struct page *, | ||
206 | gfp_t); | ||
205 | 207 | ||
206 | /** | 208 | /** |
207 | * fscache_register_netfs - Register a filesystem as desiring caching services | 209 | * fscache_register_netfs - Register a filesystem as desiring caching services |
@@ -615,4 +617,29 @@ void fscache_wait_on_page_write(struct fscache_cookie *cookie, | |||
615 | __fscache_wait_on_page_write(cookie, page); | 617 | __fscache_wait_on_page_write(cookie, page); |
616 | } | 618 | } |
617 | 619 | ||
620 | /** | ||
621 | * fscache_maybe_release_page - Consider releasing a page, cancelling a store | ||
622 | * @cookie: The cookie representing the cache object | ||
623 | * @page: The netfs page that is being cached. | ||
624 | * @gfp: The gfp flags passed to releasepage() | ||
625 | * | ||
626 | * Consider releasing a page for the vmscan algorithm, on behalf of the netfs's | ||
627 | * releasepage() call. A storage request on the page may cancelled if it is | ||
628 | * not currently being processed. | ||
629 | * | ||
630 | * The function returns true if the page no longer has a storage request on it, | ||
631 | * and false if a storage request is left in place. If true is returned, the | ||
632 | * page will have been passed to fscache_uncache_page(). If false is returned | ||
633 | * the page cannot be freed yet. | ||
634 | */ | ||
635 | static inline | ||
636 | bool fscache_maybe_release_page(struct fscache_cookie *cookie, | ||
637 | struct page *page, | ||
638 | gfp_t gfp) | ||
639 | { | ||
640 | if (fscache_cookie_valid(cookie) && PageFsCache(page)) | ||
641 | return __fscache_maybe_release_page(cookie, page, gfp); | ||
642 | return false; | ||
643 | } | ||
644 | |||
618 | #endif /* _LINUX_FSCACHE_H */ | 645 | #endif /* _LINUX_FSCACHE_H */ |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index b80c88dedbb..81f90a59cda 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -81,7 +81,11 @@ struct gfs2_meta_header { | |||
81 | __be32 mh_type; | 81 | __be32 mh_type; |
82 | __be64 __pad0; /* Was generation number in gfs1 */ | 82 | __be64 __pad0; /* Was generation number in gfs1 */ |
83 | __be32 mh_format; | 83 | __be32 mh_format; |
84 | __be32 __pad1; /* Was incarnation number in gfs1 */ | 84 | /* This union is to keep userspace happy */ |
85 | union { | ||
86 | __be32 mh_jid; /* Was incarnation number in gfs1 */ | ||
87 | __be32 __pad1; | ||
88 | }; | ||
85 | }; | 89 | }; |
86 | 90 | ||
87 | /* | 91 | /* |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index f13255e0640..9eb07bbc652 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
@@ -21,7 +21,7 @@ struct i2c_pnx_mif { | |||
21 | int mode; /* Interface mode */ | 21 | int mode; /* Interface mode */ |
22 | struct completion complete; /* I/O completion */ | 22 | struct completion complete; /* I/O completion */ |
23 | struct timer_list timer; /* Timeout */ | 23 | struct timer_list timer; /* Timeout */ |
24 | char * buf; /* Data buffer */ | 24 | u8 * buf; /* Data buffer */ |
25 | int len; /* Length of data buffer */ | 25 | int len; /* Length of data buffer */ |
26 | }; | 26 | }; |
27 | 27 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 57d41b0abce..7b40cda57a7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -361,6 +361,24 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data) | |||
361 | dev_set_drvdata(&dev->dev, data); | 361 | dev_set_drvdata(&dev->dev, data); |
362 | } | 362 | } |
363 | 363 | ||
364 | /** | ||
365 | * i2c_lock_adapter - Prevent access to an I2C bus segment | ||
366 | * @adapter: Target I2C bus segment | ||
367 | */ | ||
368 | static inline void i2c_lock_adapter(struct i2c_adapter *adapter) | ||
369 | { | ||
370 | mutex_lock(&adapter->bus_lock); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * i2c_unlock_adapter - Reauthorize access to an I2C bus segment | ||
375 | * @adapter: Target I2C bus segment | ||
376 | */ | ||
377 | static inline void i2c_unlock_adapter(struct i2c_adapter *adapter) | ||
378 | { | ||
379 | mutex_unlock(&adapter->bus_lock); | ||
380 | } | ||
381 | |||
364 | /*flags for the client struct: */ | 382 | /*flags for the client struct: */ |
365 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ | 383 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ |
366 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ | 384 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 21a6f5d9af2..8d10aa7fd4c 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -83,16 +83,12 @@ extern struct group_info init_groups; | |||
83 | #define INIT_IDS | 83 | #define INIT_IDS |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
87 | /* | 86 | /* |
88 | * Because of the reduced scope of CAP_SETPCAP when filesystem | 87 | * Because of the reduced scope of CAP_SETPCAP when filesystem |
89 | * capabilities are in effect, it is safe to allow CAP_SETPCAP to | 88 | * capabilities are in effect, it is safe to allow CAP_SETPCAP to |
90 | * be available in the default configuration. | 89 | * be available in the default configuration. |
91 | */ | 90 | */ |
92 | # define CAP_INIT_BSET CAP_FULL_SET | 91 | # define CAP_INIT_BSET CAP_FULL_SET |
93 | #else | ||
94 | # define CAP_INIT_BSET CAP_INIT_EFF_SET | ||
95 | #endif | ||
96 | 92 | ||
97 | #ifdef CONFIG_TREE_PREEMPT_RCU | 93 | #ifdef CONFIG_TREE_PREEMPT_RCU |
98 | #define INIT_TASK_RCU_PREEMPT(tsk) \ | 94 | #define INIT_TASK_RCU_PREEMPT(tsk) \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 0ccfc30cd40..c2b1a7d244d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1377,6 +1377,10 @@ extern struct class input_class; | |||
1377 | * methods; erase() is optional. set_gain() and set_autocenter() need | 1377 | * methods; erase() is optional. set_gain() and set_autocenter() need |
1378 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER | 1378 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER |
1379 | * bits. | 1379 | * bits. |
1380 | * | ||
1381 | * Note that playback(), set_gain() and set_autocenter() are called with | ||
1382 | * dev->event_lock spinlock held and interrupts off and thus may not | ||
1383 | * sleep. | ||
1380 | */ | 1384 | */ |
1381 | struct ff_device { | 1385 | struct ff_device { |
1382 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, | 1386 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, |
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 4c218ee7587..8687a7dc063 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h | |||
@@ -157,7 +157,7 @@ typedef struct { | |||
157 | 157 | ||
158 | typedef struct { | 158 | typedef struct { |
159 | int mp_mrru; /* unused */ | 159 | int mp_mrru; /* unused */ |
160 | struct sk_buff_head frags; /* fragments sl list */ | 160 | struct sk_buff * frags; /* fragments sl list -- use skb->next */ |
161 | long frames; /* number of frames in the frame list */ | 161 | long frames; /* number of frames in the frame list */ |
162 | unsigned int seq; /* last processed packet seq #: any packets | 162 | unsigned int seq; /* last processed packet seq #: any packets |
163 | * with smaller seq # will be dropped | 163 | * with smaller seq # will be dropped |
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index 190c3785487..f78f83d7663 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h | |||
@@ -26,14 +26,15 @@ | |||
26 | 26 | ||
27 | /* Auxiliary data to use in generating the audit record. */ | 27 | /* Auxiliary data to use in generating the audit record. */ |
28 | struct common_audit_data { | 28 | struct common_audit_data { |
29 | char type; | 29 | char type; |
30 | #define LSM_AUDIT_DATA_FS 1 | 30 | #define LSM_AUDIT_DATA_FS 1 |
31 | #define LSM_AUDIT_DATA_NET 2 | 31 | #define LSM_AUDIT_DATA_NET 2 |
32 | #define LSM_AUDIT_DATA_CAP 3 | 32 | #define LSM_AUDIT_DATA_CAP 3 |
33 | #define LSM_AUDIT_DATA_IPC 4 | 33 | #define LSM_AUDIT_DATA_IPC 4 |
34 | #define LSM_AUDIT_DATA_TASK 5 | 34 | #define LSM_AUDIT_DATA_TASK 5 |
35 | #define LSM_AUDIT_DATA_KEY 6 | 35 | #define LSM_AUDIT_DATA_KEY 6 |
36 | #define LSM_AUDIT_NO_AUDIT 7 | 36 | #define LSM_AUDIT_NO_AUDIT 7 |
37 | #define LSM_AUDIT_DATA_KMOD 8 | ||
37 | struct task_struct *tsk; | 38 | struct task_struct *tsk; |
38 | union { | 39 | union { |
39 | struct { | 40 | struct { |
@@ -66,6 +67,7 @@ struct common_audit_data { | |||
66 | char *key_desc; | 67 | char *key_desc; |
67 | } key_struct; | 68 | } key_struct; |
68 | #endif | 69 | #endif |
70 | char *kmod_name; | ||
69 | } u; | 71 | } u; |
70 | /* this union contains LSM specific data */ | 72 | /* this union contains LSM specific data */ |
71 | union { | 73 | union { |
diff --git a/include/linux/mfd/wm831x/regulator.h b/include/linux/mfd/wm831x/regulator.h index f95466343fb..955d30fc6a2 100644 --- a/include/linux/mfd/wm831x/regulator.h +++ b/include/linux/mfd/wm831x/regulator.h | |||
@@ -1212,7 +1212,7 @@ | |||
1212 | #define WM831X_LDO1_OK_SHIFT 0 /* LDO1_OK */ | 1212 | #define WM831X_LDO1_OK_SHIFT 0 /* LDO1_OK */ |
1213 | #define WM831X_LDO1_OK_WIDTH 1 /* LDO1_OK */ | 1213 | #define WM831X_LDO1_OK_WIDTH 1 /* LDO1_OK */ |
1214 | 1214 | ||
1215 | #define WM831X_ISINK_MAX_ISEL 56 | 1215 | #define WM831X_ISINK_MAX_ISEL 55 |
1216 | extern int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL]; | 1216 | extern int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1]; |
1217 | 1217 | ||
1218 | #endif | 1218 | #endif |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 6547c3cdbc4..82a9124f7d7 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -37,7 +37,6 @@ typedef int (*param_set_fn)(const char *val, struct kernel_param *kp); | |||
37 | typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp); | 37 | typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp); |
38 | 38 | ||
39 | /* Flag bits for kernel_param.flags */ | 39 | /* Flag bits for kernel_param.flags */ |
40 | #define KPARAM_KMALLOCED 1 | ||
41 | #define KPARAM_ISBOOL 2 | 40 | #define KPARAM_ISBOOL 2 |
42 | 41 | ||
43 | struct kernel_param { | 42 | struct kernel_param { |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 79fec6af3f9..ce520402e84 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -425,15 +425,6 @@ struct nilfs_dat_entry { | |||
425 | }; | 425 | }; |
426 | 426 | ||
427 | /** | 427 | /** |
428 | * struct nilfs_dat_group_desc - block group descriptor | ||
429 | * @dg_nfrees: number of free virtual block numbers in block group | ||
430 | */ | ||
431 | struct nilfs_dat_group_desc { | ||
432 | __le32 dg_nfrees; | ||
433 | }; | ||
434 | |||
435 | |||
436 | /** | ||
437 | * struct nilfs_snapshot_list - snapshot list | 428 | * struct nilfs_snapshot_list - snapshot list |
438 | * @ssl_next: next checkpoint number on snapshot list | 429 | * @ssl_next: next checkpoint number on snapshot list |
439 | * @ssl_prev: previous checkpoint number on snapshot list | 430 | * @ssl_prev: previous checkpoint number on snapshot list |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 86257a41273..daecca3c830 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -482,6 +482,9 @@ | |||
482 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 | 482 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 |
483 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 | 483 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 |
484 | 484 | ||
485 | #define PCI_SUBVENDOR_ID_IBM 0x1014 | ||
486 | #define PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT 0x03d4 | ||
487 | |||
485 | #define PCI_VENDOR_ID_UNISYS 0x1018 | 488 | #define PCI_VENDOR_ID_UNISYS 0x1018 |
486 | #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C | 489 | #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C |
487 | 490 | ||
@@ -540,7 +543,7 @@ | |||
540 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 | 543 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
541 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | 544 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 |
542 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 | 545 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 |
543 | #define PCI_DEVICE_ID_AMD_SB900_SMBUS 0x780b | 546 | #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS 0x780b |
544 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F | 547 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F |
545 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 548 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
546 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 549 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
@@ -1630,6 +1633,8 @@ | |||
1630 | #define PCI_DEVICE_ID_O2_6730 0x673a | 1633 | #define PCI_DEVICE_ID_O2_6730 0x673a |
1631 | #define PCI_DEVICE_ID_O2_6832 0x6832 | 1634 | #define PCI_DEVICE_ID_O2_6832 0x6832 |
1632 | #define PCI_DEVICE_ID_O2_6836 0x6836 | 1635 | #define PCI_DEVICE_ID_O2_6836 0x6836 |
1636 | #define PCI_DEVICE_ID_O2_6812 0x6872 | ||
1637 | #define PCI_DEVICE_ID_O2_6933 0x6933 | ||
1633 | 1638 | ||
1634 | #define PCI_VENDOR_ID_3DFX 0x121a | 1639 | #define PCI_VENDOR_ID_3DFX 0x121a |
1635 | #define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 | 1640 | #define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 |
@@ -1953,6 +1958,8 @@ | |||
1953 | #define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ | 1958 | #define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ |
1954 | #define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ | 1959 | #define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ |
1955 | #define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ | 1960 | #define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ |
1961 | #define PCI_DEVICE_ID_LAVA_QUATTRO_A 0x0120 /* 2x 16550A, half of 4 port */ | ||
1962 | #define PCI_DEVICE_ID_LAVA_QUATTRO_B 0x0121 /* 2x 16550A, half of 4 port */ | ||
1956 | #define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */ | 1963 | #define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */ |
1957 | #define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */ | 1964 | #define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */ |
1958 | #define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ | 1965 | #define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ |
@@ -2160,6 +2167,10 @@ | |||
2160 | #define PCI_DEVICE_ID_ADDIDATA_APCI7420_3 0x700D | 2167 | #define PCI_DEVICE_ID_ADDIDATA_APCI7420_3 0x700D |
2161 | #define PCI_DEVICE_ID_ADDIDATA_APCI7300_3 0x700E | 2168 | #define PCI_DEVICE_ID_ADDIDATA_APCI7300_3 0x700E |
2162 | #define PCI_DEVICE_ID_ADDIDATA_APCI7800_3 0x700F | 2169 | #define PCI_DEVICE_ID_ADDIDATA_APCI7800_3 0x700F |
2170 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7300 0x7010 | ||
2171 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7420 0x7011 | ||
2172 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7500 0x7012 | ||
2173 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7800 0x7013 | ||
2163 | 2174 | ||
2164 | #define PCI_VENDOR_ID_PDC 0x15e9 | 2175 | #define PCI_VENDOR_ID_PDC 0x15e9 |
2165 | 2176 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2e6d95f9741..9e7012689a8 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -471,8 +471,8 @@ struct hw_perf_event { | |||
471 | unsigned long event_base; | 471 | unsigned long event_base; |
472 | int idx; | 472 | int idx; |
473 | }; | 473 | }; |
474 | union { /* software */ | 474 | struct { /* software */ |
475 | atomic64_t count; | 475 | s64 remaining; |
476 | struct hrtimer hrtimer; | 476 | struct hrtimer hrtimer; |
477 | }; | 477 | }; |
478 | }; | 478 | }; |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index 065a3652a3e..67608161df6 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -147,6 +147,20 @@ static inline void forget_cached_acl(struct inode *inode, int type) | |||
147 | if (old != ACL_NOT_CACHED) | 147 | if (old != ACL_NOT_CACHED) |
148 | posix_acl_release(old); | 148 | posix_acl_release(old); |
149 | } | 149 | } |
150 | |||
151 | static inline void forget_all_cached_acls(struct inode *inode) | ||
152 | { | ||
153 | struct posix_acl *old_access, *old_default; | ||
154 | spin_lock(&inode->i_lock); | ||
155 | old_access = inode->i_acl; | ||
156 | old_default = inode->i_default_acl; | ||
157 | inode->i_acl = inode->i_default_acl = ACL_NOT_CACHED; | ||
158 | spin_unlock(&inode->i_lock); | ||
159 | if (old_access != ACL_NOT_CACHED) | ||
160 | posix_acl_release(old_access); | ||
161 | if (old_default != ACL_NOT_CACHED) | ||
162 | posix_acl_release(old_default); | ||
163 | } | ||
150 | #endif | 164 | #endif |
151 | 165 | ||
152 | static inline void cache_no_acl(struct inode *inode) | 166 | static inline void cache_no_acl(struct inode *inode) |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 931150566ad..a3baeb2c216 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -88,6 +88,18 @@ | |||
88 | #define PR_TASK_PERF_EVENTS_DISABLE 31 | 88 | #define PR_TASK_PERF_EVENTS_DISABLE 31 |
89 | #define PR_TASK_PERF_EVENTS_ENABLE 32 | 89 | #define PR_TASK_PERF_EVENTS_ENABLE 32 |
90 | 90 | ||
91 | /* | ||
92 | * Set early/late kill mode for hwpoison memory corruption. | ||
93 | * This influences when the process gets killed on a memory corruption. | ||
94 | */ | ||
91 | #define PR_MCE_KILL 33 | 95 | #define PR_MCE_KILL 33 |
96 | # define PR_MCE_KILL_CLEAR 0 | ||
97 | # define PR_MCE_KILL_SET 1 | ||
98 | |||
99 | # define PR_MCE_KILL_LATE 0 | ||
100 | # define PR_MCE_KILL_EARLY 1 | ||
101 | # define PR_MCE_KILL_DEFAULT 2 | ||
102 | |||
103 | #define PR_MCE_KILL_GET 34 | ||
92 | 104 | ||
93 | #endif /* _LINUX_PRCTL_H */ | 105 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 78c48895b12..ce9a9b2e5cd 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -376,6 +376,17 @@ static inline unsigned int dquot_generic_flag(unsigned int flags, int type) | |||
376 | return flags >> _DQUOT_STATE_FLAGS; | 376 | return flags >> _DQUOT_STATE_FLAGS; |
377 | } | 377 | } |
378 | 378 | ||
379 | #ifdef CONFIG_QUOTA_NETLINK_INTERFACE | ||
380 | extern void quota_send_warning(short type, unsigned int id, dev_t dev, | ||
381 | const char warntype); | ||
382 | #else | ||
383 | static inline void quota_send_warning(short type, unsigned int id, dev_t dev, | ||
384 | const char warntype) | ||
385 | { | ||
386 | return; | ||
387 | } | ||
388 | #endif /* CONFIG_QUOTA_NETLINK_INTERFACE */ | ||
389 | |||
379 | struct quota_info { | 390 | struct quota_info { |
380 | unsigned int flags; /* Flags for diskquotas on this device */ | 391 | unsigned int flags; /* Flags for diskquotas on this device */ |
381 | struct mutex dqio_mutex; /* lock device while I/O in progress */ | 392 | struct mutex dqio_mutex; /* lock device while I/O in progress */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 46e9ab3ee6e..9642c6bcb39 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -76,11 +76,7 @@ static inline void __rcu_read_unlock_bh(void) | |||
76 | 76 | ||
77 | extern void call_rcu_sched(struct rcu_head *head, | 77 | extern void call_rcu_sched(struct rcu_head *head, |
78 | void (*func)(struct rcu_head *rcu)); | 78 | void (*func)(struct rcu_head *rcu)); |
79 | 79 | extern void synchronize_rcu_expedited(void); | |
80 | static inline void synchronize_rcu_expedited(void) | ||
81 | { | ||
82 | synchronize_sched_expedited(); | ||
83 | } | ||
84 | 80 | ||
85 | static inline void synchronize_rcu_bh_expedited(void) | 81 | static inline void synchronize_rcu_bh_expedited(void) |
86 | { | 82 | { |
diff --git a/include/linux/securebits.h b/include/linux/securebits.h index d2c5ed845bc..33406174cbe 100644 --- a/include/linux/securebits.h +++ b/include/linux/securebits.h | |||
@@ -1,6 +1,15 @@ | |||
1 | #ifndef _LINUX_SECUREBITS_H | 1 | #ifndef _LINUX_SECUREBITS_H |
2 | #define _LINUX_SECUREBITS_H 1 | 2 | #define _LINUX_SECUREBITS_H 1 |
3 | 3 | ||
4 | /* Each securesetting is implemented using two bits. One bit specifies | ||
5 | whether the setting is on or off. The other bit specify whether the | ||
6 | setting is locked or not. A setting which is locked cannot be | ||
7 | changed from user-level. */ | ||
8 | #define issecure_mask(X) (1 << (X)) | ||
9 | #ifdef __KERNEL__ | ||
10 | #define issecure(X) (issecure_mask(X) & current_cred_xxx(securebits)) | ||
11 | #endif | ||
12 | |||
4 | #define SECUREBITS_DEFAULT 0x00000000 | 13 | #define SECUREBITS_DEFAULT 0x00000000 |
5 | 14 | ||
6 | /* When set UID 0 has no special privileges. When unset, we support | 15 | /* When set UID 0 has no special privileges. When unset, we support |
@@ -12,6 +21,9 @@ | |||
12 | #define SECURE_NOROOT 0 | 21 | #define SECURE_NOROOT 0 |
13 | #define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ | 22 | #define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ |
14 | 23 | ||
24 | #define SECBIT_NOROOT (issecure_mask(SECURE_NOROOT)) | ||
25 | #define SECBIT_NOROOT_LOCKED (issecure_mask(SECURE_NOROOT_LOCKED)) | ||
26 | |||
15 | /* When set, setuid to/from uid 0 does not trigger capability-"fixup". | 27 | /* When set, setuid to/from uid 0 does not trigger capability-"fixup". |
16 | When unset, to provide compatiblility with old programs relying on | 28 | When unset, to provide compatiblility with old programs relying on |
17 | set*uid to gain/lose privilege, transitions to/from uid 0 cause | 29 | set*uid to gain/lose privilege, transitions to/from uid 0 cause |
@@ -19,6 +31,10 @@ | |||
19 | #define SECURE_NO_SETUID_FIXUP 2 | 31 | #define SECURE_NO_SETUID_FIXUP 2 |
20 | #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ | 32 | #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ |
21 | 33 | ||
34 | #define SECBIT_NO_SETUID_FIXUP (issecure_mask(SECURE_NO_SETUID_FIXUP)) | ||
35 | #define SECBIT_NO_SETUID_FIXUP_LOCKED \ | ||
36 | (issecure_mask(SECURE_NO_SETUID_FIXUP_LOCKED)) | ||
37 | |||
22 | /* When set, a process can retain its capabilities even after | 38 | /* When set, a process can retain its capabilities even after |
23 | transitioning to a non-root user (the set-uid fixup suppressed by | 39 | transitioning to a non-root user (the set-uid fixup suppressed by |
24 | bit 2). Bit-4 is cleared when a process calls exec(); setting both | 40 | bit 2). Bit-4 is cleared when a process calls exec(); setting both |
@@ -27,12 +43,8 @@ | |||
27 | #define SECURE_KEEP_CAPS 4 | 43 | #define SECURE_KEEP_CAPS 4 |
28 | #define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ | 44 | #define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ |
29 | 45 | ||
30 | /* Each securesetting is implemented using two bits. One bit specifies | 46 | #define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS)) |
31 | whether the setting is on or off. The other bit specify whether the | 47 | #define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED)) |
32 | setting is locked or not. A setting which is locked cannot be | ||
33 | changed from user-level. */ | ||
34 | #define issecure_mask(X) (1 << (X)) | ||
35 | #define issecure(X) (issecure_mask(X) & current_cred_xxx(securebits)) | ||
36 | 48 | ||
37 | #define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \ | 49 | #define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \ |
38 | issecure_mask(SECURE_NO_SETUID_FIXUP) | \ | 50 | issecure_mask(SECURE_NO_SETUID_FIXUP) | \ |
diff --git a/include/linux/security.h b/include/linux/security.h index 239e40d0450..466cbadbd1e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -447,6 +447,22 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
447 | * @new_dir contains the path structure for parent of the new link. | 447 | * @new_dir contains the path structure for parent of the new link. |
448 | * @new_dentry contains the dentry structure of the new link. | 448 | * @new_dentry contains the dentry structure of the new link. |
449 | * Return 0 if permission is granted. | 449 | * Return 0 if permission is granted. |
450 | * @path_chmod: | ||
451 | * Check for permission to change DAC's permission of a file or directory. | ||
452 | * @dentry contains the dentry structure. | ||
453 | * @mnt contains the vfsmnt structure. | ||
454 | * @mode contains DAC's mode. | ||
455 | * Return 0 if permission is granted. | ||
456 | * @path_chown: | ||
457 | * Check for permission to change owner/group of a file or directory. | ||
458 | * @path contains the path structure. | ||
459 | * @uid contains new owner's ID. | ||
460 | * @gid contains new group's ID. | ||
461 | * Return 0 if permission is granted. | ||
462 | * @path_chroot: | ||
463 | * Check for permission to change root directory. | ||
464 | * @path contains the path structure. | ||
465 | * Return 0 if permission is granted. | ||
450 | * @inode_readlink: | 466 | * @inode_readlink: |
451 | * Check the permission to read the symbolic link. | 467 | * Check the permission to read the symbolic link. |
452 | * @dentry contains the dentry structure for the file link. | 468 | * @dentry contains the dentry structure for the file link. |
@@ -690,6 +706,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
690 | * @kernel_module_request: | 706 | * @kernel_module_request: |
691 | * Ability to trigger the kernel to automatically upcall to userspace for | 707 | * Ability to trigger the kernel to automatically upcall to userspace for |
692 | * userspace to load a kernel module with the given name. | 708 | * userspace to load a kernel module with the given name. |
709 | * @kmod_name name of the module requested by the kernel | ||
693 | * Return 0 if successful. | 710 | * Return 0 if successful. |
694 | * @task_setuid: | 711 | * @task_setuid: |
695 | * Check permission before setting one or more of the user identity | 712 | * Check permission before setting one or more of the user identity |
@@ -1488,6 +1505,10 @@ struct security_operations { | |||
1488 | struct dentry *new_dentry); | 1505 | struct dentry *new_dentry); |
1489 | int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, | 1506 | int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, |
1490 | struct path *new_dir, struct dentry *new_dentry); | 1507 | struct path *new_dir, struct dentry *new_dentry); |
1508 | int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt, | ||
1509 | mode_t mode); | ||
1510 | int (*path_chown) (struct path *path, uid_t uid, gid_t gid); | ||
1511 | int (*path_chroot) (struct path *path); | ||
1491 | #endif | 1512 | #endif |
1492 | 1513 | ||
1493 | int (*inode_alloc_security) (struct inode *inode); | 1514 | int (*inode_alloc_security) (struct inode *inode); |
@@ -1557,7 +1578,7 @@ struct security_operations { | |||
1557 | void (*cred_transfer)(struct cred *new, const struct cred *old); | 1578 | void (*cred_transfer)(struct cred *new, const struct cred *old); |
1558 | int (*kernel_act_as)(struct cred *new, u32 secid); | 1579 | int (*kernel_act_as)(struct cred *new, u32 secid); |
1559 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); | 1580 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); |
1560 | int (*kernel_module_request)(void); | 1581 | int (*kernel_module_request)(char *kmod_name); |
1561 | int (*task_setuid) (uid_t id0, uid_t id1, uid_t id2, int flags); | 1582 | int (*task_setuid) (uid_t id0, uid_t id1, uid_t id2, int flags); |
1562 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, | 1583 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, |
1563 | int flags); | 1584 | int flags); |
@@ -1822,7 +1843,7 @@ void security_commit_creds(struct cred *new, const struct cred *old); | |||
1822 | void security_transfer_creds(struct cred *new, const struct cred *old); | 1843 | void security_transfer_creds(struct cred *new, const struct cred *old); |
1823 | int security_kernel_act_as(struct cred *new, u32 secid); | 1844 | int security_kernel_act_as(struct cred *new, u32 secid); |
1824 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); | 1845 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); |
1825 | int security_kernel_module_request(void); | 1846 | int security_kernel_module_request(char *kmod_name); |
1826 | int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags); | 1847 | int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags); |
1827 | int security_task_fix_setuid(struct cred *new, const struct cred *old, | 1848 | int security_task_fix_setuid(struct cred *new, const struct cred *old, |
1828 | int flags); | 1849 | int flags); |
@@ -2387,7 +2408,7 @@ static inline int security_kernel_create_files_as(struct cred *cred, | |||
2387 | return 0; | 2408 | return 0; |
2388 | } | 2409 | } |
2389 | 2410 | ||
2390 | static inline int security_kernel_module_request(void) | 2411 | static inline int security_kernel_module_request(char *kmod_name) |
2391 | { | 2412 | { |
2392 | return 0; | 2413 | return 0; |
2393 | } | 2414 | } |
@@ -2952,6 +2973,10 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir, | |||
2952 | struct dentry *new_dentry); | 2973 | struct dentry *new_dentry); |
2953 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | 2974 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, |
2954 | struct path *new_dir, struct dentry *new_dentry); | 2975 | struct path *new_dir, struct dentry *new_dentry); |
2976 | int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, | ||
2977 | mode_t mode); | ||
2978 | int security_path_chown(struct path *path, uid_t uid, gid_t gid); | ||
2979 | int security_path_chroot(struct path *path); | ||
2955 | #else /* CONFIG_SECURITY_PATH */ | 2980 | #else /* CONFIG_SECURITY_PATH */ |
2956 | static inline int security_path_unlink(struct path *dir, struct dentry *dentry) | 2981 | static inline int security_path_unlink(struct path *dir, struct dentry *dentry) |
2957 | { | 2982 | { |
@@ -3001,6 +3026,23 @@ static inline int security_path_rename(struct path *old_dir, | |||
3001 | { | 3026 | { |
3002 | return 0; | 3027 | return 0; |
3003 | } | 3028 | } |
3029 | |||
3030 | static inline int security_path_chmod(struct dentry *dentry, | ||
3031 | struct vfsmount *mnt, | ||
3032 | mode_t mode) | ||
3033 | { | ||
3034 | return 0; | ||
3035 | } | ||
3036 | |||
3037 | static inline int security_path_chown(struct path *path, uid_t uid, gid_t gid) | ||
3038 | { | ||
3039 | return 0; | ||
3040 | } | ||
3041 | |||
3042 | static inline int security_path_chroot(struct path *path) | ||
3043 | { | ||
3044 | return 0; | ||
3045 | } | ||
3004 | #endif /* CONFIG_SECURITY_PATH */ | 3046 | #endif /* CONFIG_SECURITY_PATH */ |
3005 | 3047 | ||
3006 | #ifdef CONFIG_KEYS | 3048 | #ifdef CONFIG_KEYS |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index df7b23ac66e..bcdd6606f46 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -354,8 +354,8 @@ struct sk_buff { | |||
354 | ipvs_property:1, | 354 | ipvs_property:1, |
355 | peeked:1, | 355 | peeked:1, |
356 | nf_trace:1; | 356 | nf_trace:1; |
357 | __be16 protocol:16; | ||
357 | kmemcheck_bitfield_end(flags1); | 358 | kmemcheck_bitfield_end(flags1); |
358 | __be16 protocol; | ||
359 | 359 | ||
360 | void (*destructor)(struct sk_buff *skb); | 360 | void (*destructor)(struct sk_buff *skb); |
361 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 361 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
@@ -367,7 +367,6 @@ struct sk_buff { | |||
367 | #endif | 367 | #endif |
368 | 368 | ||
369 | int iif; | 369 | int iif; |
370 | __u16 queue_mapping; | ||
371 | #ifdef CONFIG_NET_SCHED | 370 | #ifdef CONFIG_NET_SCHED |
372 | __u16 tc_index; /* traffic control index */ | 371 | __u16 tc_index; /* traffic control index */ |
373 | #ifdef CONFIG_NET_CLS_ACT | 372 | #ifdef CONFIG_NET_CLS_ACT |
@@ -376,6 +375,7 @@ struct sk_buff { | |||
376 | #endif | 375 | #endif |
377 | 376 | ||
378 | kmemcheck_bitfield_begin(flags2); | 377 | kmemcheck_bitfield_begin(flags2); |
378 | __u16 queue_mapping:16; | ||
379 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 379 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
380 | __u8 ndisc_nodetype:2; | 380 | __u8 ndisc_nodetype:2; |
381 | #endif | 381 | #endif |
@@ -1757,6 +1757,8 @@ extern int skb_copy_datagram_const_iovec(const struct sk_buff *from, | |||
1757 | int to_offset, | 1757 | int to_offset, |
1758 | int size); | 1758 | int size); |
1759 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 1759 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
1760 | extern void skb_free_datagram_locked(struct sock *sk, | ||
1761 | struct sk_buff *skb); | ||
1760 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, | 1762 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, |
1761 | unsigned int flags); | 1763 | unsigned int flags); |
1762 | extern __wsum skb_checksum(const struct sk_buff *skb, int offset, | 1764 | extern __wsum skb_checksum(const struct sk_buff *skb, int offset, |
diff --git a/include/linux/slow-work.h b/include/linux/slow-work.h index b65c8881f07..13337bf6c3f 100644 --- a/include/linux/slow-work.h +++ b/include/linux/slow-work.h | |||
@@ -17,13 +17,20 @@ | |||
17 | #ifdef CONFIG_SLOW_WORK | 17 | #ifdef CONFIG_SLOW_WORK |
18 | 18 | ||
19 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
20 | #include <linux/timer.h> | ||
20 | 21 | ||
21 | struct slow_work; | 22 | struct slow_work; |
23 | #ifdef CONFIG_SLOW_WORK_DEBUG | ||
24 | struct seq_file; | ||
25 | #endif | ||
22 | 26 | ||
23 | /* | 27 | /* |
24 | * The operations used to support slow work items | 28 | * The operations used to support slow work items |
25 | */ | 29 | */ |
26 | struct slow_work_ops { | 30 | struct slow_work_ops { |
31 | /* owner */ | ||
32 | struct module *owner; | ||
33 | |||
27 | /* get a ref on a work item | 34 | /* get a ref on a work item |
28 | * - return 0 if successful, -ve if not | 35 | * - return 0 if successful, -ve if not |
29 | */ | 36 | */ |
@@ -34,6 +41,11 @@ struct slow_work_ops { | |||
34 | 41 | ||
35 | /* execute a work item */ | 42 | /* execute a work item */ |
36 | void (*execute)(struct slow_work *work); | 43 | void (*execute)(struct slow_work *work); |
44 | |||
45 | #ifdef CONFIG_SLOW_WORK_DEBUG | ||
46 | /* describe a work item for debugfs */ | ||
47 | void (*desc)(struct slow_work *work, struct seq_file *m); | ||
48 | #endif | ||
37 | }; | 49 | }; |
38 | 50 | ||
39 | /* | 51 | /* |
@@ -42,13 +54,24 @@ struct slow_work_ops { | |||
42 | * queued | 54 | * queued |
43 | */ | 55 | */ |
44 | struct slow_work { | 56 | struct slow_work { |
57 | struct module *owner; /* the owning module */ | ||
45 | unsigned long flags; | 58 | unsigned long flags; |
46 | #define SLOW_WORK_PENDING 0 /* item pending (further) execution */ | 59 | #define SLOW_WORK_PENDING 0 /* item pending (further) execution */ |
47 | #define SLOW_WORK_EXECUTING 1 /* item currently executing */ | 60 | #define SLOW_WORK_EXECUTING 1 /* item currently executing */ |
48 | #define SLOW_WORK_ENQ_DEFERRED 2 /* item enqueue deferred */ | 61 | #define SLOW_WORK_ENQ_DEFERRED 2 /* item enqueue deferred */ |
49 | #define SLOW_WORK_VERY_SLOW 3 /* item is very slow */ | 62 | #define SLOW_WORK_VERY_SLOW 3 /* item is very slow */ |
63 | #define SLOW_WORK_CANCELLING 4 /* item is being cancelled, don't enqueue */ | ||
64 | #define SLOW_WORK_DELAYED 5 /* item is struct delayed_slow_work with active timer */ | ||
50 | const struct slow_work_ops *ops; /* operations table for this item */ | 65 | const struct slow_work_ops *ops; /* operations table for this item */ |
51 | struct list_head link; /* link in queue */ | 66 | struct list_head link; /* link in queue */ |
67 | #ifdef CONFIG_SLOW_WORK_DEBUG | ||
68 | struct timespec mark; /* jiffies at which queued or exec begun */ | ||
69 | #endif | ||
70 | }; | ||
71 | |||
72 | struct delayed_slow_work { | ||
73 | struct slow_work work; | ||
74 | struct timer_list timer; | ||
52 | }; | 75 | }; |
53 | 76 | ||
54 | /** | 77 | /** |
@@ -67,6 +90,20 @@ static inline void slow_work_init(struct slow_work *work, | |||
67 | } | 90 | } |
68 | 91 | ||
69 | /** | 92 | /** |
93 | * slow_work_init - Initialise a delayed slow work item | ||
94 | * @work: The work item to initialise | ||
95 | * @ops: The operations to use to handle the slow work item | ||
96 | * | ||
97 | * Initialise a delayed slow work item. | ||
98 | */ | ||
99 | static inline void delayed_slow_work_init(struct delayed_slow_work *dwork, | ||
100 | const struct slow_work_ops *ops) | ||
101 | { | ||
102 | init_timer(&dwork->timer); | ||
103 | slow_work_init(&dwork->work, ops); | ||
104 | } | ||
105 | |||
106 | /** | ||
70 | * vslow_work_init - Initialise a very slow work item | 107 | * vslow_work_init - Initialise a very slow work item |
71 | * @work: The work item to initialise | 108 | * @work: The work item to initialise |
72 | * @ops: The operations to use to handle the slow work item | 109 | * @ops: The operations to use to handle the slow work item |
@@ -83,9 +120,40 @@ static inline void vslow_work_init(struct slow_work *work, | |||
83 | INIT_LIST_HEAD(&work->link); | 120 | INIT_LIST_HEAD(&work->link); |
84 | } | 121 | } |
85 | 122 | ||
123 | /** | ||
124 | * slow_work_is_queued - Determine if a slow work item is on the work queue | ||
125 | * work: The work item to test | ||
126 | * | ||
127 | * Determine if the specified slow-work item is on the work queue. This | ||
128 | * returns true if it is actually on the queue. | ||
129 | * | ||
130 | * If the item is executing and has been marked for requeue when execution | ||
131 | * finishes, then false will be returned. | ||
132 | * | ||
133 | * Anyone wishing to wait for completion of execution can wait on the | ||
134 | * SLOW_WORK_EXECUTING bit. | ||
135 | */ | ||
136 | static inline bool slow_work_is_queued(struct slow_work *work) | ||
137 | { | ||
138 | unsigned long flags = work->flags; | ||
139 | return flags & SLOW_WORK_PENDING && !(flags & SLOW_WORK_EXECUTING); | ||
140 | } | ||
141 | |||
86 | extern int slow_work_enqueue(struct slow_work *work); | 142 | extern int slow_work_enqueue(struct slow_work *work); |
87 | extern int slow_work_register_user(void); | 143 | extern void slow_work_cancel(struct slow_work *work); |
88 | extern void slow_work_unregister_user(void); | 144 | extern int slow_work_register_user(struct module *owner); |
145 | extern void slow_work_unregister_user(struct module *owner); | ||
146 | |||
147 | extern int delayed_slow_work_enqueue(struct delayed_slow_work *dwork, | ||
148 | unsigned long delay); | ||
149 | |||
150 | static inline void delayed_slow_work_cancel(struct delayed_slow_work *dwork) | ||
151 | { | ||
152 | slow_work_cancel(&dwork->work); | ||
153 | } | ||
154 | |||
155 | extern bool slow_work_sleep_till_thread_needed(struct slow_work *work, | ||
156 | signed long *_timeout); | ||
89 | 157 | ||
90 | #ifdef CONFIG_SYSCTL | 158 | #ifdef CONFIG_SYSCTL |
91 | extern ctl_table slow_work_sysctls[]; | 159 | extern ctl_table slow_work_sysctls[]; |
diff --git a/include/linux/string.h b/include/linux/string.h index 489019ef169..b8508868d5a 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -62,7 +62,7 @@ extern char * strnchr(const char *, size_t, int); | |||
62 | #ifndef __HAVE_ARCH_STRRCHR | 62 | #ifndef __HAVE_ARCH_STRRCHR |
63 | extern char * strrchr(const char *,int); | 63 | extern char * strrchr(const char *,int); |
64 | #endif | 64 | #endif |
65 | extern char * strstrip(char *); | 65 | extern char * __must_check strstrip(char *); |
66 | #ifndef __HAVE_ARCH_STRSTR | 66 | #ifndef __HAVE_ARCH_STRSTR |
67 | extern char * strstr(const char *,const char *); | 67 | extern char * strstr(const char *,const char *); |
68 | #endif | 68 | #endif |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cd15df6c63c..5e781d824e6 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -301,6 +301,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
302 | #endif /* !CONFIG_PM_SLEEP */ | 302 | #endif /* !CONFIG_PM_SLEEP */ |
303 | 303 | ||
304 | extern struct mutex pm_mutex; | ||
305 | |||
304 | #ifndef CONFIG_HIBERNATION | 306 | #ifndef CONFIG_HIBERNATION |
305 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 307 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
306 | { | 308 | { |
@@ -308,8 +310,23 @@ static inline void register_nosave_region(unsigned long b, unsigned long e) | |||
308 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | 310 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) |
309 | { | 311 | { |
310 | } | 312 | } |
311 | #endif | ||
312 | 313 | ||
313 | extern struct mutex pm_mutex; | 314 | static inline void lock_system_sleep(void) {} |
315 | static inline void unlock_system_sleep(void) {} | ||
316 | |||
317 | #else | ||
318 | |||
319 | /* Let some subsystems like memory hotadd exclude hibernation */ | ||
320 | |||
321 | static inline void lock_system_sleep(void) | ||
322 | { | ||
323 | mutex_lock(&pm_mutex); | ||
324 | } | ||
325 | |||
326 | static inline void unlock_system_sleep(void) | ||
327 | { | ||
328 | mutex_unlock(&pm_mutex); | ||
329 | } | ||
330 | #endif | ||
314 | 331 | ||
315 | #endif /* _LINUX_SUSPEND_H */ | 332 | #endif /* _LINUX_SUSPEND_H */ |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 73b1f1cec42..febedcf67c7 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -7,6 +7,8 @@ struct device; | |||
7 | struct dma_attrs; | 7 | struct dma_attrs; |
8 | struct scatterlist; | 8 | struct scatterlist; |
9 | 9 | ||
10 | extern int swiotlb_force; | ||
11 | |||
10 | /* | 12 | /* |
11 | * Maximum allowable number of contiguous slabs to map, | 13 | * Maximum allowable number of contiguous slabs to map, |
12 | * must be a power of 2. What is the appropriate value ? | 14 | * must be a power of 2. What is the appropriate value ? |
@@ -20,8 +22,7 @@ struct scatterlist; | |||
20 | */ | 22 | */ |
21 | #define IO_TLB_SHIFT 11 | 23 | #define IO_TLB_SHIFT 11 |
22 | 24 | ||
23 | extern void | 25 | extern void swiotlb_init(int verbose); |
24 | swiotlb_init(void); | ||
25 | 26 | ||
26 | extern void | 27 | extern void |
27 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 28 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
@@ -88,4 +89,11 @@ swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); | |||
88 | extern int | 89 | extern int |
89 | swiotlb_dma_supported(struct device *hwdev, u64 mask); | 90 | swiotlb_dma_supported(struct device *hwdev, u64 mask); |
90 | 91 | ||
92 | #ifdef CONFIG_SWIOTLB | ||
93 | extern void __init swiotlb_free(void); | ||
94 | #else | ||
95 | static inline void swiotlb_free(void) { } | ||
96 | #endif | ||
97 | |||
98 | extern void swiotlb_print_info(void); | ||
91 | #endif /* __LINUX_SWIOTLB_H */ | 99 | #endif /* __LINUX_SWIOTLB_H */ |
diff --git a/include/linux/topology.h b/include/linux/topology.h index fc0bf3edeb6..57e63579bfd 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -129,7 +129,7 @@ int arch_update_cpu_topology(void); | |||
129 | | 1*SD_BALANCE_FORK \ | 129 | | 1*SD_BALANCE_FORK \ |
130 | | 0*SD_BALANCE_WAKE \ | 130 | | 0*SD_BALANCE_WAKE \ |
131 | | 1*SD_WAKE_AFFINE \ | 131 | | 1*SD_WAKE_AFFINE \ |
132 | | 1*SD_PREFER_LOCAL \ | 132 | | 0*SD_PREFER_LOCAL \ |
133 | | 0*SD_SHARE_CPUPOWER \ | 133 | | 0*SD_SHARE_CPUPOWER \ |
134 | | 1*SD_SHARE_PKG_RESOURCES \ | 134 | | 1*SD_SHARE_PKG_RESOURCES \ |
135 | | 0*SD_SERIALIZE \ | 135 | | 0*SD_SERIALIZE \ |
@@ -162,7 +162,7 @@ int arch_update_cpu_topology(void); | |||
162 | | 1*SD_BALANCE_FORK \ | 162 | | 1*SD_BALANCE_FORK \ |
163 | | 0*SD_BALANCE_WAKE \ | 163 | | 0*SD_BALANCE_WAKE \ |
164 | | 1*SD_WAKE_AFFINE \ | 164 | | 1*SD_WAKE_AFFINE \ |
165 | | 1*SD_PREFER_LOCAL \ | 165 | | 0*SD_PREFER_LOCAL \ |
166 | | 0*SD_SHARE_CPUPOWER \ | 166 | | 0*SD_SHARE_CPUPOWER \ |
167 | | 0*SD_SHARE_PKG_RESOURCES \ | 167 | | 0*SD_SHARE_PKG_RESOURCES \ |
168 | | 0*SD_SERIALIZE \ | 168 | | 0*SD_SERIALIZE \ |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index 3338b3f5c21..ac5d1c1285d 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
@@ -27,9 +27,16 @@ | |||
27 | */ | 27 | */ |
28 | #define TPM_ANY_NUM 0xFFFF | 28 | #define TPM_ANY_NUM 0xFFFF |
29 | 29 | ||
30 | #if defined(CONFIG_TCG_TPM) | 30 | #if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE) |
31 | 31 | ||
32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); |
33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); |
34 | #else | ||
35 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | ||
36 | return -ENODEV; | ||
37 | } | ||
38 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { | ||
39 | return -ENODEV; | ||
40 | } | ||
34 | #endif | 41 | #endif |
35 | #endif | 42 | #endif |
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index c134dd1fe6b..09077f6ed12 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Trace sequences are used to allow a function to call several other functions | 9 | * Trace sequences are used to allow a function to call several other functions |
10 | * to create a string of data to use (up to a max of PAGE_SIZE. | 10 | * to create a string of data to use (up to a max of PAGE_SIZE). |
11 | */ | 11 | */ |
12 | 12 | ||
13 | struct trace_seq { | 13 | struct trace_seq { |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 7afca0d7213..7ffa11f0623 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -70,8 +70,8 @@ struct vt_event { | |||
70 | #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ | 70 | #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ |
71 | #define VT_EVENT_RESIZE 0x0008 /* Resize display */ | 71 | #define VT_EVENT_RESIZE 0x0008 /* Resize display */ |
72 | #define VT_MAX_EVENT 0x000F | 72 | #define VT_MAX_EVENT 0x000F |
73 | unsigned int old; /* Old console */ | 73 | unsigned int oldev; /* Old console */ |
74 | unsigned int new; /* New console (if changing) */ | 74 | unsigned int newev; /* New console (if changing) */ |
75 | unsigned int pad[4]; /* Padding for expansion */ | 75 | unsigned int pad[4]; /* Padding for expansion */ |
76 | }; | 76 | }; |
77 | 77 | ||