diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/audit.h | 4 | ||||
| -rw-r--r-- | include/linux/cpu_rmap.h | 13 | ||||
| -rw-r--r-- | include/linux/interrupt.h | 5 | ||||
| -rw-r--r-- | include/linux/lockdep.h | 3 | ||||
| -rw-r--r-- | include/linux/rbtree_augmented.h | 14 | ||||
| -rw-r--r-- | include/linux/rwsem.h | 9 |
6 files changed, 30 insertions, 18 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index bce729afbcf9..5a6d718adf34 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #define _LINUX_AUDIT_H_ | 24 | #define _LINUX_AUDIT_H_ |
| 25 | 25 | ||
| 26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 27 | #include <linux/ptrace.h> | ||
| 27 | #include <uapi/linux/audit.h> | 28 | #include <uapi/linux/audit.h> |
| 28 | 29 | ||
| 29 | struct audit_sig_info { | 30 | struct audit_sig_info { |
| @@ -157,7 +158,8 @@ void audit_core_dumps(long signr); | |||
| 157 | 158 | ||
| 158 | static inline void audit_seccomp(unsigned long syscall, long signr, int code) | 159 | static inline void audit_seccomp(unsigned long syscall, long signr, int code) |
| 159 | { | 160 | { |
| 160 | if (unlikely(!audit_dummy_context())) | 161 | /* Force a record to be reported if a signal was delivered. */ |
| 162 | if (signr || unlikely(!audit_dummy_context())) | ||
| 161 | __audit_seccomp(syscall, signr, code); | 163 | __audit_seccomp(syscall, signr, code); |
| 162 | } | 164 | } |
| 163 | 165 | ||
diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h index ac3bbb5b9502..1739510d8994 100644 --- a/include/linux/cpu_rmap.h +++ b/include/linux/cpu_rmap.h | |||
| @@ -13,9 +13,11 @@ | |||
| 13 | #include <linux/cpumask.h> | 13 | #include <linux/cpumask.h> |
| 14 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <linux/kref.h> | ||
| 16 | 17 | ||
| 17 | /** | 18 | /** |
| 18 | * struct cpu_rmap - CPU affinity reverse-map | 19 | * struct cpu_rmap - CPU affinity reverse-map |
| 20 | * @refcount: kref for object | ||
| 19 | * @size: Number of objects to be reverse-mapped | 21 | * @size: Number of objects to be reverse-mapped |
| 20 | * @used: Number of objects added | 22 | * @used: Number of objects added |
| 21 | * @obj: Pointer to array of object pointers | 23 | * @obj: Pointer to array of object pointers |
| @@ -23,6 +25,7 @@ | |||
| 23 | * based on affinity masks | 25 | * based on affinity masks |
| 24 | */ | 26 | */ |
| 25 | struct cpu_rmap { | 27 | struct cpu_rmap { |
| 28 | struct kref refcount; | ||
| 26 | u16 size, used; | 29 | u16 size, used; |
| 27 | void **obj; | 30 | void **obj; |
| 28 | struct { | 31 | struct { |
| @@ -33,15 +36,7 @@ struct cpu_rmap { | |||
| 33 | #define CPU_RMAP_DIST_INF 0xffff | 36 | #define CPU_RMAP_DIST_INF 0xffff |
| 34 | 37 | ||
| 35 | extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); | 38 | extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); |
| 36 | 39 | extern int cpu_rmap_put(struct cpu_rmap *rmap); | |
| 37 | /** | ||
| 38 | * free_cpu_rmap - free CPU affinity reverse-map | ||
| 39 | * @rmap: Reverse-map allocated with alloc_cpu_rmap(), or %NULL | ||
| 40 | */ | ||
| 41 | static inline void free_cpu_rmap(struct cpu_rmap *rmap) | ||
| 42 | { | ||
| 43 | kfree(rmap); | ||
| 44 | } | ||
| 45 | 40 | ||
| 46 | extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); | 41 | extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); |
| 47 | extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, | 42 | extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5e4e6170f43a..5fa5afeeb759 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -268,11 +268,6 @@ struct irq_affinity_notify { | |||
| 268 | extern int | 268 | extern int |
| 269 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); | 269 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); |
| 270 | 270 | ||
| 271 | static inline void irq_run_affinity_notifiers(void) | ||
| 272 | { | ||
| 273 | flush_scheduled_work(); | ||
| 274 | } | ||
| 275 | |||
| 276 | #else /* CONFIG_SMP */ | 271 | #else /* CONFIG_SMP */ |
| 277 | 272 | ||
| 278 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) | 273 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 00e46376e28f..2bca44b0893c 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -524,14 +524,17 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
| 524 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 524 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 525 | # ifdef CONFIG_PROVE_LOCKING | 525 | # ifdef CONFIG_PROVE_LOCKING |
| 526 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) | 526 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
| 527 | # define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) | ||
| 527 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) | 528 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) |
| 528 | # else | 529 | # else |
| 529 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) | 530 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
| 531 | # define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i) | ||
| 530 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) | 532 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) |
| 531 | # endif | 533 | # endif |
| 532 | # define rwsem_release(l, n, i) lock_release(l, n, i) | 534 | # define rwsem_release(l, n, i) lock_release(l, n, i) |
| 533 | #else | 535 | #else |
| 534 | # define rwsem_acquire(l, s, t, i) do { } while (0) | 536 | # define rwsem_acquire(l, s, t, i) do { } while (0) |
| 537 | # define rwsem_acquire_nest(l, s, t, n, i) do { } while (0) | ||
| 535 | # define rwsem_acquire_read(l, s, t, i) do { } while (0) | 538 | # define rwsem_acquire_read(l, s, t, i) do { } while (0) |
| 536 | # define rwsem_release(l, n, i) do { } while (0) | 539 | # define rwsem_release(l, n, i) do { } while (0) |
| 537 | #endif | 540 | #endif |
diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h index 2ac60c9cf644..fea49b5da12a 100644 --- a/include/linux/rbtree_augmented.h +++ b/include/linux/rbtree_augmented.h | |||
| @@ -123,9 +123,9 @@ __rb_change_child(struct rb_node *old, struct rb_node *new, | |||
| 123 | extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, | 123 | extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, |
| 124 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); | 124 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); |
| 125 | 125 | ||
| 126 | static __always_inline void | 126 | static __always_inline struct rb_node * |
| 127 | rb_erase_augmented(struct rb_node *node, struct rb_root *root, | 127 | __rb_erase_augmented(struct rb_node *node, struct rb_root *root, |
| 128 | const struct rb_augment_callbacks *augment) | 128 | const struct rb_augment_callbacks *augment) |
| 129 | { | 129 | { |
| 130 | struct rb_node *child = node->rb_right, *tmp = node->rb_left; | 130 | struct rb_node *child = node->rb_right, *tmp = node->rb_left; |
| 131 | struct rb_node *parent, *rebalance; | 131 | struct rb_node *parent, *rebalance; |
| @@ -217,6 +217,14 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root, | |||
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | augment->propagate(tmp, NULL); | 219 | augment->propagate(tmp, NULL); |
| 220 | return rebalance; | ||
| 221 | } | ||
| 222 | |||
| 223 | static __always_inline void | ||
| 224 | rb_erase_augmented(struct rb_node *node, struct rb_root *root, | ||
| 225 | const struct rb_augment_callbacks *augment) | ||
| 226 | { | ||
| 227 | struct rb_node *rebalance = __rb_erase_augmented(node, root, augment); | ||
| 220 | if (rebalance) | 228 | if (rebalance) |
| 221 | __rb_erase_color(rebalance, root, augment->rotate); | 229 | __rb_erase_color(rebalance, root, augment->rotate); |
| 222 | } | 230 | } |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 54bd7cd7ecbd..413cc11e414a 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
| @@ -125,8 +125,17 @@ extern void downgrade_write(struct rw_semaphore *sem); | |||
| 125 | */ | 125 | */ |
| 126 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); | 126 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); |
| 127 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); | 127 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); |
| 128 | extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest_lock); | ||
| 129 | |||
| 130 | # define down_write_nest_lock(sem, nest_lock) \ | ||
| 131 | do { \ | ||
| 132 | typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \ | ||
| 133 | _down_write_nest_lock(sem, &(nest_lock)->dep_map); \ | ||
| 134 | } while (0); | ||
| 135 | |||
| 128 | #else | 136 | #else |
| 129 | # define down_read_nested(sem, subclass) down_read(sem) | 137 | # define down_read_nested(sem, subclass) down_read(sem) |
| 138 | # define down_write_nest_lock(sem, nest_lock) down_read(sem) | ||
| 130 | # define down_write_nested(sem, subclass) down_write(sem) | 139 | # define down_write_nested(sem, subclass) down_write(sem) |
| 131 | #endif | 140 | #endif |
| 132 | 141 | ||
