Home
last modified time | relevance | path

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

12345678910

/linux-4.1.27/kernel/
Dcred.c203 struct cred *new; in cred_alloc_blank() local
205 new = kmem_cache_zalloc(cred_jar, GFP_KERNEL); in cred_alloc_blank()
206 if (!new) in cred_alloc_blank()
209 atomic_set(&new->usage, 1); in cred_alloc_blank()
211 new->magic = CRED_MAGIC; in cred_alloc_blank()
214 if (security_cred_alloc_blank(new, GFP_KERNEL) < 0) in cred_alloc_blank()
217 return new; in cred_alloc_blank()
220 abort_creds(new); in cred_alloc_blank()
242 struct cred *new; in prepare_creds() local
246 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
113 new = allocate_probes(nr_probes + 2); in func_add()
114 if (new == NULL) in func_add()
117 memcpy(new, old, nr_probes * sizeof(struct tracepoint_func)); in func_add()
118 new[nr_probes] = *tp_func; in func_add()
119 new[nr_probes + 1].func = NULL; in func_add()
120 *funcs = new; in func_add()
129 struct tracepoint_func *old, *new; in func_remove() local
159 new = allocate_probes(nr_probes - nr_del + 1); in func_remove()
160 if (new == NULL) in func_remove()
[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.c219 struct cred *new; in ____call_usermodehelper() local
236 new = prepare_kernel_cred(current); in ____call_usermodehelper()
237 if (!new) in ____call_usermodehelper()
241 new->cap_bset = cap_intersect(usermodehelper_bset, new->cap_bset); in ____call_usermodehelper()
242 new->cap_inheritable = cap_intersect(usermodehelper_inheritable, in ____call_usermodehelper()
243 new->cap_inheritable); in ____call_usermodehelper()
247 retval = sub_info->init(sub_info, new); in ____call_usermodehelper()
249 abort_creds(new); in ____call_usermodehelper()
254 commit_creds(new); in ____call_usermodehelper()
503 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()
Daudit_tree.c222 struct audit_chunk *new = NULL; in untag_chunk() local
232 new = alloc_chunk(size); in untag_chunk()
237 if (new) in untag_chunk()
238 free_chunk(new); in untag_chunk()
258 if (!new) in untag_chunk()
261 fsnotify_duplicate_mark(&new->mark, entry); in untag_chunk()
262 if (fsnotify_add_mark(&new->mark, new->mark.group, new->mark.inode, NULL, 1)) { in untag_chunk()
263 fsnotify_put_mark(&new->mark); in untag_chunk()
269 list_replace_init(&chunk->trees, &new->trees); in untag_chunk()
283 new->owners[i].owner = s; in untag_chunk()
[all …]
/linux-4.1.27/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.1.27/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.1.27/security/
Dcommoncap.c250 int cap_capset(struct cred *new, in cap_capset() argument
277 new->cap_effective = *effective; in cap_capset()
278 new->cap_inheritable = *inheritable; in cap_capset()
279 new->cap_permitted = *permitted; in cap_capset()
344 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() local
361 new->cap_permitted.cap[i] = in bprm_caps_from_vfs_caps()
362 (new->cap_bset.cap[i] & permitted) | in bprm_caps_from_vfs_caps()
363 (new->cap_inheritable.cap[i] & inheritable); in bprm_caps_from_vfs_caps()
365 if (permitted & ~new->cap_permitted.cap[i]) in bprm_caps_from_vfs_caps()
486 struct cred *new = bprm->cred; in cap_bprm_set_creds() local
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
Dacl.c102 posix_acl_xattr_header *new; in lustre_posix_acl_xattr_reduce_space() local
107 OBD_ALLOC(new, new_size); in lustre_posix_acl_xattr_reduce_space()
108 if (unlikely(new == NULL)) in lustre_posix_acl_xattr_reduce_space()
111 memcpy(new, *header, new_size); in lustre_posix_acl_xattr_reduce_space()
113 *header = new; in lustre_posix_acl_xattr_reduce_space()
124 ext_acl_xattr_header *new; in lustre_ext_acl_xattr_reduce_space() local
129 OBD_ALLOC(new, ext_size); in lustre_ext_acl_xattr_reduce_space()
130 if (unlikely(new == NULL)) in lustre_ext_acl_xattr_reduce_space()
133 memcpy(new, *header, ext_size); in lustre_ext_acl_xattr_reduce_space()
135 *header = new; in lustre_ext_acl_xattr_reduce_space()
[all …]
/linux-4.1.27/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.h131 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
133 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
138 : "d" (new) in atomic_cmpxchg()
260 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) argument
263 long long old, long long new) in atomic64_cmpxchg() argument
268 : "d" (new) in atomic64_cmpxchg()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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);
76 unsigned long new, int size) in __cmpxchg() argument
80 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
82 return __cmpxchg_u64(ptr, old, new); in __cmpxchg()
89 #define cmpxchg(ptr, old, new) \ argument
91 (unsigned long)(new), \
98 unsigned long new, int size) in __cmpxchg_local() argument
102 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local()
[all …]
/linux-4.1.27/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.1.27/drivers/mtd/
Dmtd_blkdevs.c323 int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) in add_mtd_blktrans_dev() argument
325 struct mtd_blktrans_ops *tr = new->tr; in add_mtd_blktrans_dev()
338 if (new->devnum == -1) { in add_mtd_blktrans_dev()
342 new->devnum = last_devnum+1; in add_mtd_blktrans_dev()
343 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev()
346 } else if (d->devnum == new->devnum) { in add_mtd_blktrans_dev()
350 } else if (d->devnum > new->devnum) { in add_mtd_blktrans_dev()
352 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev()
359 if (new->devnum == -1) in add_mtd_blktrans_dev()
360 new->devnum = last_devnum+1; in add_mtd_blktrans_dev()
[all …]
/linux-4.1.27/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.h41 void *new = malloc(len); in xmalloc() local
43 if (!new) in xmalloc()
46 return new; in xmalloc()
51 void *new = realloc(p, len); in xrealloc() local
53 if (!new) in xrealloc()
56 return new; in xrealloc()
/linux-4.1.27/arch/sparc/include/asm/
Dcmpxchg_64.h71 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument
74 : "=&r" (new) in __cmpxchg_u32()
75 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32()
78 return new; in __cmpxchg_u32()
82 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
85 : "=&r" (new) in __cmpxchg_u64()
86 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64()
89 return new; in __cmpxchg_u64()
97 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
101 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
[all …]
/linux-4.1.27/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.c23 struct lockref new = old, prev = old; \
27 new.lock_count); \
51 new.count++; in lockref_get()
72 new.count++; in lockref_get_not_zero()
99 new.count++; in lockref_get_or_lock()
125 new.count--; in lockref_put_return()
129 return new.count; in lockref_put_return()
143 new.count--; in lockref_put_or_lock()
180 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.c63 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument
67 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents()
68 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents()
69 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
74 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() argument
203 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() argument
365 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() argument
379 static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {} in dummy_copy() argument
380 static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} in dummy_rotate() argument
409 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() argument
[all …]
/linux-4.1.27/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.1.27/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.1.27/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()
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; \
78 __s64 old, new; \
84 new = old c_op i; \
85 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); \
86 return new; \
118 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) argument
119 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
[all …]
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()
/linux-4.1.27/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.h119 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
120 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() argument
122 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
123 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() argument
136 int c, new, old; in ATOMIC_OPS() local
149 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in ATOMIC_OPS()
/linux-4.1.27/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 parent->rb_left = new; in __rb_change_child()
128 parent->rb_right = new; in __rb_change_child()
[all …]
Dioport.h141 extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
142 extern int request_resource(struct resource *root, struct resource *new);
143 extern int release_resource(struct resource *new);
144 void release_child_resources(struct resource *new);
148 extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
149 extern int insert_resource(struct resource *parent, struct resource *new);
150 extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
152 extern int allocate_resource(struct resource *root, struct resource *new,
212 struct resource *new);
213 extern void devm_release_resource(struct device *dev, struct resource *new);
/linux-4.1.27/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()
667 struct mempolicy *new; in vma_replace_policy() local
674 new = mpol_dup(pol); in vma_replace_policy()
675 if (IS_ERR(new)) in vma_replace_policy()
676 return PTR_ERR(new); in vma_replace_policy()
679 err = vma->vm_ops->set_policy(vma, new); in vma_replace_policy()
685 vma->vm_policy = new; /* protected by mmap_sem */ in vma_replace_policy()
[all …]
/linux-4.1.27/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.1.27/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.1.27/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.c528 unsigned int old, new, smute; in qtet_mute_put() local
532 new = 0; in qtet_mute_put()
537 new = SCR_MUTE; in qtet_mute_put()
541 if (old != new) { in qtet_mute_put()
543 set_scr(ice, (get_scr(ice) & ~SCR_MUTE) | new); in qtet_mute_put()
589 unsigned int old, new, tmp, masked_old; in qtet_ain12_sw_put() local
590 old = new = get_scr(ice); in qtet_ain12_sw_put()
600 new = old & ~(SCR_AIN12_SEL1 | SCR_AIN12_SEL0); in qtet_ain12_sw_put()
601 set_scr(ice, new); in qtet_ain12_sw_put()
603 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.1.27/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.1.27/fs/lockd/
Dmon.c108 struct rpc_clnt *clnt, *new; in nsm_client_get() local
115 clnt = new = nsm_create(net, nodename); in nsm_client_get()
119 clnt = nsm_client_set(ln, new); in nsm_client_get()
120 if (clnt != new) in nsm_client_get()
121 rpc_shutdown_client(new); in nsm_client_get()
332 struct nsm_handle *new; in nsm_create_handle() local
334 new = kzalloc(sizeof(*new) + hostname_len + 1, GFP_KERNEL); in nsm_create_handle()
335 if (unlikely(new == NULL)) in nsm_create_handle()
338 atomic_set(&new->sm_count, 1); in nsm_create_handle()
339 new->sm_name = (char *)(new + 1); in nsm_create_handle()
[all …]
/linux-4.1.27/tools/perf/util/
Dcomm.c50 struct comm_str *iter, *new; in comm_str__findnew() local
67 new = comm_str__alloc(str); in comm_str__findnew()
68 if (!new) in comm_str__findnew()
71 rb_link_node(&new->rb_node, parent, p); in comm_str__findnew()
72 rb_insert_color(&new->rb_node, root); in comm_str__findnew()
74 return new; in comm_str__findnew()
100 struct comm_str *new, *old = comm->comm_str; in comm__override() local
102 new = comm_str__findnew(str, &comm_str_root); in comm__override()
103 if (!new) in comm__override()
106 comm_str__get(new); in comm__override()
[all …]
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 …]
Dcallchain.c408 struct callchain_node *new; in create_child() local
410 new = zalloc(sizeof(*new)); in create_child()
411 if (!new) { in create_child()
415 new->parent = parent; in create_child()
416 INIT_LIST_HEAD(&new->val); in create_child()
422 new->rb_root_in = parent->rb_root_in; in create_child()
425 n = rb_first(&new->rb_root_in); in create_child()
428 child->parent = new; in create_child()
433 rb_link_node(&new->rb_node_in, NULL, &parent->rb_root_in.rb_node); in create_child()
434 rb_insert_color(&new->rb_node_in, &parent->rb_root_in); in create_child()
[all …]
/linux-4.1.27/arch/powerpc/include/asm/
Dcmpxchg.h150 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument
166 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32()
174 unsigned long new) in __cmpxchg_u32_local() argument
188 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local()
196 __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
211 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u64()
219 unsigned long new) in __cmpxchg_u64_local() argument
232 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u64_local()
244 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, in __cmpxchg() argument
249 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
[all …]
/linux-4.1.27/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.1.27/arch/arm/include/asm/
Dcmpxchg.h139 unsigned long new, int size) in __cmpxchg() argument
155 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
167 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
180 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
193 unsigned long new, int size) in __cmpxchg_mb() argument
198 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb()
212 unsigned long new, int size) in __cmpxchg_local() argument
220 ret = __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
224 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_local()
232 unsigned long long new) in __cmpxchg64() argument
[all …]
Datomic.h83 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) in atomic_cmpxchg() argument
98 : "r" (&ptr->counter), "Ir" (old), "r" (new) in atomic_cmpxchg()
164 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
172 v->counter = new; in atomic_cmpxchg()
201 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
329 long long new) in ATOMIC64_OPS()
345 : "r" (&ptr->counter), "r" (old), "r" (new) in ATOMIC64_OPS()
354 static inline long long atomic64_xchg(atomic64_t *ptr, long long new) in atomic64_xchg() argument
368 : "r" (&ptr->counter), "r" (new) in atomic64_xchg()
/linux-4.1.27/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.1.27/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.1.27/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()
65 struct insn old, new; in __jump_label_transform() local
69 jump_label_make_branch(entry, &new); in __jump_label_transform()
72 jump_label_make_nop(entry, &new); in __jump_label_transform()
76 jump_label_bug(entry, &orignop, &new); in __jump_label_transform()
79 jump_label_bug(entry, &old, &new); in __jump_label_transform()
81 s390_kernel_write((void *)entry->code, &new, sizeof(new)); in __jump_label_transform()
/linux-4.1.27/arch/x86/include/asm/
Dcmpxchg.h85 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument
89 __typeof__(*(ptr)) __new = (new); \
133 #define __cmpxchg(ptr, old, new, size) \ argument
134 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
136 #define __sync_cmpxchg(ptr, old, new, size) \ argument
137 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
139 #define __cmpxchg_local(ptr, old, new, size) \ argument
140 __raw_cmpxchg((ptr), (old), (new), (size), "")
148 #define cmpxchg(ptr, old, new) \ argument
149 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
[all …]
Dspinlock.h72 arch_spinlock_t old, new; in __ticket_check_and_clear_slowpath() local
75 new.tickets.head = head & ~TICKET_SLOWPATH_FLAG; in __ticket_check_and_clear_slowpath()
76 old.tickets.tail = new.tickets.head + TICKET_LOCK_INC; in __ticket_check_and_clear_slowpath()
77 new.tickets.tail = old.tickets.tail; in __ticket_check_and_clear_slowpath()
80 cmpxchg(&lock->head_tail, old.head_tail, new.head_tail); in __ticket_check_and_clear_slowpath()
129 arch_spinlock_t old, new; in arch_spin_trylock() local
135 new.head_tail = old.head_tail + (TICKET_LOCK_INC << TICKET_SHIFT); in arch_spin_trylock()
136 new.head_tail &= ~TICKET_SLOWPATH_FLAG; in arch_spin_trylock()
139 return cmpxchg(&lock->head_tail, old.head_tail, new.head_tail) == old.head_tail; in arch_spin_trylock()
Dfpu-internal.h92 static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu) in fpu_lazy_restore() argument
94 return new == this_cpu_read_stable(fpu_owner_task) && in fpu_lazy_restore()
95 cpu == new->thread.fpu.last_cpu; in fpu_lazy_restore()
435 static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct task_struct *new, int… in switch_fpu_prepare() argument
443 fpu.preload = tsk_used_math(new) && in switch_fpu_prepare()
444 (use_eager_fpu() || new->thread.fpu_counter > 5); in switch_fpu_prepare()
457 new->thread.fpu_counter++; in switch_fpu_prepare()
458 __thread_set_has_fpu(new); in switch_fpu_prepare()
459 prefetch(new->thread.fpu.state); in switch_fpu_prepare()
466 new->thread.fpu_counter++; in switch_fpu_prepare()
[all …]
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()
Datomic.h175 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
177 return cmpxchg(&v->counter, old, new); in atomic_cmpxchg()
180 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
182 return xchg(&v->counter, new); in atomic_xchg()
/linux-4.1.27/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.1.27/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.1.27/arch/m32r/include/asm/
Dcmpxchg.h113 __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) in __cmpxchg_u32() argument
131 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32()
144 unsigned int new) in __cmpxchg_local_u32() argument
162 : "r" (p), "r" (old), "r" (new) in __cmpxchg_local_u32()
178 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
182 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
185 return __cmpxchg_u64(ptr, old, new); in __cmpxchg()
200 unsigned long new, int size) in __cmpxchg_local() argument
204 return __cmpxchg_local_u32(ptr, old, new); in __cmpxchg_local()
206 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
/linux-4.1.27/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.1.27/virt/kvm/
Dirqchip.c164 struct kvm_irq_routing_table *new, *old; in kvm_set_irq_routing() local
176 new = kzalloc(sizeof(*new) + (nr_rt_entries * sizeof(struct hlist_head)) in kvm_set_irq_routing()
180 if (!new) in kvm_set_irq_routing()
183 new->rt_entries = (void *)&new->map[nr_rt_entries]; in kvm_set_irq_routing()
185 new->nr_rt_entries = nr_rt_entries; in kvm_set_irq_routing()
188 new->chip[i][j] = -1; in kvm_set_irq_routing()
194 r = setup_routing_entry(new, &new->rt_entries[i], ue); in kvm_set_irq_routing()
202 rcu_assign_pointer(kvm->irq_routing, new); in kvm_set_irq_routing()
208 new = old; in kvm_set_irq_routing()
212 kfree(new); in kvm_set_irq_routing()
/linux-4.1.27/include/asm-generic/
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()
Datomic-long.h134 #define atomic_long_cmpxchg(l, old, new) \ argument
135 (atomic64_cmpxchg((atomic64_t *)(l), (old), (new)))
136 #define atomic_long_xchg(v, new) \ argument
137 (atomic64_xchg((atomic64_t *)(v), (new)))
251 #define atomic_long_cmpxchg(l, old, new) \ argument
252 (atomic_cmpxchg((atomic_t *)(l), (old), (new)))
253 #define atomic_long_xchg(v, new) \ argument
254 (atomic_xchg((atomic_t *)(v), (new)))
/linux-4.1.27/include/linux/usb/
Dgadget_configfs.h61 struct struct_in *new; \
65 new = kzalloc(sizeof(*new), GFP_KERNEL); \
66 if (!new) \
69 ret = check_user_usb_string(name, &new->stringtab_dev); \
72 config_group_init_type_name(&new->group, name, \
78 if (gs->stringtab_dev.language == new->stringtab_dev.language) \
86 list_add_tail(&new->list, &gi->string_list); \
87 return &new->group; \
89 kfree(new); \
/linux-4.1.27/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.1.27/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()
Dnet_kern.c47 struct sk_buff *new; in update_drop_skb() local
57 new = dev_alloc_skb(max); in update_drop_skb()
58 if (new == NULL) in update_drop_skb()
61 skb_put(new, max); in update_drop_skb()
64 drop_skb = new; in update_drop_skb()
596 void register_transport(struct transport *new) in register_transport() argument
605 BUG_ON(!list_empty(&new->list)); in register_transport()
606 list_add(&new->list, &transports); in register_transport()
611 match = check_transport(new, eth->init, eth->index, &init, in register_transport()
616 eth_configure(eth->index, init, mac, new); in register_transport()
[all …]
/linux-4.1.27/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.h179 #define atomic_cmpxchg(v, old, new) (cmpxchg(&(v)->counter, old, new)) argument
180 #define atomic_xchg(v, new) (xchg(&(v)->counter, new)) argument
181 #define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter)) argument
182 #define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter)) argument
/linux-4.1.27/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.1.27/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.tm_orig_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.1.27/drivers/gpu/drm/
Ddrm_lock.c189 unsigned int old, new, prev; in drm_lock_take() local
196 new = old | _DRM_LOCK_CONT; in drm_lock_take()
198 new = context | _DRM_LOCK_HELD | in drm_lock_take()
202 prev = cmpxchg(lock, old, new); in drm_lock_take()
216 if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) { in drm_lock_take()
238 unsigned int old, new, prev; in drm_lock_transfer() local
244 new = context | _DRM_LOCK_HELD; in drm_lock_transfer()
245 prev = cmpxchg(lock, old, new); in drm_lock_transfer()
263 unsigned int old, new, prev; in drm_legacy_lock_free() local
277 new = _DRM_LOCKING_CONTEXT(old); in drm_legacy_lock_free()
[all …]
Ddrm_vma_manager.c314 struct drm_vma_offset_file *new, *entry; in drm_vma_node_allow() local
321 new = kmalloc(sizeof(*entry), GFP_KERNEL); in drm_vma_node_allow()
341 if (!new) { in drm_vma_node_allow()
346 new->vm_filp = filp; in drm_vma_node_allow()
347 new->vm_count = 1; in drm_vma_node_allow()
348 rb_link_node(&new->vm_rb, parent, iter); in drm_vma_node_allow()
349 rb_insert_color(&new->vm_rb, &node->vm_files); in drm_vma_node_allow()
350 new = NULL; in drm_vma_node_allow()
354 kfree(new); in drm_vma_node_allow()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/drivers/staging/lustre/lustre/ldlm/
Dldlm_flock.c81 ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new) in ldlm_same_flock_owner() argument
83 return((new->l_policy_data.l_flock.owner == in ldlm_same_flock_owner()
85 (new->l_export == lock->l_export)); in ldlm_same_flock_owner()
89 ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) in ldlm_flocks_overlap() argument
91 return((new->l_policy_data.l_flock.start <= in ldlm_flocks_overlap()
93 (new->l_policy_data.l_flock.end >= in ldlm_flocks_overlap()
254 struct ldlm_lock *new = req; in ldlm_process_flock_lock() local
265 *flags, new->l_policy_data.l_flock.owner, in ldlm_process_flock_lock()
266 new->l_policy_data.l_flock.pid, mode, in ldlm_process_flock_lock()
385 if (!ldlm_same_flock_owner(lock, new)) in ldlm_process_flock_lock()
[all …]
/linux-4.1.27/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.h72 #define ia64_cmpxchg(sem, ptr, old, new, size) \ argument
94 _r_ = ia64_cmpxchg1_##sem((__u8 *) ptr, new, _o_); \
98 _r_ = ia64_cmpxchg2_##sem((__u16 *) ptr, new, _o_); \
102 _r_ = ia64_cmpxchg4_##sem((__u32 *) ptr, new, _o_); \
106 _r_ = ia64_cmpxchg8_##sem((__u64 *) ptr, new, _o_); \
/linux-4.1.27/arch/mips/include/asm/
Dcmpxchg.h143 #define __cmpxchg_asm(ld, st, m, old, new) \ argument
162 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \
179 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \
187 *m = new; \
200 #define __cmpxchg(ptr, old, new, pre_barrier, post_barrier) \ argument
204 __typeof__(*(ptr)) __new = (new); \
229 #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_mb__before_llsc(), smp_llsc_mb()) argument
230 #define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, old, new, , ) argument
/linux-4.1.27/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.1.27/drivers/iommu/
Diova.c93 unsigned long limit_pfn, struct iova *new) in __cached_rbnode_insert_update() argument
97 iovad->cached32_node = &new->node; in __cached_rbnode_insert_update()
140 struct iova *new, bool size_aligned) in __alloc_and_insert_iova_range() argument
182 new->pfn_lo = limit_pfn - (size + pad_size) + 1; in __alloc_and_insert_iova_range()
183 new->pfn_hi = new->pfn_lo + size - 1; in __alloc_and_insert_iova_range()
203 if (new->pfn_lo < this->pfn_lo) in __alloc_and_insert_iova_range()
205 else if (new->pfn_lo > this->pfn_lo) in __alloc_and_insert_iova_range()
212 rb_link_node(&new->node, parent, entry); in __alloc_and_insert_iova_range()
213 rb_insert_color(&new->node, &iovad->rbroot); in __alloc_and_insert_iova_range()
215 __cached_rbnode_insert_update(iovad, saved_pfn, new); in __alloc_and_insert_iova_range()
[all …]
/linux-4.1.27/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.1.27/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.1.27/drivers/dma/
Dmmp_pdma.c450 struct mmp_pdma_desc_sw *first = NULL, *prev = NULL, *new; in mmp_pdma_prep_memcpy() local
470 new = mmp_pdma_alloc_descriptor(chan); in mmp_pdma_prep_memcpy()
471 if (!new) { in mmp_pdma_prep_memcpy()
480 new->desc.dcmd = chan->dcmd | (DCMD_LENGTH & copy); in mmp_pdma_prep_memcpy()
481 new->desc.dsadr = dma_src; in mmp_pdma_prep_memcpy()
482 new->desc.dtadr = dma_dst; in mmp_pdma_prep_memcpy()
485 first = new; in mmp_pdma_prep_memcpy()
487 prev->desc.ddadr = new->async_tx.phys; in mmp_pdma_prep_memcpy()
489 new->async_tx.cookie = 0; in mmp_pdma_prep_memcpy()
490 async_tx_ack(&new->async_tx); in mmp_pdma_prep_memcpy()
[all …]
Dxgene-dma.c942 struct xgene_dma_desc_sw *first = NULL, *new; in xgene_dma_prep_memcpy() local
953 new = xgene_dma_alloc_descriptor(chan); in xgene_dma_prep_memcpy()
954 if (!new) in xgene_dma_prep_memcpy()
961 xgene_dma_prep_cpy_desc(chan, new, dst, src, copy); in xgene_dma_prep_memcpy()
964 first = new; in xgene_dma_prep_memcpy()
966 new->tx.cookie = 0; in xgene_dma_prep_memcpy()
967 async_tx_ack(&new->tx); in xgene_dma_prep_memcpy()
975 list_add_tail(&new->node, &first->tx_list); in xgene_dma_prep_memcpy()
978 new->tx.flags = flags; /* client is in control of this ack */ in xgene_dma_prep_memcpy()
979 new->tx.cookie = -EBUSY; in xgene_dma_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 …]
/linux-4.1.27/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.1.27/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.1.27/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))
/linux-4.1.27/kernel/irq/
Dmanage.c954 static void irq_setup_forced_threading(struct irqaction *new) in irq_setup_forced_threading() argument
958 if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)) in irq_setup_forced_threading()
961 new->flags |= IRQF_ONESHOT; in irq_setup_forced_threading()
963 if (!new->thread_fn) { in irq_setup_forced_threading()
964 set_bit(IRQTF_FORCED_THREAD, &new->thread_flags); in irq_setup_forced_threading()
965 new->thread_fn = new->handler; in irq_setup_forced_threading()
966 new->handler = irq_default_primary_handler; in irq_setup_forced_threading()
992 __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) in __setup_irq() argument
1013 if (!new->thread_fn) { in __setup_irq()
1022 new->handler = irq_nested_primary_handler; in __setup_irq()
[all …]
/linux-4.1.27/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.1.27/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.c98 void *new; in kmem_realloc() local
100 new = kmem_alloc(newsize, flags); in kmem_realloc()
102 if (new) in kmem_realloc()
103 memcpy(new, ptr, in kmem_realloc()
107 return new; in kmem_realloc()
/linux-4.1.27/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.1.27/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.1.27/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()
293 new->reverse = theirs.reverse; in x25_negotiate_facilities()
302 new->throughput = (new->throughput & 0xf0) | theirs_in; in x25_negotiate_facilities()
307 new->throughput = (new->throughput & 0x0f) | theirs_out; in x25_negotiate_facilities()
314 new->pacsize_in = theirs.pacsize_in; in x25_negotiate_facilities()
318 new->pacsize_out = theirs.pacsize_out; in x25_negotiate_facilities()
325 new->winsize_in = theirs.winsize_in; in x25_negotiate_facilities()
329 new->winsize_out = theirs.winsize_out; in x25_negotiate_facilities()
/linux-4.1.27/net/sched/
Dcls_cgroup.c97 struct cls_cgroup_head *new; in cls_cgroup_change() local
111 new = kzalloc(sizeof(*head), GFP_KERNEL); in cls_cgroup_change()
112 if (!new) in cls_cgroup_change()
115 tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE); in cls_cgroup_change()
116 new->handle = handle; in cls_cgroup_change()
117 new->tp = tp; in cls_cgroup_change()
134 tcf_exts_change(tp, &new->exts, &e); in cls_cgroup_change()
135 tcf_em_tree_change(tp, &new->ematches, &t); in cls_cgroup_change()
137 rcu_assign_pointer(tp->root, new); in cls_cgroup_change()
142 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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/arch/sparc/lib/
Datomic32.c48 int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
55 v->counter = new; in atomic_xchg()
61 int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
69 v->counter = new; in atomic_cmpxchg()
140 unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) in __cmpxchg_u32() argument
147 *ptr = new; in __cmpxchg_u32()
154 unsigned long __xchg_u32(volatile u32 *ptr, u32 new) in __xchg_u32() argument
161 *ptr = new; in __xchg_u32()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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()
1711 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real() local
1734 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_delay_real()
1749 new_endoff = new->br_startoff + new->br_blockcount; in xfs_bmap_add_extent_delay_real()
[all …]
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/arch/powerpc/platforms/pseries/
Dreconfig.c206 struct property *new = kzalloc(sizeof(*new), GFP_KERNEL); in new_property() local
208 if (!new) in new_property()
211 if (!(new->name = kstrdup(name, GFP_KERNEL))) in new_property()
213 if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) in new_property()
216 memcpy(new->value, value, length); in new_property()
217 *(((char *)new->value) + length) = 0; in new_property()
218 new->length = length; in new_property()
219 new->next = last; in new_property()
220 return new; in new_property()
223 kfree(new->name); in new_property()
[all …]
/linux-4.1.27/Documentation/RCU/
DarrayRCU.txt46 new ipc_id_ary, copies the old to the new portion of the new, initializes
47 the remainder of the new, updates the ids->entries pointer to point to
48 the new array, and invokes ipc_rcu_putref() to free up the old array.
55 struct ipc_id_ary* new;
65 new = ipc_rcu_alloc(sizeof(struct kern_ipc_perm *)*newsize +
67 if(new == NULL)
69 new->size = newsize;
70 memcpy(new->p, ids->entries->p,
74 new->p[i] = NULL;
80 * contents of the new array are visible before the new
[all …]
/linux-4.1.27/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.1.27/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.1.27/arch/s390/lib/
Ddelay.c32 unsigned long cr0, cr6, new; in __udelay_disabled() local
39 new = (cr0 & 0xffff00e0) | 0x00000800; in __udelay_disabled()
40 __ctl_load(new , 0, 0); in __udelay_disabled()
41 new = 0; in __udelay_disabled()
42 __ctl_load(new, 6, 6); in __udelay_disabled()
/linux-4.1.27/arch/arm64/include/asm/
Datomic.h92 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) in ATOMIC_OPS()
107 : "Ir" (old), "r" (new) in ATOMIC_OPS()
114 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
190 static inline long atomic64_cmpxchg(atomic64_t *ptr, long old, long new) in ATOMIC64_OPS()
205 : "Ir" (old), "r" (new) in ATOMIC64_OPS()
212 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) argument
Dcmpxchg.h84 unsigned long new, int size) in __cmpxchg() argument
99 : "Ir" (old), "r" (new) in __cmpxchg()
114 : "Ir" (old), "r" (new) in __cmpxchg()
129 : "Ir" (old), "r" (new) in __cmpxchg()
144 : "Ir" (old), "r" (new) in __cmpxchg()
202 unsigned long new, int size) in __cmpxchg_mb() argument
207 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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. Prep the new page that we want to move to. It is locked
96 and set to not being uptodate so that all accesses to the new
99 4. The new page is prepped with some settings from the old page so that
100 accesses to the new page will discover a page with the correct settings.
118 9. The radix tree is changed to point to the new page.
[all …]
/linux-4.1.27/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.1.27/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.1.27/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()
342 struct nfs_page *new; in readpage_async_filler() local
350 new = nfs_create_request(desc->ctx, page, NULL, 0, len); in readpage_async_filler()
351 if (IS_ERR(new)) in readpage_async_filler()
356 if (!nfs_pageio_add_request(desc->pgio, new)) { in readpage_async_filler()
362 error = PTR_ERR(new); in readpage_async_filler()
Dpnfs_dev.c192 struct nfs4_deviceid_node *d, *new; in nfs4_find_get_deviceid() local
198 new = nfs4_get_device_info(server, id, cred, gfp_mask); in nfs4_find_get_deviceid()
199 if (!new) in nfs4_find_get_deviceid()
200 return new; in nfs4_find_get_deviceid()
206 server->pnfs_curr_ld->free_deviceid_node(new); in nfs4_find_get_deviceid()
209 hlist_add_head_rcu(&new->node, &nfs4_deviceid_cache[hash]); in nfs4_find_get_deviceid()
210 atomic_inc(&new->ref); in nfs4_find_get_deviceid()
213 return new; in nfs4_find_get_deviceid()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/arch/m68k/include/asm/
Dcmpxchg.h96 unsigned long new, int size) in __cmpxchg() argument
102 : "d" (new), "0" (old), "m" (*(char *)p)); in __cmpxchg()
107 : "d" (new), "0" (old), "m" (*(short *)p)); in __cmpxchg()
112 : "d" (new), "0" (old), "m" (*(int *)p)); in __cmpxchg()
115 old = __invalid_cmpxchg_size(p, old, new, size); in __cmpxchg()
Datomic.h121 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument
125 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
133 atomic_set(v, new); in atomic_cmpxchg()
138 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
145 atomic_set(v, new); in atomic_xchg()
/linux-4.1.27/arch/x86/kernel/cpu/mcheck/
Dmce_amd.c199 static int setup_APIC_mce(int reserved, int new) in setup_APIC_mce() argument
201 if (reserved < 0 && !setup_APIC_eilvt(new, THRESHOLD_APIC_VECTOR, in setup_APIC_mce()
203 return new; in setup_APIC_mce()
215 int offset = -1, new; in mce_amd_feature_init() local
254 new = (high & MASK_LVTOFF_HI) >> 20; in mce_amd_feature_init()
255 offset = setup_APIC_mce(offset, new); in mce_amd_feature_init()
257 if ((offset == new) && in mce_amd_feature_init()
357 unsigned long new; in SHOW_FIELDS() local
362 if (kstrtoul(buf, 0, &new) < 0) in SHOW_FIELDS()
365 b->interrupt_enable = !!new; in SHOW_FIELDS()
[all …]
/linux-4.1.27/drivers/pci/
Dsetup-res.c34 u32 new, check, mask; in pci_update_resource() local
59 new = region.start | (res->flags & PCI_REGION_FLAG_MASK); in pci_update_resource()
71 new |= PCI_ROM_ADDRESS_ENABLE; in pci_update_resource()
86 pci_write_config_dword(dev, reg, new); in pci_update_resource()
89 if ((new ^ check) & mask) { in pci_update_resource()
91 resno, new, check); in pci_update_resource()
95 new = region.start >> 16 >> 16; in pci_update_resource()
96 pci_write_config_dword(dev, reg + 4, new); in pci_update_resource()
98 if (check != new) { in pci_update_resource()
100 resno, new, check); in pci_update_resource()
/linux-4.1.27/drivers/acpi/
Dacpi_memhotplug.c92 struct acpi_memory_info *info, *new; in acpi_memory_get_resource() local
110 new = kzalloc(sizeof(struct acpi_memory_info), GFP_KERNEL); in acpi_memory_get_resource()
111 if (!new) in acpi_memory_get_resource()
114 INIT_LIST_HEAD(&new->list); in acpi_memory_get_resource()
115 new->caching = address64.info.mem.caching; in acpi_memory_get_resource()
116 new->write_protect = address64.info.mem.write_protect; in acpi_memory_get_resource()
117 new->start_addr = address64.address.minimum; in acpi_memory_get_resource()
118 new->length = address64.address.address_length; in acpi_memory_get_resource()
119 list_add_tail(&new->list, &mem_device->res_list); in acpi_memory_get_resource()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/fs/ext4/
Dnamei.c1228 struct dx_entry *old = frame->at, *new = old + 1; in dx_insert_block() local
1233 memmove(new + 1, new, (char *)(entries + count) - (char *)(new)); in dx_insert_block()
1234 dx_set_hash(new, hash); in dx_insert_block()
1235 dx_set_block(new, block); in dx_insert_block()
3558 struct ext4_renament new = { in ext4_rename() local
3570 dquot_initialize(new.dir); in ext4_rename()
3574 if (new.inode) in ext4_rename()
3575 dquot_initialize(new.inode); in ext4_rename()
3590 if ((old.dir != new.dir) && in ext4_rename()
3591 ext4_encrypted_inode(new.dir) && in ext4_rename()
[all …]
/linux-4.1.27/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.1.27/Documentation/
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.1.27/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.1.27/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.1.27/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.1.27/arch/metag/include/asm/
Datomic_lnkget.h115 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
132 : "da" (&v->counter), "bd" (old), "da" (new) in atomic_cmpxchg()
140 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() argument
152 : "da" (&v->counter), "da" (new) in atomic_xchg()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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 …]
/linux-4.1.27/arch/um/os-Linux/
Dstart_up.c344 struct iomem_region *new; in parse_iomem() local
368 new = malloc(sizeof(*new)); in parse_iomem()
369 if (new == NULL) { in parse_iomem()
376 *new = ((struct iomem_region) { .next = iomem_regions, in parse_iomem()
382 iomem_regions = new; in parse_iomem()
383 iomem_size += new->size + UM_KERN_PAGE_SIZE; in parse_iomem()
/linux-4.1.27/arch/blackfin/mach-common/
Ddpmc.c109 if (val == CPUFREQ_PRECHANGE && freq->old < freq->new) { in vreg_cpufreq_notifier()
111 bfin_set_vlev(bfin_get_vlev(freq->new)); in vreg_cpufreq_notifier()
114 } else if (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) { in vreg_cpufreq_notifier()
116 bfin_set_vlev(bfin_get_vlev(freq->new)); in vreg_cpufreq_notifier()

12345678910