Lines Matching full:targets

287  * targets directory
301 static void damon_sysfs_targets_rm_dirs(struct damon_sysfs_targets *targets) in damon_sysfs_targets_rm_dirs() argument
303 struct damon_sysfs_target **targets_arr = targets->targets_arr; in damon_sysfs_targets_rm_dirs()
306 for (i = 0; i < targets->nr; i++) { in damon_sysfs_targets_rm_dirs()
310 targets->nr = 0; in damon_sysfs_targets_rm_dirs()
312 targets->targets_arr = NULL; in damon_sysfs_targets_rm_dirs()
315 static int damon_sysfs_targets_add_dirs(struct damon_sysfs_targets *targets, in damon_sysfs_targets_add_dirs() argument
321 damon_sysfs_targets_rm_dirs(targets); in damon_sysfs_targets_add_dirs()
329 targets->targets_arr = targets_arr; in damon_sysfs_targets_add_dirs()
334 damon_sysfs_targets_rm_dirs(targets); in damon_sysfs_targets_add_dirs()
339 &damon_sysfs_target_ktype, &targets->kobj, in damon_sysfs_targets_add_dirs()
349 targets->nr++; in damon_sysfs_targets_add_dirs()
354 damon_sysfs_targets_rm_dirs(targets); in damon_sysfs_targets_add_dirs()
362 struct damon_sysfs_targets *targets = container_of(kobj, in nr_targets_show() local
365 return sysfs_emit(buf, "%d\n", targets->nr); in nr_targets_show()
371 struct damon_sysfs_targets *targets; in nr_targets_store() local
379 targets = container_of(kobj, struct damon_sysfs_targets, kobj); in nr_targets_store()
383 err = damon_sysfs_targets_add_dirs(targets, nr); in nr_targets_store()
636 struct damon_sysfs_targets *targets; member
677 struct damon_sysfs_targets *targets = damon_sysfs_targets_alloc(); in damon_sysfs_context_set_targets() local
680 if (!targets) in damon_sysfs_context_set_targets()
682 err = kobject_init_and_add(&targets->kobj, &damon_sysfs_targets_ktype, in damon_sysfs_context_set_targets()
683 &context->kobj, "targets"); in damon_sysfs_context_set_targets()
685 kobject_put(&targets->kobj); in damon_sysfs_context_set_targets()
688 context->targets = targets; in damon_sysfs_context_set_targets()
727 kobject_put(&context->targets->kobj); in damon_sysfs_context_add_dirs()
728 context->targets = NULL; in damon_sysfs_context_add_dirs()
739 damon_sysfs_targets_rm_dirs(context->targets); in damon_sysfs_context_rm_dirs()
740 kobject_put(&context->targets->kobj); in damon_sysfs_context_rm_dirs()
1170 /* Multiple physical address space monitoring targets makes no sense */ in damon_sysfs_add_targets()
1286 err = damon_sysfs_add_targets(ctx, sys_ctx->targets); in damon_sysfs_apply_inputs()