Home
last modified time | relevance | path

Searched refs:new (Results 1 – 200 of 1886) sorted by relevance

12345678910

/linux-4.4.14/kernel/
Dcred.c208 struct cred *new; in cred_alloc_blank() local
210 new = kmem_cache_zalloc(cred_jar, GFP_KERNEL); in cred_alloc_blank()
211 if (!new) in cred_alloc_blank()
214 atomic_set(&new->usage, 1); in cred_alloc_blank()
216 new->magic = CRED_MAGIC; in cred_alloc_blank()
219 if (security_cred_alloc_blank(new, GFP_KERNEL) < 0) in cred_alloc_blank()
222 return new; in cred_alloc_blank()
225 abort_creds(new); in cred_alloc_blank()
247 struct cred *new; in prepare_creds() local
251 new = kmem_cache_alloc(cred_jar, GFP_KERNEL); in prepare_creds()
[all …]
Dresource.c208 static struct resource * __request_resource(struct resource *root, struct resource *new) in __request_resource() argument
210 resource_size_t start = new->start; in __request_resource()
211 resource_size_t end = new->end; in __request_resource()
224 new->sibling = tmp; in __request_resource()
225 *p = new; in __request_resource()
226 new->parent = root; in __request_resource()
292 struct resource *request_resource_conflict(struct resource *root, struct resource *new) in request_resource_conflict() argument
297 conflict = __request_resource(root, new); in request_resource_conflict()
309 int request_resource(struct resource *root, struct resource *new) in request_resource() argument
313 conflict = request_resource_conflict(root, new); in request_resource()
[all …]
Dsys.c333 struct cred *new; in SYSCALL_DEFINE2() local
345 new = prepare_creds(); in SYSCALL_DEFINE2()
346 if (!new) in SYSCALL_DEFINE2()
355 new->gid = krgid; in SYSCALL_DEFINE2()
364 new->egid = kegid; in SYSCALL_DEFINE2()
371 new->sgid = new->egid; in SYSCALL_DEFINE2()
372 new->fsgid = new->egid; in SYSCALL_DEFINE2()
374 return commit_creds(new); in SYSCALL_DEFINE2()
377 abort_creds(new); in SYSCALL_DEFINE2()
390 struct cred *new; in SYSCALL_DEFINE1() local
[all …]
Duser.c174 struct user_struct *up, *new; in alloc_uid() local
181 new = kmem_cache_zalloc(uid_cachep, GFP_KERNEL); in alloc_uid()
182 if (!new) in alloc_uid()
185 new->uid = uid; in alloc_uid()
186 atomic_set(&new->__count, 1); in alloc_uid()
195 key_put(new->uid_keyring); in alloc_uid()
196 key_put(new->session_keyring); in alloc_uid()
197 kmem_cache_free(uid_cachep, new); in alloc_uid()
199 uid_hash_insert(new, hashent); in alloc_uid()
200 up = new; in alloc_uid()
Dtracepoint.c98 struct tracepoint_func *old, *new; in func_add() local
119 new = allocate_probes(nr_probes + 2); in func_add()
120 if (new == NULL) in func_add()
125 memcpy(new, old, nr_probes * sizeof(struct tracepoint_func)); in func_add()
128 memcpy(new, old, pos * sizeof(struct tracepoint_func)); in func_add()
130 memcpy(new + pos + 1, old + pos, in func_add()
135 new[pos] = *tp_func; in func_add()
136 new[nr_probes + 1].func = NULL; in func_add()
137 *funcs = new; in func_add()
146 struct tracepoint_func *old, *new; in func_remove() local
[all …]
Dgroups.c159 void set_groups(struct cred *new, struct group_info *group_info) in set_groups() argument
161 put_group_info(new->group_info); in set_groups()
164 new->group_info = group_info; in set_groups()
178 struct cred *new; in set_current_groups() local
180 new = prepare_creds(); in set_current_groups()
181 if (!new) in set_current_groups()
184 set_groups(new, group_info); in set_current_groups()
185 return commit_creds(new); in set_current_groups()
Dkmod.c218 struct cred *new; in call_usermodehelper_exec_async() local
232 new = prepare_kernel_cred(current); in call_usermodehelper_exec_async()
233 if (!new) in call_usermodehelper_exec_async()
237 new->cap_bset = cap_intersect(usermodehelper_bset, new->cap_bset); in call_usermodehelper_exec_async()
238 new->cap_inheritable = cap_intersect(usermodehelper_inheritable, in call_usermodehelper_exec_async()
239 new->cap_inheritable); in call_usermodehelper_exec_async()
243 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
245 abort_creds(new); in call_usermodehelper_exec_async()
250 commit_creds(new); in call_usermodehelper_exec_async()
521 int (*init)(struct subprocess_info *info, struct cred *new), in call_usermodehelper_setup() argument
Dcapability.c228 struct cred *new; in SYSCALL_DEFINE2() local
266 new = prepare_creds(); in SYSCALL_DEFINE2()
267 if (!new) in SYSCALL_DEFINE2()
270 ret = security_capset(new, current_cred(), in SYSCALL_DEFINE2()
275 audit_log_capset(new, current_cred()); in SYSCALL_DEFINE2()
277 return commit_creds(new); in SYSCALL_DEFINE2()
280 abort_creds(new); in SYSCALL_DEFINE2()
/linux-4.4.14/security/
Dcommoncap.c245 int cap_capset(struct cred *new, in cap_capset() argument
272 new->cap_effective = *effective; in cap_capset()
273 new->cap_inheritable = *inheritable; in cap_capset()
274 new->cap_permitted = *permitted; in cap_capset()
280 new->cap_ambient = cap_intersect(new->cap_ambient, in cap_capset()
283 if (WARN_ON(!cap_ambient_invariant_ok(new))) in cap_capset()
349 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() local
367 new->cap_permitted.cap[i] = in bprm_caps_from_vfs_caps()
368 (new->cap_bset.cap[i] & permitted) | in bprm_caps_from_vfs_caps()
369 (new->cap_inheritable.cap[i] & inheritable); in bprm_caps_from_vfs_caps()
[all …]
/linux-4.4.14/fs/nfsd/
Dauth.c24 struct cred *new; in nfsd_setuser() local
32 new = prepare_creds(); in nfsd_setuser()
33 if (!new) in nfsd_setuser()
36 new->fsuid = rqstp->rq_cred.cr_uid; in nfsd_setuser()
37 new->fsgid = rqstp->rq_cred.cr_gid; in nfsd_setuser()
42 new->fsuid = exp->ex_anon_uid; in nfsd_setuser()
43 new->fsgid = exp->ex_anon_gid; in nfsd_setuser()
48 if (uid_eq(new->fsuid, GLOBAL_ROOT_UID)) in nfsd_setuser()
49 new->fsuid = exp->ex_anon_uid; in nfsd_setuser()
50 if (gid_eq(new->fsgid, GLOBAL_ROOT_GID)) in nfsd_setuser()
[all …]
Dexport.c66 static struct svc_expkey *svc_expkey_update(struct cache_detail *cd, struct svc_expkey *new,
193 struct svc_expkey *new = container_of(b, struct svc_expkey, h); in expkey_match() local
195 if (orig->ek_fsidtype != new->ek_fsidtype || in expkey_match()
196 orig->ek_client != new->ek_client || in expkey_match()
197 memcmp(orig->ek_fsid, new->ek_fsid, key_len(orig->ek_fsidtype)) != 0) in expkey_match()
205 struct svc_expkey *new = container_of(cnew, struct svc_expkey, h); in expkey_init() local
209 new->ek_client = item->ek_client; in expkey_init()
210 new->ek_fsidtype = item->ek_fsidtype; in expkey_init()
212 memcpy(new->ek_fsid, item->ek_fsid, sizeof(new->ek_fsid)); in expkey_init()
218 struct svc_expkey *new = container_of(cnew, struct svc_expkey, h); in expkey_update() local
[all …]
/linux-4.4.14/security/apparmor/
Dcontext.c63 void aa_dup_task_context(struct aa_task_cxt *new, const struct aa_task_cxt *old) in aa_dup_task_context() argument
65 *new = *old; in aa_dup_task_context()
66 aa_get_profile(new->profile); in aa_dup_task_context()
67 aa_get_profile(new->previous); in aa_dup_task_context()
68 aa_get_profile(new->onexec); in aa_dup_task_context()
97 struct cred *new; in aa_replace_current_profile() local
103 new = prepare_creds(); in aa_replace_current_profile()
104 if (!new) in aa_replace_current_profile()
107 cxt = cred_cxt(new); in aa_replace_current_profile()
122 commit_creds(new); in aa_replace_current_profile()
[all …]
Dpolicy.c954 if (ent->new == profile) in __list_lookup_parent()
956 if (strncmp(ent->new->base.hname, profile->base.hname, len) == in __list_lookup_parent()
957 0 && ent->new->base.hname[len] == 0) in __list_lookup_parent()
958 return ent->new; in __list_lookup_parent()
977 static void __replace_profile(struct aa_profile *old, struct aa_profile *new, in __replace_profile() argument
990 p = __find_child(&new->base.profiles, child->base.name); in __replace_profile()
1001 rcu_assign_pointer(child->parent, aa_get_profile(new)); in __replace_profile()
1002 list_add_rcu(&child->base.list, &new->base.profiles); in __replace_profile()
1007 if (!rcu_access_pointer(new->parent)) { in __replace_profile()
1009 rcu_assign_pointer(new->parent, aa_get_profile(parent)); in __replace_profile()
[all …]
/linux-4.4.14/arch/s390/include/asm/
Drwsem.h54 signed long old, new; in __down_read() local
62 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read()
74 signed long old, new; in __down_read_trylock() local
84 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read_trylock()
95 signed long old, new, tmp; in __down_write_nested() local
104 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_write_nested()
141 signed long old, new; in __up_read() local
149 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __up_read()
152 if (new < 0) in __up_read()
153 if ((new & RWSEM_ACTIVE_MASK) == 0) in __up_read()
[all …]
Datomic.h134 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OP() argument
136 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in ATOMIC_OP()
141 : "d" (new) in ATOMIC_OP()
254 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) argument
257 long long old, long long new) in atomic64_cmpxchg() argument
262 : "d" (new) in atomic64_cmpxchg()
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/
Dacl.c101 posix_acl_xattr_header *new; in lustre_posix_acl_xattr_reduce_space() local
106 new = kmemdup(*header, new_size, GFP_NOFS); in lustre_posix_acl_xattr_reduce_space()
107 if (unlikely(new == NULL)) in lustre_posix_acl_xattr_reduce_space()
111 *header = new; in lustre_posix_acl_xattr_reduce_space()
121 ext_acl_xattr_header *new; in lustre_ext_acl_xattr_reduce_space() local
126 new = kmemdup(*header, ext_size, GFP_NOFS); in lustre_ext_acl_xattr_reduce_space()
127 if (unlikely(new == NULL)) in lustre_ext_acl_xattr_reduce_space()
131 *header = new; in lustre_ext_acl_xattr_reduce_space()
142 ext_acl_xattr_header *new; in lustre_posix_acl_xattr_2ext() local
151 new = kzalloc(esize, GFP_NOFS); in lustre_posix_acl_xattr_2ext()
[all …]
/linux-4.4.14/arch/sparc/kernel/
Dftrace.c25 static int ftrace_modify_code(unsigned long ip, u32 old, u32 new) in ftrace_modify_code() argument
46 : [new] "0" (new), [old] "r" (old), [ip] "r" (ip) in ftrace_modify_code()
49 if (replaced != old && replaced != new) in ftrace_modify_code()
58 u32 old, new; in ftrace_make_nop() local
61 new = ftrace_nop; in ftrace_make_nop()
62 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
68 u32 old, new; in ftrace_make_call() local
71 new = ftrace_call_replace(ip, addr); in ftrace_make_call()
72 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
78 u32 old, new; in ftrace_update_ftrace_func() local
[all …]
/linux-4.4.14/security/keys/
Dprocess_keys.c131 int install_thread_keyring_to_cred(struct cred *new) in install_thread_keyring_to_cred() argument
135 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred()
141 new->thread_keyring = keyring; in install_thread_keyring_to_cred()
150 struct cred *new; in install_thread_keyring() local
153 new = prepare_creds(); in install_thread_keyring()
154 if (!new) in install_thread_keyring()
157 BUG_ON(new->thread_keyring); in install_thread_keyring()
159 ret = install_thread_keyring_to_cred(new); in install_thread_keyring()
161 abort_creds(new); in install_thread_keyring()
165 return commit_creds(new); in install_thread_keyring()
[all …]
/linux-4.4.14/fs/nfs/blocklayout/
Dextent_tree.c126 struct pnfs_block_extent *new, bool merge_ok) in __ext_tree_insert() argument
135 if (new->be_f_offset < be->be_f_offset) { in __ext_tree_insert()
136 if (merge_ok && ext_can_merge(new, be)) { in __ext_tree_insert()
137 be->be_f_offset = new->be_f_offset; in __ext_tree_insert()
139 be->be_v_offset = new->be_v_offset; in __ext_tree_insert()
140 be->be_length += new->be_length; in __ext_tree_insert()
145 } else if (new->be_f_offset >= ext_f_end(be)) { in __ext_tree_insert()
146 if (merge_ok && ext_can_merge(be, new)) { in __ext_tree_insert()
147 be->be_length += new->be_length; in __ext_tree_insert()
157 rb_link_node(&new->be_node, parent, p); in __ext_tree_insert()
[all …]
/linux-4.4.14/arch/avr32/include/asm/
Dcmpxchg.h47 unsigned long new) in __cmpxchg_u32() argument
60 : "m"(m), [old] "ir"(old), [new] "r"(new) in __cmpxchg_u32()
66 volatile int * m, unsigned long old, unsigned long new);
74 unsigned long new, int size) in __cmpxchg() argument
78 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
80 return __cmpxchg_u64(ptr, old, new); in __cmpxchg()
87 #define cmpxchg(ptr, old, new) \ argument
89 (unsigned long)(new), \
96 unsigned long new, int size) in __cmpxchg_local() argument
100 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local()
[all …]
/linux-4.4.14/arch/arm/kernel/
Dftrace.c103 unsigned long new, bool validate) in ftrace_modify_code() argument
109 new = __opcode_to_mem_thumb32(new); in ftrace_modify_code()
112 new = __opcode_to_mem_arm(new); in ftrace_modify_code()
123 if (probe_kernel_write((void *)pc, &new, MCOUNT_INSN_SIZE)) in ftrace_modify_code()
134 unsigned long new; in ftrace_update_ftrace_func() local
138 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
140 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func()
145 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
147 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func()
156 unsigned long new, old; in ftrace_make_call() local
[all …]
/linux-4.4.14/drivers/mtd/
Dmtd_blkdevs.c319 int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) in add_mtd_blktrans_dev() argument
321 struct mtd_blktrans_ops *tr = new->tr; in add_mtd_blktrans_dev()
334 if (new->devnum == -1) { in add_mtd_blktrans_dev()
338 new->devnum = last_devnum+1; in add_mtd_blktrans_dev()
339 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev()
342 } else if (d->devnum == new->devnum) { in add_mtd_blktrans_dev()
346 } else if (d->devnum > new->devnum) { in add_mtd_blktrans_dev()
348 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev()
355 if (new->devnum == -1) in add_mtd_blktrans_dev()
356 new->devnum = last_devnum+1; in add_mtd_blktrans_dev()
[all …]
/linux-4.4.14/scripts/dtc/
Dlivetree.c29 struct label *new; in add_label() local
32 for_each_label_withdel(*labels, new) in add_label()
33 if (streq(new->label, label)) { in add_label()
34 new->deleted = 0; in add_label()
38 new = xmalloc(sizeof(*new)); in add_label()
39 memset(new, 0, sizeof(*new)); in add_label()
40 new->label = label; in add_label()
41 new->next = *labels; in add_label()
42 *labels = new; in add_label()
55 struct property *new = xmalloc(sizeof(*new)); in build_property() local
[all …]
Dutil.h43 void *new = malloc(len); in xmalloc() local
45 if (!new) in xmalloc()
48 return new; in xmalloc()
53 void *new = realloc(p, len); in xrealloc() local
55 if (!new) in xrealloc()
58 return new; in xrealloc()
/linux-4.4.14/arch/sparc/include/asm/
Dcmpxchg_64.h69 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument
72 : "=&r" (new) in __cmpxchg_u32()
73 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32()
76 return new; in __cmpxchg_u32()
80 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
83 : "=&r" (new) in __cmpxchg_u64()
84 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64()
87 return new; in __cmpxchg_u64()
95 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
99 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
[all …]
/linux-4.4.14/lib/
Dlist_debug.c22 void __list_add(struct list_head *new, in __list_add() argument
34 WARN(new == prev || new == next, in __list_add()
36 new, prev, next); in __list_add()
37 next->prev = new; in __list_add()
38 new->next = next; in __list_add()
39 new->prev = prev; in __list_add()
40 prev->next = new; in __list_add()
86 void __list_add_rcu(struct list_head *new, in __list_add_rcu() argument
95 new->next = next; in __list_add_rcu()
96 new->prev = prev; in __list_add_rcu()
[all …]
Didr.c96 struct idr_layer *new; in idr_layer_alloc() local
109 new = kmem_cache_zalloc(idr_layer_cache, gfp_mask | __GFP_NOWARN); in idr_layer_alloc()
110 if (new) in idr_layer_alloc()
111 return new; in idr_layer_alloc()
119 new = __this_cpu_read(idr_preload_head); in idr_layer_alloc()
120 if (new) { in idr_layer_alloc()
121 __this_cpu_write(idr_preload_head, new->ary[0]); in idr_layer_alloc()
123 new->ary[0] = NULL; in idr_layer_alloc()
126 if (new) in idr_layer_alloc()
127 return new; in idr_layer_alloc()
[all …]
Dlockref.c15 struct lockref new = old, prev = old; \
19 new.lock_count); \
43 new.count++; in lockref_get()
64 new.count++; in lockref_get_not_zero()
91 new.count++; in lockref_get_or_lock()
117 new.count--; in lockref_put_return()
121 return new.count; in lockref_put_return()
135 new.count--; in lockref_put_or_lock()
172 new.count++; in lockref_get_not_dead()
Drbtree_test.c26 struct rb_node **new = &root->rb_node, *parent = NULL; in insert() local
29 while (*new) { in insert()
30 parent = *new; in insert()
32 new = &parent->rb_left; in insert()
34 new = &parent->rb_right; in insert()
37 rb_link_node(&node->rb, parent, new); in insert()
69 struct rb_node **new = &root->rb_node, *rb_parent = NULL; in RB_DECLARE_CALLBACKS() local
74 while (*new) { in RB_DECLARE_CALLBACKS()
75 rb_parent = *new; in RB_DECLARE_CALLBACKS()
80 new = &parent->rb.rb_left; in RB_DECLARE_CALLBACKS()
[all …]
Drbtree.c87 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument
91 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents()
92 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents()
93 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
98 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() argument
229 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() argument
397 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() argument
411 static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {} in dummy_copy() argument
412 static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} in dummy_rotate() argument
441 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() argument
[all …]
/linux-4.4.14/fs/cachefiles/
Dsecurity.c22 struct cred *new; in cachefiles_get_security_ID() local
27 new = prepare_kernel_cred(current); in cachefiles_get_security_ID()
28 if (!new) { in cachefiles_get_security_ID()
34 ret = set_security_override_from_ctx(new, cache->secctx); in cachefiles_get_security_ID()
36 put_cred(new); in cachefiles_get_security_ID()
43 cache->cache_cred = new; in cachefiles_get_security_ID()
83 struct cred *new; in cachefiles_determine_cache_security() local
90 new = prepare_creds(); in cachefiles_determine_cache_security()
91 if (!new) in cachefiles_determine_cache_security()
98 ret = set_create_files_as(new, d_backing_inode(root)); in cachefiles_determine_cache_security()
[all …]
/linux-4.4.14/drivers/mtd/devices/
Dphram.c99 struct phram_mtd_list *new; in register_device() local
102 new = kzalloc(sizeof(*new), GFP_KERNEL); in register_device()
103 if (!new) in register_device()
107 new->mtd.priv = ioremap(start, len); in register_device()
108 if (!new->mtd.priv) { in register_device()
114 new->mtd.name = name; in register_device()
115 new->mtd.size = len; in register_device()
116 new->mtd.flags = MTD_CAP_RAM; in register_device()
117 new->mtd._erase = phram_erase; in register_device()
118 new->mtd._point = phram_point; in register_device()
[all …]
/linux-4.4.14/arch/ia64/include/asm/
Dbitops.h41 __u32 bit, old, new; in set_bit() local
50 new = old | bit; in set_bit()
51 } while (cmpxchg_acq(m, old, new) != old); in set_bit()
82 __u32 mask, old, new; in clear_bit() local
91 new = old & mask; in clear_bit()
92 } while (cmpxchg_acq(m, old, new) != old); in clear_bit()
106 __u32 mask, old, new; in clear_bit_unlock() local
115 new = old & mask; in clear_bit_unlock()
116 } while (cmpxchg_rel(m, old, new) != old); in clear_bit_unlock()
131 __u32 const new = *m & ~(1 << (nr & 31)); in __clear_bit_unlock() local
[all …]
Drwsem.h55 long old, new; in __down_write() local
59 new = old + RWSEM_ACTIVE_WRITE_BIAS; in __down_write()
60 } while (cmpxchg_acq(&sem->count, old, new) != old); in __down_write()
84 long old, new; in __up_write() local
88 new = old - RWSEM_ACTIVE_WRITE_BIAS; in __up_write()
89 } while (cmpxchg_rel(&sem->count, old, new) != old); in __up_write()
91 if (new < 0 && (new & RWSEM_ACTIVE_MASK) == 0) in __up_write()
127 long old, new; in __downgrade_write() local
131 new = old - RWSEM_WAITING_BIAS; in __downgrade_write()
132 } while (cmpxchg_rel(&sem->count, old, new) != old); in __downgrade_write()
Dacenv.h25 unsigned int old, new, val; in ia64_acpi_acquire_global_lock() local
28 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1)); in ia64_acpi_acquire_global_lock()
29 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_acquire_global_lock()
31 return (new < 3) ? -1 : 0; in ia64_acpi_acquire_global_lock()
37 unsigned int old, new, val; in ia64_acpi_release_global_lock() local
40 new = old & ~0x3; in ia64_acpi_release_global_lock()
41 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_release_global_lock()
Datomic.h34 __s32 old, new; \
40 new = old c_op i; \
41 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); \
42 return new; \
86 __s64 old, new; \
92 new = old c_op i; \
93 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); \
94 return new; \
134 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) argument
135 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
[all …]
/linux-4.4.14/arch/alpha/include/asm/
Dxchg.h137 ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new) in ____cmpxchg() argument
157 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg()
158 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg()
164 ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new) in ____cmpxchg() argument
184 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg()
185 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg()
191 ____cmpxchg(_u32, volatile int *m, int old, int new) in ____cmpxchg() argument
208 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg()
214 ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new) in ____cmpxchg() argument
231 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg()
[all …]
Datomic.h131 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
132 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() argument
134 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
135 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() argument
148 int c, new, old; in ATOMIC_OPS() local
161 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in ATOMIC_OPS()
/linux-4.4.14/include/linux/
Drculist.h49 static inline void __list_add_rcu(struct list_head *new, in __list_add_rcu() argument
52 new->next = next; in __list_add_rcu()
53 new->prev = prev; in __list_add_rcu()
54 rcu_assign_pointer(list_next_rcu(prev), new); in __list_add_rcu()
55 next->prev = new; in __list_add_rcu()
58 void __list_add_rcu(struct list_head *new,
78 static inline void list_add_rcu(struct list_head *new, struct list_head *head) in list_add_rcu() argument
80 __list_add_rcu(new, head, head->next); in list_add_rcu()
99 static inline void list_add_tail_rcu(struct list_head *new, in list_add_tail_rcu() argument
102 __list_add_rcu(new, head->prev, head); in list_add_tail_rcu()
[all …]
Dlist.h38 static inline void __list_add(struct list_head *new, in __list_add() argument
42 next->prev = new; in __list_add()
43 new->next = next; in __list_add()
44 new->prev = prev; in __list_add()
45 prev->next = new; in __list_add()
48 extern void __list_add(struct list_head *new,
61 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
63 __list_add(new, head, head->next); in list_add()
75 static inline void list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
77 __list_add(new, head->prev, head); in list_add_tail()
[all …]
Drbtree_augmented.h40 void (*copy)(struct rb_node *old, struct rb_node *new);
41 void (*rotate)(struct rb_node *old, struct rb_node *new);
45 void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
81 rbstruct *new = rb_entry(rb_new, rbstruct, rbfield); \
82 new->rbaugmented = old->rbaugmented; \
88 rbstruct *new = rb_entry(rb_new, rbstruct, rbfield); \
89 new->rbaugmented = old->rbaugmented; \
121 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() argument
126 WRITE_ONCE(parent->rb_left, new); in __rb_change_child()
128 WRITE_ONCE(parent->rb_right, new); in __rb_change_child()
[all …]
Dioport.h142 extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
143 extern int request_resource(struct resource *root, struct resource *new);
144 extern int release_resource(struct resource *new);
145 void release_child_resources(struct resource *new);
149 extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
150 extern int insert_resource(struct resource *parent, struct resource *new);
151 extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
153 extern int allocate_resource(struct resource *root, struct resource *new,
213 struct resource *new);
214 extern void devm_release_resource(struct device *dev, struct resource *new);
/linux-4.4.14/mm/
Dpage_counter.c22 long new; in page_counter_cancel() local
24 new = atomic_long_sub_return(nr_pages, &counter->count); in page_counter_cancel()
26 WARN_ON_ONCE(new < 0); in page_counter_cancel()
41 long new; in page_counter_charge() local
43 new = atomic_long_add_return(nr_pages, &c->count); in page_counter_charge()
48 if (new > c->watermark) in page_counter_charge()
49 c->watermark = new; in page_counter_charge()
69 long new; in page_counter_try_charge() local
84 new = atomic_long_add_return(nr_pages, &c->count); in page_counter_try_charge()
85 if (new > c->limit) { in page_counter_try_charge()
[all …]
Dmempolicy.c431 void mpol_rebind_task(struct task_struct *tsk, const nodemask_t *new, in mpol_rebind_task() argument
434 mpol_rebind_policy(tsk->mempolicy, new, step); in mpol_rebind_task()
443 void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new) in mpol_rebind_mm() argument
449 mpol_rebind_policy(vma->vm_policy, new, MPOL_REBIND_ONCE); in mpol_rebind_mm()
664 struct mempolicy *new; in vma_replace_policy() local
671 new = mpol_dup(pol); in vma_replace_policy()
672 if (IS_ERR(new)) in vma_replace_policy()
673 return PTR_ERR(new); in vma_replace_policy()
676 err = vma->vm_ops->set_policy(vma, new); in vma_replace_policy()
682 vma->vm_policy = new; /* protected by mmap_sem */ in vma_replace_policy()
[all …]
/linux-4.4.14/net/irda/irnet/
Dirnet_irda.c751 irnet_socket * new = (irnet_socket *) NULL; in irnet_find_socket() local
770 new = (irnet_socket *) hashbin_find(irnet_server.list, in irnet_find_socket()
772 if(new) in irnet_find_socket()
774 new, new->rname); in irnet_find_socket()
781 if(new == (irnet_socket *) NULL) in irnet_find_socket()
783 new = (irnet_socket *) hashbin_get_first(irnet_server.list); in irnet_find_socket()
784 while(new !=(irnet_socket *) NULL) in irnet_find_socket()
787 if((new->rdaddr == self->daddr) || (new->daddr == self->daddr)) in irnet_find_socket()
791 new, self->daddr); in irnet_find_socket()
794 new = (irnet_socket *) hashbin_get_next(irnet_server.list); in irnet_find_socket()
[all …]
/linux-4.4.14/arch/arm64/kernel/
Dftrace.c25 static int ftrace_modify_code(unsigned long pc, u32 old, u32 new, in ftrace_modify_code() argument
46 if (aarch64_insn_patch_text_nosync((void *)pc, new)) in ftrace_modify_code()
58 u32 new; in ftrace_update_ftrace_func() local
61 new = aarch64_insn_gen_branch_imm(pc, (unsigned long)func, in ftrace_update_ftrace_func()
64 return ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func()
73 u32 old, new; in ftrace_make_call() local
76 new = aarch64_insn_gen_branch_imm(pc, addr, AARCH64_INSN_BRANCH_LINK); in ftrace_make_call()
78 return ftrace_modify_code(pc, old, new, true); in ftrace_make_call()
88 u32 old, new; in ftrace_make_nop() local
91 new = aarch64_insn_gen_nop(); in ftrace_make_nop()
[all …]
/linux-4.4.14/arch/arm64/include/asm/
Datomic.h79 #define atomic_xchg_relaxed(v, new) xchg_relaxed(&((v)->counter), (new)) argument
80 #define atomic_xchg_acquire(v, new) xchg_acquire(&((v)->counter), (new)) argument
81 #define atomic_xchg_release(v, new) xchg_release(&((v)->counter), (new)) argument
82 #define atomic_xchg(v, new) xchg(&((v)->counter), (new)) argument
84 #define atomic_cmpxchg_relaxed(v, old, new) \ argument
85 cmpxchg_relaxed(&((v)->counter), (old), (new))
86 #define atomic_cmpxchg_acquire(v, old, new) \ argument
87 cmpxchg_acquire(&((v)->counter), (old), (new))
88 #define atomic_cmpxchg_release(v, old, new) \ argument
89 cmpxchg_release(&((v)->counter), (old), (new))
[all …]
/linux-4.4.14/sound/pci/ice1712/
Dwtm.c81 unsigned char new, old; in stac9460_dac_mute_all() local
92 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute_all()
93 change = (new != old); in stac9460_dac_mute_all()
95 stac9460_put(ice, idx, new); in stac9460_dac_mute_all()
111 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute_all()
112 change = (new != old); in stac9460_dac_mute_all()
114 stac9460_2_put(ice, idx, new); in stac9460_dac_mute_all()
158 unsigned char new, old; in stac9460_dac_mute_put() local
165 new = (~ucontrol->value.integer.value[0] << 7 & 0x80) | in stac9460_dac_mute_put()
167 change = (new != old); in stac9460_dac_mute_put()
[all …]
Dquartet.c523 unsigned int old, new, smute; in qtet_mute_put() local
527 new = 0; in qtet_mute_put()
532 new = SCR_MUTE; in qtet_mute_put()
536 if (old != new) { in qtet_mute_put()
538 set_scr(ice, (get_scr(ice) & ~SCR_MUTE) | new); in qtet_mute_put()
584 unsigned int old, new, tmp, masked_old; in qtet_ain12_sw_put() local
585 old = new = get_scr(ice); in qtet_ain12_sw_put()
595 new = old & ~(SCR_AIN12_SEL1 | SCR_AIN12_SEL0); in qtet_ain12_sw_put()
596 set_scr(ice, new); in qtet_ain12_sw_put()
598 new &= ~SCR_RELAY; in qtet_ain12_sw_put()
[all …]
Dprodigy192.c95 unsigned char new, old; in stac9460_dac_mute() local
98 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute()
99 change = (new != old); in stac9460_dac_mute()
102 stac9460_put(ice, idx, new); in stac9460_dac_mute()
220 unsigned char new, old; in stac9460_adc_mute_put() local
227 new = (~ucontrol->value.integer.value[i]<<7&0x80) | (old&~0x80); in stac9460_adc_mute_put()
228 change = (new != old); in stac9460_adc_mute_put()
230 stac9460_put(ice, reg, new); in stac9460_adc_mute_put()
306 unsigned char new, old; in stac9460_mic_sw_put() local
309 new = (ucontrol->value.enumerated.item[0] << 7 & 0x80) | (old & ~0x80); in stac9460_mic_sw_put()
[all …]
/linux-4.4.14/kernel/irq/
Dmanage.c1008 static int irq_setup_forced_threading(struct irqaction *new) in irq_setup_forced_threading() argument
1012 if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)) in irq_setup_forced_threading()
1015 new->flags |= IRQF_ONESHOT; in irq_setup_forced_threading()
1022 if (new->handler != irq_default_primary_handler && new->thread_fn) { in irq_setup_forced_threading()
1024 new->secondary = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in irq_setup_forced_threading()
1025 if (!new->secondary) in irq_setup_forced_threading()
1027 new->secondary->handler = irq_forced_secondary_handler; in irq_setup_forced_threading()
1028 new->secondary->thread_fn = new->thread_fn; in irq_setup_forced_threading()
1029 new->secondary->dev_id = new->dev_id; in irq_setup_forced_threading()
1030 new->secondary->irq = new->irq; in irq_setup_forced_threading()
[all …]
/linux-4.4.14/arch/x86/kernel/
Dftrace.c140 unsigned const char *new, *old; in ftrace_make_nop() local
144 new = ftrace_nop_replace(); in ftrace_make_nop()
155 return ftrace_modify_code_direct(rec->ip, old, new); in ftrace_make_nop()
164 unsigned const char *new, *old; in ftrace_make_call() local
168 new = ftrace_call_replace(ip, addr); in ftrace_make_call()
171 return ftrace_modify_code_direct(rec->ip, old, new); in ftrace_make_call()
228 static int update_ftrace_func(unsigned long ip, void *new) in update_ftrace_func() argument
242 ret = ftrace_modify_code(ip, old, new); in update_ftrace_func()
252 unsigned char *new; in ftrace_update_ftrace_func() local
255 new = ftrace_call_replace(ip, (unsigned long)func); in ftrace_update_ftrace_func()
[all …]
/linux-4.4.14/tools/perf/util/
Dordered-events.c14 static void queue_event(struct ordered_events *oe, struct ordered_event *new) in queue_event() argument
17 u64 timestamp = new->timestamp; in queue_event()
21 oe->last = new; in queue_event()
26 list_add(&new->list, &oe->events); in queue_event()
40 list_add_tail(&new->list, &oe->events); in queue_event()
46 list_add_tail(&new->list, &last->list); in queue_event()
51 list_add(&new->list, &oe->events); in queue_event()
56 list_add(&new->list, &last->list); in queue_event()
93 struct ordered_event *new = NULL; in alloc_event() local
101 new = list_entry(cache->next, struct ordered_event, list); in alloc_event()
[all …]
Dcomm.c55 struct comm_str *iter, *new; in comm_str__findnew() local
72 new = comm_str__alloc(str); in comm_str__findnew()
73 if (!new) in comm_str__findnew()
76 rb_link_node(&new->rb_node, parent, p); in comm_str__findnew()
77 rb_insert_color(&new->rb_node, root); in comm_str__findnew()
79 return new; in comm_str__findnew()
105 struct comm_str *new, *old = comm->comm_str; in comm__override() local
107 new = comm_str__findnew(str, &comm_str_root); in comm__override()
108 if (!new) in comm__override()
111 comm_str__get(new); in comm__override()
[all …]
Dcallchain.c357 struct callchain_node *new; in create_child() local
359 new = zalloc(sizeof(*new)); in create_child()
360 if (!new) { in create_child()
364 new->parent = parent; in create_child()
365 INIT_LIST_HEAD(&new->val); in create_child()
371 new->rb_root_in = parent->rb_root_in; in create_child()
374 n = rb_first(&new->rb_root_in); in create_child()
377 child->parent = new; in create_child()
382 rb_link_node(&new->rb_node_in, NULL, &parent->rb_root_in.rb_node); in create_child()
383 rb_insert_color(&new->rb_node_in, &parent->rb_root_in); in create_child()
[all …]
/linux-4.4.14/drivers/firmware/efi/
Dfake_mem.c64 void *old, *new; in efi_fake_memmap() local
111 for (old = memmap.map, new = new_memmap; in efi_fake_memmap()
113 old += memmap.desc_size, new += memmap.desc_size) { in efi_fake_memmap()
116 memcpy(new, old, memmap.desc_size); in efi_fake_memmap()
117 md = new; in efi_fake_memmap()
137 new += memmap.desc_size; in efi_fake_memmap()
138 memcpy(new, old, memmap.desc_size); in efi_fake_memmap()
139 md = new; in efi_fake_memmap()
150 new += memmap.desc_size; in efi_fake_memmap()
151 memcpy(new, old, memmap.desc_size); in efi_fake_memmap()
[all …]
/linux-4.4.14/include/asm-generic/
Datomic-long.h80 #define atomic_long_cmpxchg_relaxed(l, old, new) \ argument
82 (old), (new)))
83 #define atomic_long_cmpxchg_acquire(l, old, new) \ argument
85 (old), (new)))
86 #define atomic_long_cmpxchg_release(l, old, new) \ argument
88 (old), (new)))
89 #define atomic_long_cmpxchg(l, old, new) \ argument
90 (ATOMIC_LONG_PFX(_cmpxchg)((ATOMIC_LONG_PFX(_t) *)(l), (old), (new)))
92 #define atomic_long_xchg_relaxed(v, new) \ argument
93 (ATOMIC_LONG_PFX(_xchg_relaxed)((ATOMIC_LONG_PFX(_t) *)(v), (new)))
[all …]
Dcmpxchg-local.h15 unsigned long old, unsigned long new, int size) in __cmpxchg_local_generic() argument
29 *(u8 *)ptr = (u8)new; in __cmpxchg_local_generic()
33 *(u16 *)ptr = (u16)new; in __cmpxchg_local_generic()
37 *(u32 *)ptr = (u32)new; in __cmpxchg_local_generic()
41 *(u64 *)ptr = (u64)new; in __cmpxchg_local_generic()
54 u64 old, u64 new) in __cmpxchg64_local_generic() argument
62 *(u64 *)ptr = new; in __cmpxchg64_local_generic()
/linux-4.4.14/arch/powerpc/include/asm/
Dcmpxchg.h149 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument
165 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32()
173 unsigned long new) in __cmpxchg_u32_local() argument
187 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local()
195 __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
210 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u64()
218 unsigned long new) in __cmpxchg_u64_local() argument
231 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u64_local()
243 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, in __cmpxchg() argument
248 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
[all …]
/linux-4.4.14/fs/lockd/
Dmon.c274 struct nsm_handle *new; in nsm_create_handle() local
276 new = kzalloc(sizeof(*new) + hostname_len + 1, GFP_KERNEL); in nsm_create_handle()
277 if (unlikely(new == NULL)) in nsm_create_handle()
280 atomic_set(&new->sm_count, 1); in nsm_create_handle()
281 new->sm_name = (char *)(new + 1); in nsm_create_handle()
282 memcpy(nsm_addr(new), sap, salen); in nsm_create_handle()
283 new->sm_addrlen = salen; in nsm_create_handle()
284 nsm_init_private(new); in nsm_create_handle()
286 if (rpc_ntop(nsm_addr(new), new->sm_addrbuf, in nsm_create_handle()
287 sizeof(new->sm_addrbuf)) == 0) in nsm_create_handle()
[all …]
/linux-4.4.14/arch/tile/kernel/
Dftrace.c111 unsigned long new) in ftrace_modify_code() argument
122 if (probe_kernel_write((void *)pc_wr, &new, MCOUNT_INSN_SIZE)) in ftrace_modify_code()
136 unsigned long new; in ftrace_update_ftrace_func() local
141 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
143 ret = ftrace_modify_code(pc, old, new); in ftrace_update_ftrace_func()
150 unsigned long new, old; in ftrace_make_call() local
154 new = ftrace_call_replace(ip, addr); in ftrace_make_call()
156 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_call()
164 unsigned long new; in ftrace_make_nop() local
168 new = ftrace_nop_replace(rec); in ftrace_make_nop()
[all …]
/linux-4.4.14/drivers/staging/lustre/lustre/ldlm/
Dldlm_flock.c78 ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new) in ldlm_same_flock_owner() argument
80 return((new->l_policy_data.l_flock.owner == in ldlm_same_flock_owner()
82 (new->l_export == lock->l_export)); in ldlm_same_flock_owner()
86 ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) in ldlm_flocks_overlap() argument
88 return((new->l_policy_data.l_flock.start <= in ldlm_flocks_overlap()
90 (new->l_policy_data.l_flock.end >= in ldlm_flocks_overlap()
144 struct ldlm_lock *new = req; in ldlm_process_flock_lock() local
154 *flags, new->l_policy_data.l_flock.owner, in ldlm_process_flock_lock()
155 new->l_policy_data.l_flock.pid, mode, in ldlm_process_flock_lock()
249 if (!ldlm_same_flock_owner(lock, new)) in ldlm_process_flock_lock()
[all …]
/linux-4.4.14/arch/metag/kernel/
Dftrace.c86 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() local
90 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
91 ret = ftrace_modify_code(pc, old, new); in ftrace_update_ftrace_func()
99 unsigned char *new, *old; in ftrace_make_nop() local
103 new = ftrace_nop_replace(); in ftrace_make_nop()
105 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
110 unsigned char *new, *old; in ftrace_make_call() local
114 new = ftrace_call_replace(ip, addr); in ftrace_make_call()
116 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
Ddma.c119 struct metag_vm_region *c, *new; in metag_vm_region_alloc() local
121 new = kmalloc(sizeof(struct metag_vm_region), gfp); in metag_vm_region_alloc()
122 if (!new) in metag_vm_region_alloc()
141 list_add_tail(&new->vm_list, &c->vm_list); in metag_vm_region_alloc()
142 new->vm_start = addr; in metag_vm_region_alloc()
143 new->vm_end = addr + size; in metag_vm_region_alloc()
144 new->vm_active = 1; in metag_vm_region_alloc()
147 return new; in metag_vm_region_alloc()
151 kfree(new); in metag_vm_region_alloc()
/linux-4.4.14/drivers/block/drbd/
Ddrbd_interval.c49 struct rb_node **new = &root->rb_node, *parent = NULL; in drbd_insert_interval() local
54 while (*new) { in drbd_insert_interval()
56 rb_entry(*new, struct drbd_interval, rb); in drbd_insert_interval()
58 parent = *new; in drbd_insert_interval()
62 new = &(*new)->rb_left; in drbd_insert_interval()
64 new = &(*new)->rb_right; in drbd_insert_interval()
66 new = &(*new)->rb_left; in drbd_insert_interval()
68 new = &(*new)->rb_right; in drbd_insert_interval()
74 rb_link_node(&this->rb, parent, new); in drbd_insert_interval()
/linux-4.4.14/arch/s390/kernel/
Dftrace.c107 struct ftrace_insn orig, new, old; in ftrace_make_nop() local
114 ftrace_generate_nop_insn(&new); in ftrace_make_nop()
124 ftrace_generate_kprobe_nop_insn(&new); in ftrace_make_nop()
128 ftrace_generate_nop_insn(&new); in ftrace_make_nop()
133 s390_kernel_write((void *) rec->ip, &new, sizeof(new)); in ftrace_make_nop()
139 struct ftrace_insn orig, new, old; in ftrace_make_call() local
152 ftrace_generate_kprobe_call_insn(&new); in ftrace_make_call()
156 ftrace_generate_call_insn(&new, rec->ip); in ftrace_make_call()
161 s390_kernel_write((void *) rec->ip, &new, sizeof(new)); in ftrace_make_call()
Djump_label.c40 struct insn *new) in jump_label_bug() argument
44 unsigned char *ipn = (unsigned char *)new; in jump_label_bug()
62 struct insn old, new; in __jump_label_transform() local
66 jump_label_make_branch(entry, &new); in __jump_label_transform()
69 jump_label_make_nop(entry, &new); in __jump_label_transform()
73 jump_label_bug(entry, &orignop, &new); in __jump_label_transform()
76 jump_label_bug(entry, &old, &new); in __jump_label_transform()
78 s390_kernel_write((void *)entry->code, &new, sizeof(new)); in __jump_label_transform()
/linux-4.4.14/arch/x86/include/asm/
Dcmpxchg.h83 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument
87 __typeof__(*(ptr)) __new = (new); \
131 #define __cmpxchg(ptr, old, new, size) \ argument
132 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
134 #define __sync_cmpxchg(ptr, old, new, size) \ argument
135 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
137 #define __cmpxchg_local(ptr, old, new, size) \ argument
138 __raw_cmpxchg((ptr), (old), (new), (size), "")
146 #define cmpxchg(ptr, old, new) \ argument
147 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
[all …]
Dspinlock.h76 arch_spinlock_t old, new; in __ticket_check_and_clear_slowpath() local
79 new.tickets.head = head & ~TICKET_SLOWPATH_FLAG; in __ticket_check_and_clear_slowpath()
80 old.tickets.tail = new.tickets.head + TICKET_LOCK_INC; in __ticket_check_and_clear_slowpath()
81 new.tickets.tail = old.tickets.tail; in __ticket_check_and_clear_slowpath()
84 cmpxchg(&lock->head_tail, old.head_tail, new.head_tail); in __ticket_check_and_clear_slowpath()
133 arch_spinlock_t old, new; in arch_spin_trylock() local
139 new.head_tail = old.head_tail + (TICKET_LOCK_INC << TICKET_SHIFT); in arch_spin_trylock()
140 new.head_tail &= ~TICKET_SLOWPATH_FLAG; in arch_spin_trylock()
143 return cmpxchg(&lock->head_tail, old.head_tail, new.head_tail) == old.head_tail; in arch_spin_trylock()
Dcmpxchg_32.h46 static inline u64 __cmpxchg64(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64() argument
52 : "b" ((u32)new), in __cmpxchg64()
53 "c" ((u32)(new >> 32)), in __cmpxchg64()
59 static inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64_local() argument
65 : "b" ((u32)new), in __cmpxchg64_local()
66 "c" ((u32)(new >> 32)), in __cmpxchg64_local()
/linux-4.4.14/arch/xtensa/include/asm/
Dcmpxchg.h23 __cmpxchg_u32(volatile int *p, int old, int new) in __cmpxchg_u32() argument
29 : "+a" (new) in __cmpxchg_u32()
34 return new; in __cmpxchg_u32()
45 : "a" (p), "a" (old), "r" (new) in __cmpxchg_u32()
56 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
59 case 4: return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
76 unsigned long new, int size) in __cmpxchg_local() argument
80 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local()
82 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
/linux-4.4.14/drivers/char/agp/
Dgeneric.c103 struct agp_memory *new; in agp_create_user_memory() local
109 new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL); in agp_create_user_memory()
110 if (new == NULL) in agp_create_user_memory()
113 new->key = agp_get_key(); in agp_create_user_memory()
115 if (new->key < 0) { in agp_create_user_memory()
116 kfree(new); in agp_create_user_memory()
120 agp_alloc_page_array(alloc_size, new); in agp_create_user_memory()
122 if (new->pages == NULL) { in agp_create_user_memory()
123 agp_free_key(new->key); in agp_create_user_memory()
124 kfree(new); in agp_create_user_memory()
[all …]
Dintel-gtt.c240 struct agp_memory *new; in alloc_agpphysmem_i8xx() local
257 new = agp_create_memory(pg_count); in alloc_agpphysmem_i8xx()
258 if (new == NULL) in alloc_agpphysmem_i8xx()
261 new->pages[0] = page; in alloc_agpphysmem_i8xx()
264 new->pages[1] = new->pages[0] + 1; in alloc_agpphysmem_i8xx()
265 new->pages[2] = new->pages[1] + 1; in alloc_agpphysmem_i8xx()
266 new->pages[3] = new->pages[2] + 1; in alloc_agpphysmem_i8xx()
268 new->page_count = pg_count; in alloc_agpphysmem_i8xx()
269 new->num_scratch_pages = pg_count; in alloc_agpphysmem_i8xx()
270 new->type = AGP_PHYS_MEMORY; in alloc_agpphysmem_i8xx()
[all …]
/linux-4.4.14/include/linux/usb/
Dgadget_configfs.h52 struct struct_in *new; \
56 new = kzalloc(sizeof(*new), GFP_KERNEL); \
57 if (!new) \
60 ret = check_user_usb_string(name, &new->stringtab_dev); \
63 config_group_init_type_name(&new->group, name, \
69 if (gs->stringtab_dev.language == new->stringtab_dev.language) \
77 list_add_tail(&new->list, &gi->string_list); \
78 return &new->group; \
80 kfree(new); \
/linux-4.4.14/arch/m32r/include/asm/
Dcmpxchg.h111 __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) in __cmpxchg_u32() argument
129 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32()
142 unsigned int new) in __cmpxchg_local_u32() argument
160 : "r" (p), "r" (old), "r" (new) in __cmpxchg_local_u32()
176 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
180 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
183 return __cmpxchg_u64(ptr, old, new); in __cmpxchg()
198 unsigned long new, int size) in __cmpxchg_local() argument
202 return __cmpxchg_local_u32(ptr, old, new); in __cmpxchg_local()
204 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
/linux-4.4.14/arch/sh/drivers/
Dheartbeat.c38 unsigned int new; in heartbeat_toggle_bit() local
40 new = (1 << hd->bit_pos[bit]); in heartbeat_toggle_bit()
42 new = ~new; in heartbeat_toggle_bit()
44 new &= hd->mask; in heartbeat_toggle_bit()
48 new |= ioread32(hd->base) & ~hd->mask; in heartbeat_toggle_bit()
49 iowrite32(new, hd->base); in heartbeat_toggle_bit()
52 new |= ioread16(hd->base) & ~hd->mask; in heartbeat_toggle_bit()
53 iowrite16(new, hd->base); in heartbeat_toggle_bit()
56 new |= ioread8(hd->base) & ~hd->mask; in heartbeat_toggle_bit()
57 iowrite8(new, hd->base); in heartbeat_toggle_bit()
/linux-4.4.14/arch/sh/kernel/
Dftrace.c117 int new = old & ~MOD_CODE_WRITE_FLAG; in clear_mod_flag() local
119 if (old == new) in clear_mod_flag()
122 old = atomic_cmpxchg(&nmi_running, old, new); in clear_mod_flag()
244 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() local
247 new = ftrace_call_replace(ip, (unsigned long)func); in ftrace_update_ftrace_func()
249 return ftrace_modify_code(ip, old, new); in ftrace_update_ftrace_func()
255 unsigned char *new, *old; in ftrace_make_nop() local
259 new = ftrace_nop_replace(ip); in ftrace_make_nop()
261 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_nop()
266 unsigned char *new, *old; in ftrace_make_call() local
[all …]
/linux-4.4.14/arch/um/drivers/
Dxterm.c88 int pid, fd, new, err; in xterm_open() local
152 new = xterm_fd(fd, &data->helper_pid); in xterm_open()
153 if (new < 0) { in xterm_open()
154 err = new; in xterm_open()
160 err = os_set_fd_block(new, 0); in xterm_open()
167 CATCH_EINTR(err = tcgetattr(new, &data->tt)); in xterm_open()
169 new = err; in xterm_open()
174 err = raw(new); in xterm_open()
176 new = err; in xterm_open()
185 return new; in xterm_open()
[all …]
Dchan_kern.c501 struct chan *new; in parse_chan_pair() local
518 new = parse_chan(line, in, device, opts, error_out); in parse_chan_pair()
519 if (new == NULL) in parse_chan_pair()
522 new->input = 1; in parse_chan_pair()
523 list_add(&new->list, chans); in parse_chan_pair()
524 line->chan_in = new; in parse_chan_pair()
526 new = parse_chan(line, out, device, opts, error_out); in parse_chan_pair()
527 if (new == NULL) in parse_chan_pair()
530 list_add(&new->list, chans); in parse_chan_pair()
531 new->output = 1; in parse_chan_pair()
[all …]
Dport_user.c169 int new, err; in port_connection() local
174 new = accept(fd, NULL, 0); in port_connection()
175 if (new < 0) in port_connection()
183 { .sock_fd = new, in port_connection()
191 return new; in port_connection()
199 close(new); in port_connection()
/linux-4.4.14/arch/frv/include/asm/
Dcmpxchg.h80 extern uint64_t __cmpxchg_64(uint64_t test, uint64_t new, volatile uint64_t *v);
84 #define cmpxchg(ptr, test, new) \ argument
89 __typeof__(*(ptr)) __xg_new = (new); \
122 extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
124 #define cmpxchg(ptr, test, new) \ argument
129 __typeof__(*(ptr)) __xg_new = (new); \
151 unsigned long new, int size) in __cmpxchg_local() argument
155 return cmpxchg((unsigned long *)ptr, old, new); in __cmpxchg_local()
157 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
Datomic.h164 #define atomic_cmpxchg(v, old, new) (cmpxchg(&(v)->counter, old, new)) argument
165 #define atomic_xchg(v, new) (xchg(&(v)->counter, new)) argument
166 #define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter)) argument
167 #define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter)) argument
/linux-4.4.14/arch/avr32/kernel/
Dsetup.c81 struct resource *new; in resource_init() local
86 new = alloc_bootmem_low(sizeof(struct resource)); in resource_init()
87 memcpy(new, mem, sizeof(struct resource)); in resource_init()
89 new->sibling = NULL; in resource_init()
90 if (request_resource(&iomem_resource, new)) in resource_init()
96 new = alloc_bootmem_low(sizeof(struct resource)); in resource_init()
97 memcpy(new, res, sizeof(struct resource)); in resource_init()
99 new->sibling = NULL; in resource_init()
100 if (insert_resource(&iomem_resource, new)) in resource_init()
110 struct resource *new, *next, **pprev; in add_physical_memory() local
[all …]
/linux-4.4.14/arch/powerpc/kernel/
Dftrace.c45 ftrace_modify_code(unsigned long ip, unsigned int old, unsigned int new) in ftrace_modify_code() argument
68 if (patch_instruction((unsigned int *)ip, new)) in ftrace_modify_code()
245 unsigned int old, new; in ftrace_make_nop() local
255 new = PPC_INST_NOP; in ftrace_make_nop()
256 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
377 unsigned int old, new; in ftrace_make_call() local
387 new = ftrace_call_replace(ip, addr, 1); in ftrace_make_call()
388 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
412 unsigned int old, new; in ftrace_update_ftrace_func() local
416 new = ftrace_call_replace(ip, (unsigned long)func, 1); in ftrace_update_ftrace_func()
[all …]
Dprocess.c662 static inline void tm_recheckpoint_new_task(struct task_struct *new) in tm_recheckpoint_new_task() argument
677 if (!new->thread.regs) in tm_recheckpoint_new_task()
680 if (!MSR_TM_ACTIVE(new->thread.regs->msr)){ in tm_recheckpoint_new_task()
681 tm_restore_sprs(&new->thread); in tm_recheckpoint_new_task()
684 msr = new->thread.ckpt_regs.msr; in tm_recheckpoint_new_task()
688 new->pid, new->thread.regs->msr, msr); in tm_recheckpoint_new_task()
691 tm_recheckpoint(&new->thread, msr); in tm_recheckpoint_new_task()
695 do_load_up_transact_fpu(&new->thread); in tm_recheckpoint_new_task()
696 new->thread.regs->msr |= in tm_recheckpoint_new_task()
697 (MSR_FP | new->thread.fpexc_mode); in tm_recheckpoint_new_task()
[all …]
/linux-4.4.14/arch/powerpc/mm/
Dvphn.c41 u16 new = be16_to_cpup(field++); in vphn_unpack_associativity() local
48 cpu_to_be32(last << 16 | new); in vphn_unpack_associativity()
50 } else if (new == VPHN_FIELD_UNUSED) in vphn_unpack_associativity()
53 else if (new & VPHN_FIELD_MSB) { in vphn_unpack_associativity()
56 cpu_to_be32(new & VPHN_FIELD_MASK); in vphn_unpack_associativity()
61 last = new; in vphn_unpack_associativity()
Ddma-noncoherent.c101 struct ppc_vm_region *c, *new; in ppc_vm_region_alloc() local
103 new = kmalloc(sizeof(struct ppc_vm_region), gfp); in ppc_vm_region_alloc()
104 if (!new) in ppc_vm_region_alloc()
123 list_add_tail(&new->vm_list, &c->vm_list); in ppc_vm_region_alloc()
124 new->vm_start = addr; in ppc_vm_region_alloc()
125 new->vm_end = addr + size; in ppc_vm_region_alloc()
128 return new; in ppc_vm_region_alloc()
132 kfree(new); in ppc_vm_region_alloc()
/linux-4.4.14/tools/testing/selftests/powerpc/vphn/
Dvphn.c41 u16 new = be16_to_cpup(field++); in vphn_unpack_associativity() local
48 cpu_to_be32(last << 16 | new); in vphn_unpack_associativity()
50 } else if (new == VPHN_FIELD_UNUSED) in vphn_unpack_associativity()
53 else if (new & VPHN_FIELD_MSB) { in vphn_unpack_associativity()
56 cpu_to_be32(new & VPHN_FIELD_MASK); in vphn_unpack_associativity()
61 last = new; in vphn_unpack_associativity()
/linux-4.4.14/drivers/scsi/sym53c8xx_2/
Dsym_misc.h65 static inline void __sym_que_add(struct sym_quehead * new, in __sym_que_add() argument
69 flink->blink = new; in __sym_que_add()
70 new->flink = flink; in __sym_que_add()
71 new->blink = blink; in __sym_que_add()
72 blink->flink = new; in __sym_que_add()
126 #define sym_insque(new, pos) __sym_que_add(new, pos, (pos)->flink) argument
130 #define sym_insque_head(new, head) __sym_que_add(new, head, (head)->flink) argument
143 #define sym_insque_tail(new, head) __sym_que_add(new, (head)->blink, head) argument
/linux-4.4.14/arch/x86/um/
Dbugs_32.c24 struct sigaction old, new; in arch_check_bugs() local
27 new.sa_handler = cmov_sigill_test_handler; in arch_check_bugs()
30 new.sa_flags = SA_NODEFER; in arch_check_bugs()
31 sigemptyset(&new.sa_mask); in arch_check_bugs()
32 sigaction(SIGILL, &new, &old); in arch_check_bugs()
41 sigaction(SIGILL, &old, &new); in arch_check_bugs()
/linux-4.4.14/security/selinux/ss/
Debitmap.c51 struct ebitmap_node *n, *new, *prev; in ebitmap_cpy() local
57 new = kzalloc(sizeof(*new), GFP_ATOMIC); in ebitmap_cpy()
58 if (!new) { in ebitmap_cpy()
62 new->startbit = n->startbit; in ebitmap_cpy()
63 memcpy(new->maps, n->maps, EBITMAP_SIZE / 8); in ebitmap_cpy()
64 new->next = NULL; in ebitmap_cpy()
66 prev->next = new; in ebitmap_cpy()
68 dst->node = new; in ebitmap_cpy()
69 prev = new; in ebitmap_cpy()
258 struct ebitmap_node *n, *prev, *new; in ebitmap_set_bit() local
[all …]
/linux-4.4.14/arch/ia64/include/uapi/asm/
Dgcc_intrin.h307 #define ia64_cmpxchg1_acq(ptr, new, old) \ argument
312 "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \
316 #define ia64_cmpxchg1_rel(ptr, new, old) \ argument
321 "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \
325 #define ia64_cmpxchg2_acq(ptr, new, old) \ argument
330 "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \
334 #define ia64_cmpxchg2_rel(ptr, new, old) \ argument
340 "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \
344 #define ia64_cmpxchg4_acq(ptr, new, old) \ argument
349 "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \
[all …]
Dcmpxchg.h70 #define ia64_cmpxchg(sem, ptr, old, new, size) \ argument
92 _r_ = ia64_cmpxchg1_##sem((__u8 *) ptr, new, _o_); \
96 _r_ = ia64_cmpxchg2_##sem((__u16 *) ptr, new, _o_); \
100 _r_ = ia64_cmpxchg4_##sem((__u32 *) ptr, new, _o_); \
104 _r_ = ia64_cmpxchg8_##sem((__u64 *) ptr, new, _o_); \
/linux-4.4.14/arch/arm/include/asm/
Dcmpxchg.h156 unsigned long new, int size) in __cmpxchg() argument
172 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
184 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
197 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
218 unsigned long new, int size) in __cmpxchg_local() argument
226 ret = __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
230 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_local()
245 unsigned long long new) in __cmpxchg64() argument
262 : "r" (ptr), "r" (old), "r" (new) in __cmpxchg64()
Datomic.h83 static inline int atomic_cmpxchg_relaxed(atomic_t *ptr, int old, int new) in atomic_cmpxchg_relaxed() argument
97 : "r" (&ptr->counter), "Ir" (old), "r" (new) in atomic_cmpxchg_relaxed()
162 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
170 v->counter = new; in atomic_cmpxchg()
206 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
342 atomic64_cmpxchg_relaxed(atomic64_t *ptr, long long old, long long new) in ATOMIC64_OPS()
357 : "r" (&ptr->counter), "r" (old), "r" (new) in ATOMIC64_OPS()
365 static inline long long atomic64_xchg_relaxed(atomic64_t *ptr, long long new) in atomic64_xchg_relaxed() argument
378 : "r" (&ptr->counter), "r" (new) in atomic64_xchg_relaxed()
/linux-4.4.14/security/selinux/
Dnetif.c140 struct sel_netif *new = NULL; in sel_netif_sid_slow() local
161 new = kzalloc(sizeof(*new), GFP_ATOMIC); in sel_netif_sid_slow()
162 if (new == NULL) { in sel_netif_sid_slow()
166 ret = security_netif_sid(dev->name, &new->nsec.sid); in sel_netif_sid_slow()
169 new->nsec.ns = ns; in sel_netif_sid_slow()
170 new->nsec.ifindex = ifindex; in sel_netif_sid_slow()
171 ret = sel_netif_insert(new); in sel_netif_sid_slow()
174 *sid = new->nsec.sid; in sel_netif_sid_slow()
184 kfree(new); in sel_netif_sid_slow()
Dnetport.c152 struct sel_netport *new = NULL; in sel_netport_sid_slow() local
161 new = kzalloc(sizeof(*new), GFP_ATOMIC); in sel_netport_sid_slow()
162 if (new == NULL) in sel_netport_sid_slow()
168 new->psec.port = pnum; in sel_netport_sid_slow()
169 new->psec.protocol = protocol; in sel_netport_sid_slow()
170 new->psec.sid = *sid; in sel_netport_sid_slow()
171 sel_netport_insert(new); in sel_netport_sid_slow()
179 kfree(new); in sel_netport_sid_slow()
Dnetnode.c204 struct sel_netnode *new = NULL; in sel_netnode_sid_slow() local
213 new = kzalloc(sizeof(*new), GFP_ATOMIC); in sel_netnode_sid_slow()
214 if (new == NULL) in sel_netnode_sid_slow()
220 new->nsec.addr.ipv4 = *(__be32 *)addr; in sel_netnode_sid_slow()
225 new->nsec.addr.ipv6 = *(struct in6_addr *)addr; in sel_netnode_sid_slow()
234 new->nsec.family = family; in sel_netnode_sid_slow()
235 new->nsec.sid = *sid; in sel_netnode_sid_slow()
236 sel_netnode_insert(new); in sel_netnode_sid_slow()
244 kfree(new); in sel_netnode_sid_slow()
/linux-4.4.14/arch/mips/include/asm/
Dcmpxchg.h141 #define __cmpxchg_asm(ld, st, m, old, new) \ argument
160 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \
177 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \
185 *m = new; \
198 #define __cmpxchg(ptr, old, new, pre_barrier, post_barrier) \ argument
202 __typeof__(*(ptr)) __new = (new); \
227 #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_mb__before_llsc(), smp_llsc_mb()) argument
228 #define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, old, new, , ) argument
/linux-4.4.14/drivers/iommu/
Diova.c61 unsigned long limit_pfn, struct iova *new) in __cached_rbnode_insert_update() argument
65 iovad->cached32_node = &new->node; in __cached_rbnode_insert_update()
103 struct iova *new, bool size_aligned) in __alloc_and_insert_iova_range() argument
145 new->pfn_lo = limit_pfn - (size + pad_size) + 1; in __alloc_and_insert_iova_range()
146 new->pfn_hi = new->pfn_lo + size - 1; in __alloc_and_insert_iova_range()
166 if (new->pfn_lo < this->pfn_lo) in __alloc_and_insert_iova_range()
168 else if (new->pfn_lo > this->pfn_lo) in __alloc_and_insert_iova_range()
175 rb_link_node(&new->node, parent, entry); in __alloc_and_insert_iova_range()
176 rb_insert_color(&new->node, &iovad->rbroot); in __alloc_and_insert_iova_range()
178 __cached_rbnode_insert_update(iovad, saved_pfn, new); in __alloc_and_insert_iova_range()
[all …]
/linux-4.4.14/net/netfilter/
Dnf_conntrack_extend.c75 struct nf_ct_ext *old, *new; in __nf_ct_ext_add_length() local
97 new = __krealloc(old, newlen, gfp); in __nf_ct_ext_add_length()
98 if (!new) in __nf_ct_ext_add_length()
101 if (new != old) { in __nf_ct_ext_add_length()
109 t->move((void *)new + new->offset[i], in __nf_ct_ext_add_length()
114 ct->ext = new; in __nf_ct_ext_add_length()
117 new->offset[id] = newoff; in __nf_ct_ext_add_length()
118 new->len = newlen; in __nf_ct_ext_add_length()
119 memset((void *)new + newoff, 0, newlen - newoff); in __nf_ct_ext_add_length()
120 return (void *)new + newoff; in __nf_ct_ext_add_length()
Dnf_conntrack_ecache.c171 struct nf_ct_event_notifier *new) in nf_conntrack_register_notifier() argument
183 rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new); in nf_conntrack_register_notifier()
193 struct nf_ct_event_notifier *new) in nf_conntrack_unregister_notifier() argument
200 BUG_ON(notify != new); in nf_conntrack_unregister_notifier()
207 struct nf_exp_event_notifier *new) in nf_ct_expect_register_notifier() argument
219 rcu_assign_pointer(net->ct.nf_expect_event_cb, new); in nf_ct_expect_register_notifier()
229 struct nf_exp_event_notifier *new) in nf_ct_expect_unregister_notifier() argument
236 BUG_ON(notify != new); in nf_ct_expect_unregister_notifier()
/linux-4.4.14/arch/alpha/kernel/
Derr_common.c279 cdl_register_subpacket_annotation(struct el_subpacket_annotation *new) in cdl_register_subpacket_annotation() argument
283 if (a == NULL) subpacket_annotation_list = new; in cdl_register_subpacket_annotation()
286 if ((a->class == new->class && a->type == new->type) || in cdl_register_subpacket_annotation()
287 a == new) { in cdl_register_subpacket_annotation()
293 a->next = new; in cdl_register_subpacket_annotation()
295 new->next = NULL; in cdl_register_subpacket_annotation()
301 cdl_register_subpacket_handler(struct el_subpacket_handler *new) in cdl_register_subpacket_handler() argument
305 if (h == NULL) subpacket_handler_list = new; in cdl_register_subpacket_handler()
308 if (h->class == new->class || h == new) { in cdl_register_subpacket_handler()
314 h->next = new; in cdl_register_subpacket_handler()
[all …]
/linux-4.4.14/drivers/dma/
Dmmp_pdma.c449 struct mmp_pdma_desc_sw *first = NULL, *prev = NULL, *new; in mmp_pdma_prep_memcpy() local
469 new = mmp_pdma_alloc_descriptor(chan); in mmp_pdma_prep_memcpy()
470 if (!new) { in mmp_pdma_prep_memcpy()
479 new->desc.dcmd = chan->dcmd | (DCMD_LENGTH & copy); in mmp_pdma_prep_memcpy()
480 new->desc.dsadr = dma_src; in mmp_pdma_prep_memcpy()
481 new->desc.dtadr = dma_dst; in mmp_pdma_prep_memcpy()
484 first = new; in mmp_pdma_prep_memcpy()
486 prev->desc.ddadr = new->async_tx.phys; in mmp_pdma_prep_memcpy()
488 new->async_tx.cookie = 0; in mmp_pdma_prep_memcpy()
489 async_tx_ack(&new->async_tx); in mmp_pdma_prep_memcpy()
[all …]
Dfsldma.c769 struct fsl_desc_sw *first = NULL, *prev = NULL, *new; in fsl_dma_prep_memcpy() local
783 new = fsl_dma_alloc_descriptor(chan); in fsl_dma_prep_memcpy()
784 if (!new) { in fsl_dma_prep_memcpy()
791 set_desc_cnt(chan, &new->hw, copy); in fsl_dma_prep_memcpy()
792 set_desc_src(chan, &new->hw, dma_src); in fsl_dma_prep_memcpy()
793 set_desc_dst(chan, &new->hw, dma_dst); in fsl_dma_prep_memcpy()
796 first = new; in fsl_dma_prep_memcpy()
798 set_desc_next(chan, &prev->hw, new->async_tx.phys); in fsl_dma_prep_memcpy()
800 new->async_tx.cookie = 0; in fsl_dma_prep_memcpy()
801 async_tx_ack(&new->async_tx); in fsl_dma_prep_memcpy()
[all …]
Dxgene-dma.c901 struct xgene_dma_desc_sw *first = NULL, *new = NULL; in xgene_dma_prep_sg() local
936 new = xgene_dma_alloc_descriptor(chan); in xgene_dma_prep_sg()
937 if (!new) in xgene_dma_prep_sg()
941 xgene_dma_prep_cpy_desc(chan, new, dst, src, len); in xgene_dma_prep_sg()
944 first = new; in xgene_dma_prep_sg()
946 new->tx.cookie = 0; in xgene_dma_prep_sg()
947 async_tx_ack(&new->tx); in xgene_dma_prep_sg()
954 list_add_tail(&new->node, &first->tx_list); in xgene_dma_prep_sg()
988 if (!new) in xgene_dma_prep_sg()
991 new->tx.flags = flags; /* client is in control of this ack */ in xgene_dma_prep_sg()
[all …]
/linux-4.4.14/net/dccp/ccids/lib/
Dloss_interval.c142 struct tfrc_loss_interval *cur = tfrc_lh_peek(lh), *new; in tfrc_lh_interval_add() local
147 new = tfrc_lh_demand_next(lh); in tfrc_lh_interval_add()
148 if (unlikely(new == NULL)) { in tfrc_lh_interval_add()
153 new->li_seqno = tfrc_rx_hist_loss_prev(rh)->tfrchrx_seqno; in tfrc_lh_interval_add()
154 new->li_ccval = tfrc_rx_hist_loss_prev(rh)->tfrchrx_ccval; in tfrc_lh_interval_add()
155 new->li_is_closed = 0; in tfrc_lh_interval_add()
158 lh->i_mean = new->li_length = (*calc_first_li)(sk); in tfrc_lh_interval_add()
160 cur->li_length = dccp_delta_seqno(cur->li_seqno, new->li_seqno); in tfrc_lh_interval_add()
161 new->li_length = dccp_delta_seqno(new->li_seqno, in tfrc_lh_interval_add()
/linux-4.4.14/tools/include/linux/
Drbtree_augmented.h43 void (*copy)(struct rb_node *old, struct rb_node *new);
44 void (*rotate)(struct rb_node *old, struct rb_node *new);
48 void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
84 rbstruct *new = rb_entry(rb_new, rbstruct, rbfield); \
85 new->rbaugmented = old->rbaugmented; \
91 rbstruct *new = rb_entry(rb_new, rbstruct, rbfield); \
92 new->rbaugmented = old->rbaugmented; \
124 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() argument
129 parent->rb_left = new; in __rb_change_child()
131 parent->rb_right = new; in __rb_change_child()
[all …]
/linux-4.4.14/drivers/gpu/drm/
Ddrm_lock.c180 unsigned int old, new, prev; in drm_lock_take() local
187 new = old | _DRM_LOCK_CONT; in drm_lock_take()
189 new = context | _DRM_LOCK_HELD | in drm_lock_take()
193 prev = cmpxchg(lock, old, new); in drm_lock_take()
207 if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) { in drm_lock_take()
229 unsigned int old, new, prev; in drm_lock_transfer() local
235 new = context | _DRM_LOCK_HELD; in drm_lock_transfer()
236 prev = cmpxchg(lock, old, new); in drm_lock_transfer()
254 unsigned int old, new, prev; in drm_legacy_lock_free() local
268 new = _DRM_LOCKING_CONTEXT(old); in drm_legacy_lock_free()
[all …]
Ddrm_vma_manager.c298 struct drm_vma_offset_file *new, *entry; in drm_vma_node_allow() local
305 new = kmalloc(sizeof(*entry), GFP_KERNEL); in drm_vma_node_allow()
325 if (!new) { in drm_vma_node_allow()
330 new->vm_filp = filp; in drm_vma_node_allow()
331 new->vm_count = 1; in drm_vma_node_allow()
332 rb_link_node(&new->vm_rb, parent, iter); in drm_vma_node_allow()
333 rb_insert_color(&new->vm_rb, &node->vm_files); in drm_vma_node_allow()
334 new = NULL; in drm_vma_node_allow()
338 kfree(new); in drm_vma_node_allow()
/linux-4.4.14/tools/usb/usbip/libsrc/
Dlist.h39 static inline void __list_add(struct list_head *new, in __list_add() argument
43 next->prev = new; in __list_add()
44 new->next = next; in __list_add()
45 new->prev = prev; in __list_add()
46 prev->next = new; in __list_add()
57 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
59 __list_add(new, head, head->next); in list_add()
/linux-4.4.14/scripts/
Dbloat-o-meter32 new = getsizes(sys.argv[2]) variable
37 if a in new:
46 for name in new:
49 up += new[name]
50 delta.append((new[name], name))
53 d = new.get(name, 0) - old.get(name, 0)
65 if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d))
Dstackdelta50 my $new = read_stack_usage_file($ARGV[1]);
51 my @common = sort grep {exists $new->{$_}} keys %$old;
54 my $y = $new->{$_}{size};
/linux-4.4.14/arch/frv/mb93090-mb00/
Dpci-dma-nommu.c39 struct dma_alloc_record *new; in dma_alloc_coherent() local
50 new = kmalloc(sizeof (*new), GFP_ATOMIC); in dma_alloc_coherent()
51 if (!new) in dma_alloc_coherent()
55 new->len = (size + 31) & ~31; in dma_alloc_coherent()
74 new->ofs = start; in dma_alloc_coherent()
75 list_add_tail(&new->list, this); in dma_alloc_coherent()
82 kfree(new); in dma_alloc_coherent()
/linux-4.4.14/fs/xfs/
Dxfs_extent_busy.c42 struct xfs_extent_busy *new; in xfs_extent_busy_insert() local
48 new = kmem_zalloc(sizeof(struct xfs_extent_busy), KM_MAYFAIL); in xfs_extent_busy_insert()
49 if (!new) { in xfs_extent_busy_insert()
60 new->agno = agno; in xfs_extent_busy_insert()
61 new->bno = bno; in xfs_extent_busy_insert()
62 new->length = len; in xfs_extent_busy_insert()
63 INIT_LIST_HEAD(&new->list); in xfs_extent_busy_insert()
64 new->flags = flags; in xfs_extent_busy_insert()
69 pag = xfs_perag_get(tp->t_mountp, new->agno); in xfs_extent_busy_insert()
76 if (new->bno < busyp->bno) { in xfs_extent_busy_insert()
[all …]
Dkmem.c99 void *new; in kmem_realloc() local
101 new = kmem_alloc(newsize, flags); in kmem_realloc()
103 if (new) in kmem_realloc()
104 memcpy(new, ptr, in kmem_realloc()
108 return new; in kmem_realloc()
/linux-4.4.14/arch/blackfin/include/asm/
Dcmpxchg.h18 unsigned long new, unsigned long old);
20 unsigned long new, unsigned long old);
22 unsigned long new, unsigned long old);
50 unsigned long new, int size) in __cmpxchg() argument
56 tmp = __raw_cmpxchg_1_asm(ptr, new, old); in __cmpxchg()
59 tmp = __raw_cmpxchg_2_asm(ptr, new, old); in __cmpxchg()
62 tmp = __raw_cmpxchg_4_asm(ptr, new, old); in __cmpxchg()
/linux-4.4.14/arch/arc/include/asm/
Dcmpxchg.h20 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) in __cmpxchg() argument
39 "r"(new) /* can't be "ir". scond can't take LIMM for "b" */ in __cmpxchg()
50 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) in __cmpxchg() argument
62 *p = new; in __cmpxchg()
159 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
/linux-4.4.14/net/sched/
Dcls_cgroup.c78 struct cls_cgroup_head *new; in cls_cgroup_change() local
92 new = kzalloc(sizeof(*head), GFP_KERNEL); in cls_cgroup_change()
93 if (!new) in cls_cgroup_change()
96 tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE); in cls_cgroup_change()
97 new->handle = handle; in cls_cgroup_change()
98 new->tp = tp; in cls_cgroup_change()
115 tcf_exts_change(tp, &new->exts, &e); in cls_cgroup_change()
116 tcf_em_tree_change(tp, &new->ematches, &t); in cls_cgroup_change()
118 rcu_assign_pointer(tp->root, new); in cls_cgroup_change()
123 kfree(new); in cls_cgroup_change()
Dcls_u32.c679 struct tc_u_knode *new; in u32_init_knode() local
682 new = kzalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), in u32_init_knode()
685 if (!new) in u32_init_knode()
688 RCU_INIT_POINTER(new->next, n->next); in u32_init_knode()
689 new->handle = n->handle; in u32_init_knode()
690 RCU_INIT_POINTER(new->ht_up, n->ht_up); in u32_init_knode()
693 new->ifindex = n->ifindex; in u32_init_knode()
695 new->fshift = n->fshift; in u32_init_knode()
696 new->res = n->res; in u32_init_knode()
697 RCU_INIT_POINTER(new->ht_down, n->ht_down); in u32_init_knode()
[all …]
/linux-4.4.14/arch/hexagon/mm/
Dcopy_user_template.S33 if (!p0.new) jump:nt .Ldone
40 if (!p0.new) jump:nt .Loop_not_aligned_8
66 if (p0.new) jump:nt .Lalign
70 if (!p0.new) jump:nt .Loop_not_aligned_4
96 if (!p0.new) jump:nt .Loop_not_aligned
139 if (p0.new) jump:nt .Loop_not_aligned
150 if (p0.new) w_dbuf = memub(src)
162 if (p0.new) w_dbuf = memuh(src)
174 if (p0.new) w_dbuf = memw(src)
Dstrnlen_user.S55 if (P0.new) jump:t dw_loop; /* fire up the oven */
64 if (P0.new) jump:nt exit_found;
97 if (!P0.new) jump:nt exit_found;
98 if (!P0.new) start = add(obo,tmp1);
109 if (P0.new) jump:nt exit_error; /* neverfound! */
/linux-4.4.14/arch/x86/pci/
Dmmconfig-shared.c51 static void list_add_sorted(struct pci_mmcfg_region *new) in list_add_sorted() argument
57 if (cfg->segment > new->segment || in list_add_sorted()
58 (cfg->segment == new->segment && in list_add_sorted()
59 cfg->start_bus >= new->start_bus)) { in list_add_sorted()
60 list_add_tail_rcu(&new->list, &cfg->list); in list_add_sorted()
64 list_add_tail_rcu(&new->list, &pci_mmcfg_list); in list_add_sorted()
70 struct pci_mmcfg_region *new; in pci_mmconfig_alloc() local
76 new = kzalloc(sizeof(*new), GFP_KERNEL); in pci_mmconfig_alloc()
77 if (!new) in pci_mmconfig_alloc()
80 new->address = addr; in pci_mmconfig_alloc()
[all …]
/linux-4.4.14/arch/mips/kernel/
Dftrace.c194 unsigned int new; in ftrace_make_nop() local
201 new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; in ftrace_make_nop()
203 return ftrace_modify_code(ip, new); in ftrace_make_nop()
212 return ftrace_modify_code_2(ip, new, INSN_NOP); in ftrace_make_nop()
218 unsigned int new; in ftrace_make_call() local
221 new = in_kernel_space(ip) ? insn_jal_ftrace_caller : insn_la_mcount[0]; in ftrace_make_call()
224 return ftrace_modify_code(ip, new); in ftrace_make_call()
226 return ftrace_modify_code_2r(ip, new, in_kernel_space(ip) ? in ftrace_make_call()
235 unsigned int new; in ftrace_update_ftrace_func() local
237 new = INSN_JAL((unsigned long)func); in ftrace_update_ftrace_func()
[all …]
Dsyscall.c99 static inline int mips_atomic_set(unsigned long addr, unsigned long new) in mips_atomic_set() argument
134 [new] "r" (new), in mips_atomic_set()
164 [new] "r" (new), in mips_atomic_set()
175 err |= __put_user(new, (unsigned int *) addr); in mips_atomic_set()
/linux-4.4.14/fs/fat/
Dcache.c117 struct fat_cache_id *new) in fat_cache_merge() argument
123 if (p->fcluster == new->fcluster) { in fat_cache_merge()
124 BUG_ON(p->dcluster != new->dcluster); in fat_cache_merge()
125 if (new->nr_contig > p->nr_contig) in fat_cache_merge()
126 p->nr_contig = new->nr_contig; in fat_cache_merge()
133 static void fat_cache_add(struct inode *inode, struct fat_cache_id *new) in fat_cache_add() argument
137 if (new->fcluster == -1) /* dummy cache */ in fat_cache_add()
141 if (new->id != FAT_CACHE_VALID && in fat_cache_add()
142 new->id != MSDOS_I(inode)->cache_valid_id) in fat_cache_add()
145 cache = fat_cache_merge(inode, new); in fat_cache_add()
[all …]
/linux-4.4.14/net/x25/
Dx25_facilities.c271 struct x25_facilities *new, struct x25_dte_facilities *dte) in x25_negotiate_facilities() argument
279 memcpy(new, ours, sizeof(*new)); in x25_negotiate_facilities()
294 new->reverse = theirs.reverse; in x25_negotiate_facilities()
303 new->throughput = (new->throughput & 0xf0) | theirs_in; in x25_negotiate_facilities()
308 new->throughput = (new->throughput & 0x0f) | theirs_out; in x25_negotiate_facilities()
315 new->pacsize_in = theirs.pacsize_in; in x25_negotiate_facilities()
319 new->pacsize_out = theirs.pacsize_out; in x25_negotiate_facilities()
326 new->winsize_in = theirs.winsize_in; in x25_negotiate_facilities()
330 new->winsize_out = theirs.winsize_out; in x25_negotiate_facilities()
/linux-4.4.14/virt/kvm/
Dirqchip.c174 struct kvm_irq_routing_table *new, *old; in kvm_set_irq_routing() local
186 new = kzalloc(sizeof(*new) + (nr_rt_entries * sizeof(struct hlist_head)), in kvm_set_irq_routing()
189 if (!new) in kvm_set_irq_routing()
192 new->nr_rt_entries = nr_rt_entries; in kvm_set_irq_routing()
195 new->chip[i][j] = -1; in kvm_set_irq_routing()
210 r = setup_routing_entry(new, e, ue); in kvm_set_irq_routing()
220 rcu_assign_pointer(kvm->irq_routing, new); in kvm_set_irq_routing()
228 new = old; in kvm_set_irq_routing()
232 free_irq_routing_table(new); in kvm_set_irq_routing()
/linux-4.4.14/arch/hexagon/include/asm/
Datomic.h33 static inline void atomic_set(atomic_t *v, int new) in atomic_set() argument
40 : "r" (&v->counter), "r" (new) in atomic_set()
58 #define atomic_xchg(v, new) (xchg(&((v)->counter), (new))) argument
78 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
90 : "r" (&v->counter), "r" (old), "r" (new) in atomic_cmpxchg()
/linux-4.4.14/arch/arm/plat-samsung/
Dpm-gpio.c133 u32 gpcon, old, new, mask; in samsung_gpio_pm_2bit_resume() local
147 new = (gps_gpcon & mask) >> nr; in samsung_gpio_pm_2bit_resume()
151 if (old == new) in samsung_gpio_pm_2bit_resume()
156 if (is_sfn(old) && is_sfn(new)) in samsung_gpio_pm_2bit_resume()
161 if (is_in(old) && is_out(new)) in samsung_gpio_pm_2bit_resume()
166 if (is_sfn(old) && is_out(new)) in samsung_gpio_pm_2bit_resume()
210 u32 old, new, mask; in samsung_gpio_pm_4bit_mask() local
216 new = (gps_gpcon & mask) >> nr; in samsung_gpio_pm_4bit_mask()
220 if (old == new) in samsung_gpio_pm_4bit_mask()
225 if (is_sfn(old) && is_sfn(new)) in samsung_gpio_pm_4bit_mask()
[all …]
/linux-4.4.14/fs/pstore/
Dram_core.c54 int new; in buffer_start_add_atomic() local
58 new = old + a; in buffer_start_add_atomic()
59 while (unlikely(new >= prz->buffer_size)) in buffer_start_add_atomic()
60 new -= prz->buffer_size; in buffer_start_add_atomic()
61 } while (atomic_cmpxchg(&prz->buffer->start, old, new) != old); in buffer_start_add_atomic()
70 size_t new; in buffer_size_add_atomic() local
77 new = old + a; in buffer_size_add_atomic()
78 if (new > prz->buffer_size) in buffer_size_add_atomic()
79 new = prz->buffer_size; in buffer_size_add_atomic()
80 } while (atomic_cmpxchg(&prz->buffer->size, old, new) != old); in buffer_size_add_atomic()
[all …]
/linux-4.4.14/arch/um/include/asm/
Dmmu_context.h38 static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) in activate_mm() argument
44 __switch_mm(&new->context.id); in activate_mm()
45 down_write(&new->mmap_sem); in activate_mm()
46 uml_setup_stubs(new); in activate_mm()
47 up_write(&new->mmap_sem); in activate_mm()
/linux-4.4.14/arch/powerpc/platforms/pseries/
Dreconfig.c176 struct property *new = kzalloc(sizeof(*new), GFP_KERNEL); in new_property() local
178 if (!new) in new_property()
181 if (!(new->name = kstrdup(name, GFP_KERNEL))) in new_property()
183 if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) in new_property()
186 memcpy(new->value, value, length); in new_property()
187 *(((char *)new->value) + length) = 0; in new_property()
188 new->length = length; in new_property()
189 new->next = last; in new_property()
190 return new; in new_property()
193 kfree(new->name); in new_property()
[all …]
/linux-4.4.14/kernel/locking/
Dqspinlock.c207 u32 old, new, val = atomic_read(&lock->val); in xchg_tail() local
210 new = (val & _Q_LOCKED_PENDING_MASK) | tail; in xchg_tail()
211 old = atomic_cmpxchg(&lock->val, val, new); in xchg_tail()
284 u32 new, old, tail; in queued_spin_lock_slowpath() local
318 new = _Q_LOCKED_VAL; in queued_spin_lock_slowpath()
319 if (val == new) in queued_spin_lock_slowpath()
320 new |= _Q_PENDING_VAL; in queued_spin_lock_slowpath()
322 old = atomic_cmpxchg(&lock->val, val, new); in queued_spin_lock_slowpath()
332 if (new == _Q_LOCKED_VAL) in queued_spin_lock_slowpath()
/linux-4.4.14/net/6lowpan/
Dnhc.c26 struct rb_node **new = &rb_root.rb_node, *parent = NULL; in lowpan_nhc_insert() local
29 while (*new) { in lowpan_nhc_insert()
30 struct lowpan_nhc *this = container_of(*new, struct lowpan_nhc, in lowpan_nhc_insert()
45 parent = *new; in lowpan_nhc_insert()
47 new = &((*new)->rb_left); in lowpan_nhc_insert()
49 new = &((*new)->rb_right); in lowpan_nhc_insert()
55 rb_link_node(&nhc->node, parent, new); in lowpan_nhc_insert()
/linux-4.4.14/tools/lib/
Drbtree.c62 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument
66 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents()
67 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents()
68 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
73 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() argument
202 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() argument
364 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() argument
377 static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {} in dummy_copy() argument
378 static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} in dummy_rotate() argument
405 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() argument
[all …]
/linux-4.4.14/fs/xfs/libxfs/
Dxfs_bmap.c576 xfs_bmap_free_item_t *new; /* new element */ in xfs_bmap_add_free() local
594 new = kmem_zone_alloc(xfs_bmap_free_item_zone, KM_SLEEP); in xfs_bmap_add_free()
595 new->xbfi_startblock = bno; in xfs_bmap_add_free()
596 new->xbfi_blockcount = (xfs_extlen_t)len; in xfs_bmap_add_free()
604 prev->xbfi_next = new; in xfs_bmap_add_free()
606 flist->xbf_first = new; in xfs_bmap_add_free()
607 new->xbfi_next = cur; in xfs_bmap_add_free()
1710 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real() local
1733 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_delay_real()
1748 new_endoff = new->br_startoff + new->br_blockcount; in xfs_bmap_add_extent_delay_real()
[all …]
/linux-4.4.14/drivers/gpu/drm/radeon/
Dmkregtable.c63 static inline void __list_add(struct list_head *new, in __list_add() argument
66 next->prev = new; in __list_add()
67 new->next = next; in __list_add()
68 new->prev = prev; in __list_add()
69 prev->next = new; in __list_add()
72 extern void __list_add(struct list_head *new,
84 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
86 __list_add(new, head, head->next); in list_add()
97 static inline void list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
99 __list_add(new, head->prev, head); in list_add_tail()
[all …]
/linux-4.4.14/drivers/input/joystick/iforce/
Diforce-ff.c202 struct ff_effect *new) in need_condition_modifier() argument
207 if (new->type != FF_SPRING && new->type != FF_FRICTION) { in need_condition_modifier()
214 ret |= old->u.condition[i].right_saturation != new->u.condition[i].right_saturation in need_condition_modifier()
215 || old->u.condition[i].left_saturation != new->u.condition[i].left_saturation in need_condition_modifier()
216 || old->u.condition[i].right_coeff != new->u.condition[i].right_coeff in need_condition_modifier()
217 || old->u.condition[i].left_coeff != new->u.condition[i].left_coeff in need_condition_modifier()
218 || old->u.condition[i].deadband != new->u.condition[i].deadband in need_condition_modifier()
219 || old->u.condition[i].center != new->u.condition[i].center; in need_condition_modifier()
278 struct ff_effect *new) in need_period_modifier() argument
280 if (new->type != FF_PERIODIC) { in need_period_modifier()
[all …]
/linux-4.4.14/arch/sparc/lib/
Datomic32.c64 int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
71 v->counter = new; in atomic_xchg()
77 int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
85 v->counter = new; in atomic_cmpxchg()
156 unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) in __cmpxchg_u32() argument
163 *ptr = new; in __cmpxchg_u32()
170 unsigned long __xchg_u32(volatile u32 *ptr, u32 new) in __xchg_u32() argument
177 *ptr = new; in __xchg_u32()
/linux-4.4.14/net/sunrpc/
Dauth.c328 struct rpc_cred_cache *new; in rpcauth_init_credcache() local
331 new = kmalloc(sizeof(*new), GFP_KERNEL); in rpcauth_init_credcache()
332 if (!new) in rpcauth_init_credcache()
334 new->hashbits = auth_hashbits; in rpcauth_init_credcache()
335 hashsize = 1U << new->hashbits; in rpcauth_init_credcache()
336 new->hashtable = kcalloc(hashsize, sizeof(new->hashtable[0]), GFP_KERNEL); in rpcauth_init_credcache()
337 if (!new->hashtable) in rpcauth_init_credcache()
339 spin_lock_init(&new->lock); in rpcauth_init_credcache()
340 auth->au_credcache = new; in rpcauth_init_credcache()
343 kfree(new); in rpcauth_init_credcache()
[all …]
Dsvcauth_unix.c51 struct unix_domain *new = NULL; in unix_domain_find() local
56 if (new && rv != &new->h) in unix_domain_find()
57 svcauth_unix_domain_release(&new->h); in unix_domain_find()
66 new = kmalloc(sizeof(*new), GFP_KERNEL); in unix_domain_find()
67 if (new == NULL) in unix_domain_find()
69 kref_init(&new->h.ref); in unix_domain_find()
70 new->h.name = kstrdup(name, GFP_KERNEL); in unix_domain_find()
71 if (new->h.name == NULL) { in unix_domain_find()
72 kfree(new); in unix_domain_find()
75 new->h.flavour = &svcauth_unix; in unix_domain_find()
[all …]
/linux-4.4.14/arch/powerpc/oprofile/cell/
Dvma_map.c72 struct vma_to_fileoffset_map *new = in vma_map_add() local
74 if (!new) { in vma_map_add()
81 new->next = map; in vma_map_add()
82 new->vma = vma; in vma_map_add()
83 new->size = size; in vma_map_add()
84 new->offset = offset; in vma_map_add()
85 new->guard_ptr = guard_ptr; in vma_map_add()
86 new->guard_val = guard_val; in vma_map_add()
88 return new; in vma_map_add()
/linux-4.4.14/arch/mips/txx9/generic/
Dpci.c123 } *new = NULL; in txx9_alloc_pci_controller() local
127 new = kzalloc(sizeof(*new), GFP_KERNEL); in txx9_alloc_pci_controller()
128 if (!new) in txx9_alloc_pci_controller()
130 new->r_mem[0].name = "PCI mem"; in txx9_alloc_pci_controller()
131 new->r_mem[1].name = "PCI mmio"; in txx9_alloc_pci_controller()
132 new->r_io.name = "PCI io"; in txx9_alloc_pci_controller()
133 new->c.mem_resource = new->r_mem; in txx9_alloc_pci_controller()
134 new->c.io_resource = &new->r_io; in txx9_alloc_pci_controller()
135 pcic = &new->c; in txx9_alloc_pci_controller()
225 kfree(new); in txx9_alloc_pci_controller()
/linux-4.4.14/tools/perf/scripts/python/
Dsched-migration.py80 def __init__(self, new): argument
81 self.new = new
84 return "task migrated in %s" % thread_name(self.new)
131 def __migrate_in(self, new, event): argument
132 if new in self.tasks:
135 next_tasks = self.tasks[:] + tuple([new])
139 def migrate_in(self, new): argument
140 return self.__migrate_in(new, RunqueueMigrateIn(new))
142 def wake_up(self, new): argument
143 return self.__migrate_in(new, RunqueueEventWakeup(new))
[all …]
/linux-4.4.14/net/sunrpc/auth_gss/
Dsvcauth_gss.c81 static struct rsi *rsi_update(struct cache_detail *cd, struct rsi *new, struct rsi *old);
129 struct rsi *new = container_of(cnew, struct rsi, h); in rsi_init() local
132 new->out_handle.data = NULL; in rsi_init()
133 new->out_handle.len = 0; in rsi_init()
134 new->out_token.data = NULL; in rsi_init()
135 new->out_token.len = 0; in rsi_init()
136 new->in_handle.len = item->in_handle.len; in rsi_init()
138 new->in_token.len = item->in_token.len; in rsi_init()
140 new->in_handle.data = item->in_handle.data; in rsi_init()
142 new->in_token.data = item->in_token.data; in rsi_init()
[all …]
/linux-4.4.14/drivers/ide/
Dns87415.c126 unsigned int bit, other, new, *old = (unsigned int *) hwif->select_data; in ns87415_prepare_drive() local
130 new = *old; in ns87415_prepare_drive()
136 new &= ~bit; in ns87415_prepare_drive()
138 new |= bit; in ns87415_prepare_drive()
143 new = use_dma ? ((new & ~other) | bit) : (new & ~bit); in ns87415_prepare_drive()
145 if (new != *old) { in ns87415_prepare_drive()
158 *old = new; in ns87415_prepare_drive()
159 (void) pci_write_config_dword(dev, 0x40, new); in ns87415_prepare_drive()
/linux-4.4.14/drivers/pci/pcie/aer/
Daerdrv.h83 enum pci_ers_result new) in merge_result() argument
85 if (new == PCI_ERS_RESULT_NO_AER_DRIVER) in merge_result()
88 if (new == PCI_ERS_RESULT_NONE) in merge_result()
94 orig = new; in merge_result()
97 if (new == PCI_ERS_RESULT_NEED_RESET) in merge_result()
/linux-4.4.14/net/sctp/
Dauth.c96 struct sctp_shared_key *new; in sctp_auth_shkey_create() local
99 new = kzalloc(sizeof(struct sctp_shared_key), gfp); in sctp_auth_shkey_create()
100 if (!new) in sctp_auth_shkey_create()
103 INIT_LIST_HEAD(&new->key_list); in sctp_auth_shkey_create()
104 new->key_id = key_id; in sctp_auth_shkey_create()
106 return new; in sctp_auth_shkey_create()
193 struct sctp_auth_bytes *new; in sctp_auth_make_key_vector() local
205 new = sctp_auth_create_key(len, gfp); in sctp_auth_make_key_vector()
206 if (!new) in sctp_auth_make_key_vector()
209 memcpy(new->data, random, random_len); in sctp_auth_make_key_vector()
[all …]
/linux-4.4.14/sound/soc/
Dsoc-io.c68 unsigned int old, new; in snd_soc_component_update_bits_legacy() local
80 new = (old & ~mask) | (val & mask); in snd_soc_component_update_bits_legacy()
81 *change = old != new; in snd_soc_component_update_bits_legacy()
83 ret = component->write(component, reg, new); in snd_soc_component_update_bits_legacy()
185 unsigned int old, new; in snd_soc_component_test_bits() local
191 new = (old & ~mask) | value; in snd_soc_component_test_bits()
192 return old != new; in snd_soc_component_test_bits()
/linux-4.4.14/arch/arm/xen/
Dp2m.c31 static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) in xen_add_phys_to_mach_entry() argument
42 if (new->pfn == entry->pfn) in xen_add_phys_to_mach_entry()
45 if (new->pfn < entry->pfn) in xen_add_phys_to_mach_entry()
50 rb_link_node(&new->rbnode_phys, parent, link); in xen_add_phys_to_mach_entry()
51 rb_insert_color(&new->rbnode_phys, &phys_to_mach); in xen_add_phys_to_mach_entry()
57 __func__, &new->pfn, &new->mfn, &entry->pfn, &entry->mfn); in xen_add_phys_to_mach_entry()
/linux-4.4.14/fs/nfs/
Ddns_resolve.c73 struct nfs_dns_ent *new; in nfs_dns_ent_update() local
76 new = container_of(cnew, struct nfs_dns_ent, h); in nfs_dns_ent_update()
79 memcpy(&new->addr, &key->addr, key->addrlen); in nfs_dns_ent_update()
80 new->addrlen = key->addrlen; in nfs_dns_ent_update()
86 struct nfs_dns_ent *new; in nfs_dns_ent_init() local
89 new = container_of(cnew, struct nfs_dns_ent, h); in nfs_dns_ent_init()
92 kfree(new->hostname); in nfs_dns_ent_init()
93 new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL); in nfs_dns_ent_init()
94 if (new->hostname) { in nfs_dns_ent_init()
95 new->namelen = key->namelen; in nfs_dns_ent_init()
[all …]
Dnfs4client.c75 struct nfs4_ds_server *new) in nfs4_add_ds_client() argument
85 if (new) in nfs4_add_ds_client()
86 list_add_rcu(&new->list, &ds_clp->cl_ds_clients); in nfs4_add_ds_client()
87 dss = new; in nfs4_add_ds_client()
127 struct nfs4_ds_server *dss, *new; in nfs4_find_or_create_ds_client() local
133 new = nfs4_alloc_ds_server(ds_clp, flavor); in nfs4_find_or_create_ds_client()
134 if (IS_ERR(new)) in nfs4_find_or_create_ds_client()
135 return ERR_CAST(new); in nfs4_find_or_create_ds_client()
136 dss = nfs4_add_ds_client(ds_clp, flavor, new); in nfs4_find_or_create_ds_client()
137 if (dss != new) in nfs4_find_or_create_ds_client()
[all …]
Dnfs4super.c174 struct nfs_referral_count *p, *new; in nfs_referral_loop_protect() local
177 new = kmalloc(sizeof(*new), GFP_KERNEL); in nfs_referral_loop_protect()
178 if (!new) in nfs_referral_loop_protect()
180 new->task = current; in nfs_referral_loop_protect()
181 new->referral_count = 1; in nfs_referral_loop_protect()
192 list_add(&new->list, &nfs_referral_count_list); in nfs_referral_loop_protect()
193 new = NULL; in nfs_referral_loop_protect()
196 kfree(new); in nfs_referral_loop_protect()
Dread.c91 struct nfs_page *new; in nfs_readpage_async() local
99 new = nfs_create_request(ctx, page, NULL, 0, len); in nfs_readpage_async()
100 if (IS_ERR(new)) { in nfs_readpage_async()
102 return PTR_ERR(new); in nfs_readpage_async()
109 nfs_pageio_add_request(&pgio, new); in nfs_readpage_async()
349 struct nfs_page *new; in readpage_async_filler() local
357 new = nfs_create_request(desc->ctx, page, NULL, 0, len); in readpage_async_filler()
358 if (IS_ERR(new)) in readpage_async_filler()
363 if (!nfs_pageio_add_request(desc->pgio, new)) { in readpage_async_filler()
369 error = PTR_ERR(new); in readpage_async_filler()
/linux-4.4.14/Documentation/RCU/
DarrayRCU.txt58 new ipc_id_ary, copies the old to the new portion of the new, initializes
59 the remainder of the new, updates the ids->entries pointer to point to
60 the new array, and invokes ipc_rcu_putref() to free up the old array.
67 struct ipc_id_ary* new;
77 new = ipc_rcu_alloc(sizeof(struct kern_ipc_perm *)*newsize +
79 if(new == NULL)
81 new->size = newsize;
82 memcpy(new->p, ids->entries->p,
86 new->p[i] = NULL;
92 * contents of the new array are visible before the new
[all …]
/linux-4.4.14/drivers/hid/usbhid/
Dusbkbd.c102 unsigned char *new; member
131 input_report_key(kbd->dev, usb_kbd_keycode[i + 224], (kbd->new[0] >> i) & 1); in usb_kbd_irq()
135 if (kbd->old[i] > 3 && memscan(kbd->new + 2, kbd->old[i], 6) == kbd->new + 8) { in usb_kbd_irq()
144 if (kbd->new[i] > 3 && memscan(kbd->old + 2, kbd->new[i], 6) == kbd->old + 8) { in usb_kbd_irq()
145 if (usb_kbd_keycode[kbd->new[i]]) in usb_kbd_irq()
146 input_report_key(kbd->dev, usb_kbd_keycode[kbd->new[i]], 1); in usb_kbd_irq()
150 kbd->new[i]); in usb_kbd_irq()
156 memcpy(kbd->old, kbd->new, 8); in usb_kbd_irq()
255 if (!(kbd->new = usb_alloc_coherent(dev, 8, GFP_ATOMIC, &kbd->new_dma))) in usb_kbd_alloc_mem()
269 usb_free_coherent(dev, 8, kbd->new, kbd->new_dma); in usb_kbd_free_mem()
[all …]
/linux-4.4.14/drivers/message/fusion/lsi/
Dmpi_history.txt47 * 12-04-00 01.01.02 Added new function codes.
81 * Added new function codes and new IOCStatus codes.
95 * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target.
148 * 06-26-03 01.02.08 Added new values to the product family defines.
152 * 08-19-04 01.05.01 Added four new fields to MSG_IOC_INIT.
153 * Added three new fields to MSG_IOC_FACTS_REPLY.
154 * Defined four new bits for the IOCCapabilities field of
156 * Added two new PortTypes for the PortFacts reply.
157 * Added six new events along with their EventData
159 * Added a new MsgFlag to the FwDownload request to
[all …]
/linux-4.4.14/drivers/net/irda/
Dsir_dongle.c32 int irda_register_dongle(struct dongle_driver *new) in irda_register_dongle() argument
38 __func__, new->driver_name, new->type); in irda_register_dongle()
43 if (new->type == drv->type) { in irda_register_dongle()
48 list_add(&new->dongle_list, &dongle_list); in irda_register_dongle()
/linux-4.4.14/arch/hexagon/lib/
Dmemset.S177 if (p0.new) jump:nt .L3
192 if (!p0.new) jump:nt .L8
204 if (!p0.new) jump:nt .L10
210 if (p0.new) jump:nt .L1
215 if (!p0.new) jump:nt .L12
221 if (p0.new) jump:nt .L1
226 if (!p0.new) jump:nt .L14
266 if (!p0.new) jump:nt .L28
279 if (!p0.new) jump:nt .L33
288 if (!p0.new) jump:nt .L35
/linux-4.4.14/net/irda/
Ddiscovery.c60 void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *new) in irlmp_add_discovery() argument
66 new->firststamp = new->timestamp; in irlmp_add_discovery()
83 if ((node->data.saddr == new->data.saddr) && in irlmp_add_discovery()
84 ((node->data.daddr == new->data.daddr) || in irlmp_add_discovery()
85 (strcmp(node->data.info, new->data.info) == 0))) in irlmp_add_discovery()
92 if (get_unaligned((__u16 *)node->data.hints) == get_unaligned((__u16 *)new->data.hints)) in irlmp_add_discovery()
94 new->firststamp = node->firststamp; in irlmp_add_discovery()
100 hashbin_insert(cachelog, (irda_queue_t *) new, new->data.daddr, NULL); in irlmp_add_discovery()
/linux-4.4.14/drivers/target/
Dtarget_core_device.c303 target_luns_data_has_changed(struct se_node_acl *nacl, struct se_dev_entry *new, in target_luns_data_has_changed() argument
310 if (skip_new && tmp == new) in target_luns_data_has_changed()
326 struct se_dev_entry *orig, *new; in core_enable_device_list_for_node() local
328 new = kzalloc(sizeof(*new), GFP_KERNEL); in core_enable_device_list_for_node()
329 if (!new) { in core_enable_device_list_for_node()
334 atomic_set(&new->ua_count, 0); in core_enable_device_list_for_node()
335 spin_lock_init(&new->ua_lock); in core_enable_device_list_for_node()
336 INIT_LIST_HEAD(&new->ua_list); in core_enable_device_list_for_node()
337 INIT_LIST_HEAD(&new->lun_link); in core_enable_device_list_for_node()
339 new->mapped_lun = mapped_lun; in core_enable_device_list_for_node()
[all …]
/linux-4.4.14/drivers/dma/sh/
Dshdma-base.c510 struct shdma_desc *new; in shdma_add_desc() local
517 new = shdma_get_desc(schan); in shdma_add_desc()
518 if (!new) { in shdma_add_desc()
523 ops->desc_setup(schan, new, *src, *dst, &copy_size); in shdma_add_desc()
527 new->async_tx.cookie = -EBUSY; in shdma_add_desc()
528 *first = new; in shdma_add_desc()
531 new->async_tx.cookie = -EINVAL; in shdma_add_desc()
536 copy_size, *len, src, dst, &new->async_tx, in shdma_add_desc()
537 new->async_tx.cookie); in shdma_add_desc()
539 new->mark = DESC_PREPARED; in shdma_add_desc()
[all …]
/linux-4.4.14/Documentation/zh_CN/arm/
Dkernel_user_helpers.txt168 int old, new;
172 new = old + val;
173 } while(__kuser_cmpxchg(old, new, ptr));
175 return new;
266 int64_t old, new;
270 new = old + val;
271 } while(__kuser_cmpxchg64(&old, &new, ptr));
273 return new;
/linux-4.4.14/fs/jffs2/
Dnodelist.c26 void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full… in jffs2_add_fd_to_list() argument
30 dbg_dentlist("add dirent \"%s\", ino #%u\n", new->name, new->ino); in jffs2_add_fd_to_list()
32 while ((*prev) && (*prev)->nhash <= new->nhash) { in jffs2_add_fd_to_list()
33 if ((*prev)->nhash == new->nhash && !strcmp((*prev)->name, new->name)) { in jffs2_add_fd_to_list()
35 if (new->version < (*prev)->version) { in jffs2_add_fd_to_list()
38 jffs2_mark_node_obsolete(c, new->raw); in jffs2_add_fd_to_list()
39 jffs2_free_full_dirent(new); in jffs2_add_fd_to_list()
43 new->next = (*prev)->next; in jffs2_add_fd_to_list()
49 *prev = new; in jffs2_add_fd_to_list()
55 new->next = *prev; in jffs2_add_fd_to_list()
[all …]
/linux-4.4.14/arch/x86/kernel/cpu/mcheck/
Dmce_amd.c208 static int setup_APIC_mce_threshold(int reserved, int new) in setup_APIC_mce_threshold() argument
210 if (reserved < 0 && !setup_APIC_eilvt(new, THRESHOLD_APIC_VECTOR, in setup_APIC_mce_threshold()
212 return new; in setup_APIC_mce_threshold()
217 static int setup_APIC_deferred_error(int reserved, int new) in setup_APIC_deferred_error() argument
219 if (reserved < 0 && !setup_APIC_eilvt(new, DEFERRED_ERROR_VECTOR, in setup_APIC_deferred_error()
221 return new; in setup_APIC_deferred_error()
257 int offset = -1, new; in mce_amd_feature_init() local
296 new = (high & MASK_LVTOFF_HI) >> 20; in mce_amd_feature_init()
297 offset = setup_APIC_mce_threshold(offset, new); in mce_amd_feature_init()
299 if ((offset == new) && in mce_amd_feature_init()
[all …]
/linux-4.4.14/arch/ia64/kernel/
Dftrace.c165 char *new; in ftrace_make_nop() local
170 new = ftrace_nop_replace(); in ftrace_make_nop()
171 return ftrace_modify_code(rec->ip, NULL, new, 0); in ftrace_make_nop()
177 unsigned char *old, *new; in ftrace_make_call() local
180 new = ftrace_call_replace(ip, addr); in ftrace_make_call()
181 return ftrace_modify_code(ip, old, new, 1); in ftrace_make_call()
/linux-4.4.14/Documentation/vm/
Dpage_migration15 a new memory policy via mbind(). The pages of process can also be relocated
30 nearer to the new processor. The kernel itself does only provide
43 a new cpuset then also all its pages are moved with it so that the
74 how to allocate the correct new page given the old page.
78 the new page for each page that is considered for
95 3. Lock the new page that we want to move to. It is locked so that accesses to
112 8. The new page is prepped with some settings from the old page so that
113 accesses to the new page will discover a page with the correct settings.
115 9. The radix tree is changed to point to the new page.
118 reference is gone. A reference to the new page is established because
[all …]
/linux-4.4.14/Documentation/
Dadding-syscalls.txt4 This document describes what's involved in adding a new system call to the
12 The first thing to consider when adding a new system call is whether one of
19 object, it may make more sense to create a new filesystem or device. This
20 also makes it easier to encapsulate the new functionality in a kernel module
22 - If the new functionality involves operations where the kernel notifies
23 userspace that something has happened, then returning a new file
29 - If you're just exposing runtime system information, a new node in sysfs
38 this option is best for when the new function is closely analogous to
39 existing fcntl(2) functionality, or the new functionality is very simple
51 A new system call forms part of the API of the kernel, and has to be supported
[all …]
Drbtree.txt56 Creating a new rbtree
107 new node, then inserting the node and rebalancing ("recoloring") the tree.
110 location of the pointer on which to graft the new node. The new node also
117 struct rb_node **new = &(root->rb_node), *parent = NULL;
119 /* Figure out where to put new node */
120 while (*new) {
121 struct mytype *this = container_of(*new, struct mytype, node);
124 parent = *new;
126 new = &((*new)->rb_left);
128 new = &((*new)->rb_right);
[all …]
/linux-4.4.14/arch/mn10300/include/asm/
Dcmpxchg.h40 unsigned long old, unsigned long new) in __cmpxchg() argument
57 "r"(old), "r"(new) in __cmpxchg()
91 unsigned long old, unsigned long new) in __cmpxchg() argument
99 *m = new; in __cmpxchg()
/linux-4.4.14/arch/m68k/sun3/
Dmmu_emu.c246 unsigned long new = 1; in get_free_context() local
251 new = next_to_die; in get_free_context()
252 clear_context(new); in get_free_context()
257 while(new < CONTEXTS_NUM) { in get_free_context()
258 if(ctx_alloc[new]) in get_free_context()
259 new++; in get_free_context()
264 if(new == CONTEXTS_NUM) in get_free_context()
268 ctx_alloc[new] = mm; in get_free_context()
271 return new; in get_free_context()
/linux-4.4.14/kernel/trace/
Dtrace_stat.c78 struct rb_node **new = &(root->rb_node), *parent = NULL; in insert_stat() local
90 while (*new) { in insert_stat()
94 this = container_of(*new, struct stat_node, node); in insert_stat()
97 parent = *new; in insert_stat()
99 new = &((*new)->rb_left); in insert_stat()
101 new = &((*new)->rb_right); in insert_stat()
104 rb_link_node(&data->node, parent, new); in insert_stat()
/linux-4.4.14/scripts/dtc/libfdt/
Dfdt_rw.c154 char *new; in _fdt_find_add_string() local
163 new = strtab + fdt_size_dt_strings(fdt); in _fdt_find_add_string()
168 memcpy(new, s, len); in _fdt_find_add_string()
169 return (new - strtab); in _fdt_find_add_string()
394 static void _fdt_packblocks(const char *old, char *new, in _fdt_packblocks() argument
403 memmove(new + mem_rsv_off, old + fdt_off_mem_rsvmap(old), mem_rsv_size); in _fdt_packblocks()
404 fdt_set_off_mem_rsvmap(new, mem_rsv_off); in _fdt_packblocks()
406 memmove(new + struct_off, old + fdt_off_dt_struct(old), struct_size); in _fdt_packblocks()
407 fdt_set_off_dt_struct(new, struct_off); in _fdt_packblocks()
408 fdt_set_size_dt_struct(new, struct_size); in _fdt_packblocks()
[all …]
/linux-4.4.14/arch/parisc/lib/
Dbitops.c59 unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
66 *ptr = new; in __cmpxchg_u64()
72 unsigned long __cmpxchg_u32(volatile unsigned int *ptr, unsigned int old, unsigned int new) in __cmpxchg_u32() argument
79 *ptr = new; in __cmpxchg_u32()
/linux-4.4.14/arch/x86/mm/
Dpat_rbtree.c191 int rbt_memtype_check_insert(struct memtype *new, in rbt_memtype_check_insert() argument
196 err = memtype_rb_check_conflict(&memtype_rbroot, new->start, new->end, in rbt_memtype_check_insert()
197 new->type, ret_type); in rbt_memtype_check_insert()
201 new->type = *ret_type; in rbt_memtype_check_insert()
203 new->subtree_max_end = new->end; in rbt_memtype_check_insert()
204 memtype_rb_insert(&memtype_rbroot, new); in rbt_memtype_check_insert()
/linux-4.4.14/Documentation/security/
DIMA-templates.txt16 a new template is defined, the functions that generate and display
17 the measurements list would include the code for handling a new format
22 definition of two new data structures: a template descriptor, to determine
27 a new data type, developers define the field identifier and implement
29 measurement entries. Defining a new template descriptor requires
37 (new function defined within the patches for the new template management
38 mechanism) to generate a new measurement entry by using the template
41 It is during this phase that the advantages of the new architecture are
57 ('<identifier>': description), that can be used to define new template
87 - register a new template descriptor with custom format through the kernel
Dkeys-trusted-encrypted.txt3 Trusted and Encrypted Keys are two new key types added to the existing kernel
4 key ring service. Both of these new types are variable length symmetric keys,
14 integrity verifications match. A loaded Trusted Key can be updated with new
15 (future) PCR values, so keys are easily migrated to new pcr values, such as
24 keyctl add trusted name "new keylen [options]" ring
39 migratable= 0|1 indicating permission to reseal to new PCR values,
43 TPM_STORED_DATA format. The key length for new keys are always in bytes.
61 keyctl add encrypted name "new [format] key-type:master-key-name keylen"
74 $ keyctl add trusted kmk "new 32" @u
110 Reseal a trusted key under new pcr values:
[all …]
/linux-4.4.14/tools/build/feature/
Dtest-sync-compare-and-swap.c7 uint64_t old, new = argc; in main() local
12 } while (!__sync_bool_compare_and_swap(&x, old, new)); in main()
13 return old == new; in main()
/linux-4.4.14/net/core/
Dnetprio_cgroup.c39 struct netprio_map *old, *new; in extend_netdev_table() local
55 sizeof(new->priomap[0]); in extend_netdev_table()
65 new = kzalloc(new_sz, GFP_KERNEL); in extend_netdev_table()
66 if (!new) in extend_netdev_table()
70 memcpy(new->priomap, old->priomap, in extend_netdev_table()
73 new->priomap_len = new_len; in extend_netdev_table()
76 rcu_assign_pointer(dev->priomap, new); in extend_netdev_table()
/linux-4.4.14/arch/m68k/include/asm/
Dcmpxchg.h95 unsigned long new, int size) in __cmpxchg() argument
101 : "d" (new), "0" (old), "m" (*(char *)p)); in __cmpxchg()
106 : "d" (new), "0" (old), "m" (*(short *)p)); in __cmpxchg()
111 : "d" (new), "0" (old), "m" (*(int *)p)); in __cmpxchg()
114 old = __invalid_cmpxchg_size(p, old, new, size); in __cmpxchg()
Datomic.h125 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
129 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
137 atomic_set(v, new); in atomic_cmpxchg()
142 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
149 atomic_set(v, new); in atomic_xchg()
/linux-4.4.14/drivers/pci/
Dsetup-res.c34 u32 new, check, mask; in pci_update_resource() local
64 new = region.start | (res->flags & PCI_REGION_FLAG_MASK); in pci_update_resource()
76 new |= PCI_ROM_ADDRESS_ENABLE; in pci_update_resource()
91 pci_write_config_dword(dev, reg, new); in pci_update_resource()
94 if ((new ^ check) & mask) { in pci_update_resource()
96 resno, new, check); in pci_update_resource()
100 new = region.start >> 16 >> 16; in pci_update_resource()
101 pci_write_config_dword(dev, reg + 4, new); in pci_update_resource()
103 if (check != new) { in pci_update_resource()
105 resno, new, check); in pci_update_resource()
/linux-4.4.14/drivers/acpi/
Dacpi_memhotplug.c87 struct acpi_memory_info *info, *new; in acpi_memory_get_resource() local
105 new = kzalloc(sizeof(struct acpi_memory_info), GFP_KERNEL); in acpi_memory_get_resource()
106 if (!new) in acpi_memory_get_resource()
109 INIT_LIST_HEAD(&new->list); in acpi_memory_get_resource()
110 new->caching = address64.info.mem.caching; in acpi_memory_get_resource()
111 new->write_protect = address64.info.mem.write_protect; in acpi_memory_get_resource()
112 new->start_addr = address64.address.minimum; in acpi_memory_get_resource()
113 new->length = address64.address.address_length; in acpi_memory_get_resource()
114 list_add_tail(&new->list, &mem_device->res_list); in acpi_memory_get_resource()
/linux-4.4.14/net/dccp/
Dfeat.c395 struct dccp_feat_entry *new; in dccp_feat_clone_entry() local
401 new = kmemdup(original, sizeof(struct dccp_feat_entry), gfp_any()); in dccp_feat_clone_entry()
402 if (new == NULL) in dccp_feat_clone_entry()
405 if (type == FEAT_SP && dccp_feat_clone_sp_val(&new->val, in dccp_feat_clone_entry()
408 kfree(new); in dccp_feat_clone_entry()
411 return new; in dccp_feat_clone_entry()
487 struct dccp_feat_entry *new = dccp_feat_entry_new(fn_list, feat, local); in dccp_feat_push_change() local
489 if (new == NULL) in dccp_feat_push_change()
492 new->feat_num = feat; in dccp_feat_push_change()
493 new->is_local = local; in dccp_feat_push_change()
[all …]
/linux-4.4.14/drivers/watchdog/
Dmachzwd.c151 static inline void zf_set_status(unsigned char new) in zf_set_status() argument
153 zf_writeb(STATUS, new); in zf_set_status()
164 static inline void zf_set_control(unsigned short new) in zf_set_control() argument
166 zf_writew(CONTROL, new); in zf_set_control()
175 static inline void zf_set_timer(unsigned short new, unsigned char n) in zf_set_timer() argument
179 zf_writew(COUNTER_1, new); in zf_set_timer()
181 zf_writeb(COUNTER_2, new > 0xff ? 0xff : new); in zf_set_timer()
/linux-4.4.14/fs/ocfs2/
Duptodate.c320 struct ocfs2_meta_cache_item *new) in __ocfs2_insert_cache_tree() argument
322 sector_t block = new->c_block; in __ocfs2_insert_cache_tree()
348 rb_link_node(&new->c_node, parent, p); in __ocfs2_insert_cache_tree()
349 rb_insert_color(&new->c_node, &ci->ci_cache.ci_tree); in __ocfs2_insert_cache_tree()
405 struct ocfs2_meta_cache_item *new = NULL; in __ocfs2_set_buffer_uptodate() local
413 new = kmem_cache_alloc(ocfs2_uptodate_cachep, GFP_NOFS); in __ocfs2_set_buffer_uptodate()
414 if (!new) { in __ocfs2_set_buffer_uptodate()
418 new->c_block = block; in __ocfs2_set_buffer_uptodate()
447 __ocfs2_insert_cache_tree(ci, new); in __ocfs2_set_buffer_uptodate()
450 new = NULL; in __ocfs2_set_buffer_uptodate()
[all …]
/linux-4.4.14/fs/overlayfs/
Ddir.c482 struct dentry *new) in ovl_link() argument
496 err = ovl_create_or_link(new, upper->d_inode->i_mode, 0, NULL, upper); in ovl_link()
704 struct inode *newdir, struct dentry *new, in ovl_rename2() argument
742 if (new->d_inode) { in ovl_rename2()
743 err = ovl_check_sticky(new); in ovl_rename2()
747 if (d_is_dir(new)) in ovl_rename2()
750 new_type = ovl_path_type(new); in ovl_rename2()
758 ovl_dentry_lower(new)->d_inode) in ovl_rename2()
763 ovl_dentry_upper(new)->d_inode) in ovl_rename2()
767 if (ovl_dentry_is_opaque(new)) in ovl_rename2()
[all …]
/linux-4.4.14/drivers/gpu/drm/nouveau/nvif/
Dobject.c237 struct nvif_ioctl_new_v0 new; in nvif_object_init() member
255 args->new.version = 0; in nvif_object_init()
256 args->new.route = parent->client->route; in nvif_object_init()
257 args->new.token = nvif_handle(object); in nvif_object_init()
258 args->new.object = nvif_handle(object); in nvif_object_init()
259 args->new.handle = handle; in nvif_object_init()
260 args->new.oclass = oclass; in nvif_object_init()
262 memcpy(args->new.data, data, size); in nvif_object_init()
265 memcpy(data, args->new.data, size); in nvif_object_init()
/linux-4.4.14/fs/ext4/
Dnamei.c1217 struct dx_entry *old = frame->at, *new = old + 1; in dx_insert_block() local
1222 memmove(new + 1, new, (char *)(entries + count) - (char *)(new)); in dx_insert_block()
1223 dx_set_hash(new, hash); in dx_insert_block()
1224 dx_set_block(new, block); in dx_insert_block()
3483 struct ext4_renament new = { in ext4_rename() local
3497 retval = dquot_initialize(new.dir); in ext4_rename()
3503 if (new.inode) { in ext4_rename()
3504 retval = dquot_initialize(new.inode); in ext4_rename()
3522 if ((old.dir != new.dir) && in ext4_rename()
3523 ext4_encrypted_inode(new.dir) && in ext4_rename()
[all …]
/linux-4.4.14/include/trace/events/
Dkvm.h362 TP_PROTO(bool grow, unsigned int vcpu_id, int new, int old),
363 TP_ARGS(grow, vcpu_id, new, old),
368 __field(int, new)
375 __entry->new = new;
381 __entry->new,
386 #define trace_kvm_halt_poll_ns_grow(vcpu_id, new, old) \ argument
387 trace_kvm_halt_poll_ns(true, vcpu_id, new, old)
388 #define trace_kvm_halt_poll_ns_shrink(vcpu_id, new, old) \ argument
389 trace_kvm_halt_poll_ns(false, vcpu_id, new, old)
/linux-4.4.14/ipc/
Dutil.c220 int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size) in ipc_addid() argument
235 spin_lock_init(&new->lock); in ipc_addid()
236 new->deleted = false; in ipc_addid()
238 spin_lock(&new->lock); in ipc_addid()
241 new->cuid = new->uid = euid; in ipc_addid()
242 new->gid = new->cgid = egid; in ipc_addid()
244 id = idr_alloc(&ids->ipcs_idr, new, in ipc_addid()
249 spin_unlock(&new->lock); in ipc_addid()
257 new->seq = ids->seq++; in ipc_addid()
261 new->seq = ipcid_to_seqx(next_id); in ipc_addid()
[all …]
/linux-4.4.14/tools/testing/ktest/examples/include/
Dmin-config.conf49 OUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
57 OUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min
59 MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
/linux-4.4.14/arch/s390/kvm/
Dgaccess.c271 union ipte_control old, new, *ic; in ipte_lock_simple() local
284 new = old; in ipte_lock_simple()
285 new.k = 1; in ipte_lock_simple()
286 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_lock_simple()
293 union ipte_control old, new, *ic; in ipte_unlock_simple() local
302 new = old; in ipte_unlock_simple()
303 new.k = 0; in ipte_unlock_simple()
304 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_unlock_simple()
312 union ipte_control old, new, *ic; in ipte_lock_siif() local
321 new = old; in ipte_lock_siif()
[all …]
/linux-4.4.14/drivers/xen/
Dxen-acpi-memhotplug.c109 struct acpi_memory_info *info, *new; in acpi_memory_get_resource() local
126 new = kzalloc(sizeof(struct acpi_memory_info), GFP_KERNEL); in acpi_memory_get_resource()
127 if (!new) in acpi_memory_get_resource()
130 INIT_LIST_HEAD(&new->list); in acpi_memory_get_resource()
131 new->caching = address64.info.mem.caching; in acpi_memory_get_resource()
132 new->write_protect = address64.info.mem.write_protect; in acpi_memory_get_resource()
133 new->start_addr = address64.address.minimum; in acpi_memory_get_resource()
134 new->length = address64.address.address_length; in acpi_memory_get_resource()
135 list_add_tail(&new->list, &mem_device->res_list); in acpi_memory_get_resource()
/linux-4.4.14/arch/metag/include/asm/
Datomic_lnkget.h85 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in ATOMIC_OPS()
102 : "da" (&v->counter), "bd" (old), "da" (new) in ATOMIC_OPS()
110 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
122 : "da" (&v->counter), "da" (new) in atomic_xchg()
/linux-4.4.14/drivers/media/common/
Dcx2341x.c1035 #define NEQ(field) (old->field != new->field)
1039 const struct cx2341x_mpeg_params *new) in cx2341x_update() argument
1052 u16 temporal = new->video_temporal_filter; in cx2341x_update()
1054 cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 2, new->port, 0); in cx2341x_update()
1058 new->is_50hz); in cx2341x_update()
1063 u16 w = new->width; in cx2341x_update()
1064 u16 h = new->height; in cx2341x_update()
1066 if (new->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) { in cx2341x_update()
1076 mpeg_stream_type[new->stream_type]); in cx2341x_update()
1081 1 + new->video_aspect); in cx2341x_update()
[all …]
/linux-4.4.14/drivers/of/
Ddynamic.c366 struct property *new; in __of_prop_dup() local
368 new = kzalloc(sizeof(*new), allocflags); in __of_prop_dup()
369 if (!new) in __of_prop_dup()
378 new->name = kstrdup(prop->name, allocflags); in __of_prop_dup()
379 new->value = kmemdup(prop->value, prop->length, allocflags); in __of_prop_dup()
380 new->length = prop->length; in __of_prop_dup()
381 if (!new->name || !new->value) in __of_prop_dup()
385 of_property_set_flag(new, OF_DYNAMIC); in __of_prop_dup()
387 return new; in __of_prop_dup()
390 kfree(new->name); in __of_prop_dup()
[all …]
/linux-4.4.14/drivers/scsi/fcoe/
Dfcoe_ctlr.c169 static int fcoe_sysfs_fcf_add(struct fcoe_fcf *new) in fcoe_sysfs_fcf_add() argument
171 struct fcoe_ctlr *fip = new->fip; in fcoe_sysfs_fcf_add()
177 new->fabric_name, new->fcf_mac); in fcoe_sysfs_fcf_add()
183 temp->fabric_name = new->fabric_name; in fcoe_sysfs_fcf_add()
184 temp->switch_name = new->switch_name; in fcoe_sysfs_fcf_add()
185 temp->fc_map = new->fc_map; in fcoe_sysfs_fcf_add()
186 temp->vfid = new->vfid; in fcoe_sysfs_fcf_add()
187 memcpy(temp->mac, new->fcf_mac, ETH_ALEN); in fcoe_sysfs_fcf_add()
188 temp->priority = new->pri; in fcoe_sysfs_fcf_add()
189 temp->fka_period = new->fka_period; in fcoe_sysfs_fcf_add()
[all …]
/linux-4.4.14/fs/nilfs2/
Dthe_nilfs.c748 struct nilfs_root *root, *new; in nilfs_find_or_create_root() local
755 new = kzalloc(sizeof(*root), GFP_KERNEL); in nilfs_find_or_create_root()
756 if (!new) in nilfs_find_or_create_root()
775 kfree(new); in nilfs_find_or_create_root()
780 new->cno = cno; in nilfs_find_or_create_root()
781 new->ifile = NULL; in nilfs_find_or_create_root()
782 new->nilfs = nilfs; in nilfs_find_or_create_root()
783 atomic_set(&new->count, 1); in nilfs_find_or_create_root()
784 atomic64_set(&new->inodes_count, 0); in nilfs_find_or_create_root()
785 atomic64_set(&new->blocks_count, 0); in nilfs_find_or_create_root()
[all …]

12345678910