Lines Matching refs:old
109 static inline void release_probes(struct tracepoint *tp, struct tracepoint_func *old) in release_probes() argument
111 if (old) { in release_probes()
112 struct tp_probes *tp_probes = container_of(old, in release_probes()
137 struct tracepoint_func *old, *new; in func_add() local
146 old = *funcs; in func_add()
147 if (old) { in func_add()
149 for (iter_probes = 0; old[iter_probes].func; iter_probes++) { in func_add()
150 if (old[iter_probes].func == tp_stub_func) in func_add()
152 if (old[iter_probes].func == tp_func->func && in func_add()
153 old[iter_probes].data == tp_func->data) in func_add()
162 if (old) { in func_add()
164 for (iter_probes = 0; old[iter_probes].func; iter_probes++) { in func_add()
165 if (old[iter_probes].func == tp_stub_func) in func_add()
168 if (pos < 0 && old[iter_probes].prio < prio) in func_add()
170 new[nr_probes++] = old[iter_probes]; in func_add()
183 return old; in func_add()
190 struct tracepoint_func *old, *new; in func_remove() local
192 old = *funcs; in func_remove()
194 if (!old) in func_remove()
200 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_remove()
201 if ((old[nr_probes].func == tp_func->func && in func_remove()
202 old[nr_probes].data == tp_func->data) || in func_remove()
203 old[nr_probes].func == tp_stub_func) in func_remove()
216 return old; in func_remove()
223 for (i = 0; old[i].func; i++) { in func_remove()
224 if ((old[i].func != tp_func->func || in func_remove()
225 old[i].data != tp_func->data) && in func_remove()
226 old[i].func != tp_stub_func) in func_remove()
227 new[j++] = old[i]; in func_remove()
236 for (i = 0; old[i].func; i++) { in func_remove()
237 if (old[i].func == tp_func->func && in func_remove()
238 old[i].data == tp_func->data) in func_remove()
239 WRITE_ONCE(old[i].func, tp_stub_func); in func_remove()
241 *funcs = old; in func_remove()
245 return old; in func_remove()
281 struct tracepoint_func *old, *tp_funcs; in tracepoint_add_func() local
292 old = func_add(&tp_funcs, func, prio); in tracepoint_add_func()
293 if (IS_ERR(old)) { in tracepoint_add_func()
294 WARN_ON_ONCE(warn && PTR_ERR(old) != -ENOMEM); in tracepoint_add_func()
295 return PTR_ERR(old); in tracepoint_add_func()
332 if (tp_funcs[0].data != old[0].data) in tracepoint_add_func()
340 release_probes(tp, old); in tracepoint_add_func()
353 struct tracepoint_func *old, *tp_funcs; in tracepoint_remove_func() local
357 old = func_remove(&tp_funcs, func); in tracepoint_remove_func()
358 if (WARN_ON_ONCE(IS_ERR(old))) in tracepoint_remove_func()
359 return PTR_ERR(old); in tracepoint_remove_func()
361 if (tp_funcs == old) in tracepoint_remove_func()
390 if (tp_funcs[0].data != old[0].data) in tracepoint_remove_func()
404 if (tp_funcs[0].data != old[0].data) in tracepoint_remove_func()
411 release_probes(tp, old); in tracepoint_remove_func()