/linux/lib/ |
H A D | kobject.c | 23 * kobject_namespace() - Return @kobj's namespace tag. 24 * @kobj: kobject in question 26 * Returns namespace tag of @kobj if its parent has namespace ops enabled 27 * and thus @kobj should have a namespace tag associated with it. Returns 30 const void *kobject_namespace(const struct kobject *kobj) in kobject_namespace() argument 32 const struct kobj_ns_type_operations *ns_ops = kobj_ns_ops(kobj); in kobject_namespace() 37 return kobj->ktype->namespace(kobj); in kobject_namespace() 41 * kobject_get_ownership() - Get sysfs ownership data for @kobj. 42 * @kobj 50 kobject_get_ownership(const struct kobject * kobj,kuid_t * uid,kgid_t * gid) kobject_get_ownership() argument 67 create_dir(struct kobject * kobj) create_dir() argument 106 get_kobj_path_length(const struct kobject * kobj) get_kobj_path_length() argument 124 fill_kobj_path(const struct kobject * kobj,char * path,int length) fill_kobj_path() argument 152 kobject_get_path(const struct kobject * kobj,gfp_t gfp_mask) kobject_get_path() argument 174 kobj_kset_join(struct kobject * kobj) kobj_kset_join() argument 186 kobj_kset_leave(struct kobject * kobj) kobj_kset_leave() argument 197 kobject_init_internal(struct kobject * kobj) kobject_init_internal() argument 210 kobject_add_internal(struct kobject * kobj) kobject_add_internal() argument 266 kobject_set_name_vargs(struct kobject * kobj,const char * fmt,va_list vargs) kobject_set_name_vargs() argument 308 kobject_set_name(struct kobject * kobj,const char * fmt,...) kobject_set_name() argument 333 kobject_init(struct kobject * kobj,const struct kobj_type * ktype) kobject_init() argument 362 kobject_add_varg(struct kobject * kobj,struct kobject * parent,const char * fmt,va_list vargs) kobject_add_varg() argument 410 kobject_add(struct kobject * kobj,struct kobject * parent,const char * fmt,...) kobject_add() argument 448 kobject_init_and_add(struct kobject * kobj,const struct kobj_type * ktype,struct kobject * parent,const char * fmt,...) kobject_init_and_add() argument 474 kobject_rename(struct kobject * kobj,const char * new_name) kobject_rename() argument 538 kobject_move(struct kobject * kobj,struct kobject * new_parent) kobject_move() argument 586 __kobject_del(struct kobject * kobj) __kobject_del() argument 619 kobject_del(struct kobject * kobj) kobject_del() argument 636 kobject_get(struct kobject * kobj) kobject_get() argument 649 kobject_get_unless_zero(struct kobject * kobj) kobject_get_unless_zero() argument 663 kobject_cleanup(struct kobject * kobj) kobject_cleanup() argument 711 struct kobject *kobj = container_of(kref, struct kobject, kref); kobject_release() local 730 kobject_put(struct kobject * kobj) kobject_put() argument 742 dynamic_kobj_release(struct kobject * kobj) dynamic_kobj_release() argument 766 struct kobject *kobj; kobject_create() local 791 struct kobject *kobj; kobject_create_and_add() local 820 kobj_attr_show(struct kobject * kobj,struct attribute * attr,char * buf) kobj_attr_show() argument 832 kobj_attr_store(struct kobject * kobj,struct attribute * attr,const char * buf,size_t count) kobj_attr_store() argument 923 kset_release(struct kobject * kobj) kset_release() argument 931 kset_get_ownership(const struct kobject * kobj,kuid_t * uid,kgid_t * gid) kset_get_ownership() argument 1069 kobj_ns_ops(const struct kobject * kobj) kobj_ns_ops() argument [all...] |
H A D | kobject_uevent.c | 191 int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) in kobject_synth_uevent() argument 207 r = kobject_uevent_env(kobj, action, no_uuid_envp); in kobject_synth_uevent() 221 r = kobject_uevent_env(kobj, action, env->envp); in kobject_synth_uevent() 225 devpath = kobject_get_path(kobj, GFP_KERNEL); in kobject_synth_uevent() 235 static int kobj_usermode_filter(struct kobject *kobj) in kobj_usermode_filter() argument 239 ops = kobj_ns_ops(kobj); in kobj_usermode_filter() 243 ns = kobj->ktype->namespace(kobj); in kobj_usermode_filter() 382 static int kobject_uevent_net_broadcast(struct kobject *kobj, in kobject_uevent_net_broadcast() argument 393 ops = kobj_ns_ops(kobj); in kobject_uevent_net_broadcast() 394 if (!ops && kobj->kset) { in kobject_uevent_net_broadcast() [all …]
|
/linux/mm/damon/ |
H A D | sysfs-schemes.c | 18 struct kobject kobj; member 34 sysfs_region->kobj = (struct kobject){}; in damon_sysfs_scheme_region_alloc() 42 static ssize_t start_show(struct kobject *kobj, struct kobj_attribute *attr, in start_show() 45 struct damon_sysfs_scheme_region *region = container_of(kobj, in start_show() 46 struct damon_sysfs_scheme_region, kobj); in start_show() 51 static ssize_t end_show(struct kobject *kobj, struct kobj_attribute *attr, in end_show() 54 struct damon_sysfs_scheme_region *region = container_of(kobj, in end_show() 55 struct damon_sysfs_scheme_region, kobj); in end_show() 60 static ssize_t nr_accesses_show(struct kobject *kobj, in nr_accesses_show() 63 struct damon_sysfs_scheme_region *region = container_of(kobj, in nr_accesses_show() 41 start_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) start_show() argument 50 end_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) end_show() argument 59 nr_accesses_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_accesses_show() argument 68 age_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) age_show() argument 77 damon_sysfs_scheme_region_release(struct kobject * kobj) damon_sysfs_scheme_region_release() argument 160 struct kobject kobj; global() member 185 total_bytes_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) total_bytes_show() argument 206 damon_sysfs_scheme_regions_release(struct kobject * kobj) damon_sysfs_scheme_regions_release() argument 231 struct kobject kobj; global() member 244 nr_tried_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_tried_show() argument 253 sz_tried_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) sz_tried_show() argument 262 nr_applied_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_applied_show() argument 271 sz_applied_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) sz_applied_show() argument 280 qt_exceeds_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) qt_exceeds_show() argument 289 damon_sysfs_stats_release(struct kobject * kobj) damon_sysfs_stats_release() argument 330 struct kobject kobj; global() member 352 type_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) type_show() argument 362 type_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) type_store() argument 381 matching_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) matching_show() argument 390 matching_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) matching_store() argument 405 memcg_path_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) memcg_path_show() argument 415 memcg_path_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) memcg_path_store() argument 430 addr_start_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) addr_start_show() argument 439 addr_start_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) addr_start_store() argument 449 addr_end_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) addr_end_show() argument 458 addr_end_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) addr_end_store() argument 468 damon_target_idx_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) damon_target_idx_show() argument 477 damon_target_idx_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) damon_target_idx_store() argument 487 damon_sysfs_scheme_filter_release(struct kobject * kobj) damon_sysfs_scheme_filter_release() argument 536 struct kobject kobj; global() member 598 nr_filters_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_filters_show() argument 607 nr_filters_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_filters_store() argument 630 damon_sysfs_scheme_filters_release(struct kobject * kobj) damon_sysfs_scheme_filters_release() argument 655 struct kobject kobj; global() member 687 metric_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) metric_show() argument 697 metric_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) metric_store() argument 713 interval_us_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) interval_us_show() argument 722 interval_us_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) interval_us_store() argument 732 high_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) high_show() argument 741 high_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) high_store() argument 751 mid_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) mid_show() argument 760 mid_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) mid_store() argument 770 low_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) low_show() argument 779 low_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) low_store() argument 789 damon_sysfs_watermarks_release(struct kobject * kobj) damon_sysfs_watermarks_release() argument 830 struct kobject kobj; global() member 847 target_metric_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) target_metric_show() argument 857 target_metric_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) target_metric_store() argument 873 target_value_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) target_value_show() argument 882 target_value_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) target_value_store() argument 892 current_value_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) current_value_show() argument 901 current_value_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) current_value_store() argument 912 damos_sysfs_quota_goal_release(struct kobject * kobj) damos_sysfs_quota_goal_release() argument 946 struct kobject kobj; global() member 1007 nr_goals_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_goals_show() argument 1016 nr_goals_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_goals_store() argument 1039 damos_sysfs_quota_goals_release(struct kobject * kobj) damos_sysfs_quota_goals_release() argument 1064 struct kobject kobj; global() member 1085 sz_permil_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) sz_permil_show() argument 1094 sz_permil_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) sz_permil_store() argument 1104 nr_accesses_permil_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_accesses_permil_show() argument 1113 nr_accesses_permil_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_accesses_permil_store() argument 1123 age_permil_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) age_permil_show() argument 1132 age_permil_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) age_permil_store() argument 1142 damon_sysfs_weights_release(struct kobject * kobj) damon_sysfs_weights_release() argument 1175 struct kobject kobj; global() member 1232 ms_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) ms_show() argument 1241 ms_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) ms_store() argument 1253 bytes_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) bytes_show() argument 1262 bytes_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) bytes_store() argument 1274 reset_interval_ms_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) reset_interval_ms_show() argument 1283 reset_interval_ms_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) reset_interval_ms_store() argument 1295 effective_bytes_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) effective_bytes_show() argument 1304 damon_sysfs_quotas_release(struct kobject * kobj) damon_sysfs_quotas_release() argument 1341 struct kobject kobj; global() member 1419 damon_sysfs_access_pattern_release(struct kobject * kobj) damon_sysfs_access_pattern_release() argument 1440 struct kobject kobj; global() member 1655 action_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) action_show() argument 1665 action_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) action_store() argument 1681 apply_interval_us_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) apply_interval_us_show() argument 1690 apply_interval_us_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) apply_interval_us_store() argument 1700 target_nid_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) target_nid_show() argument 1709 target_nid_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) target_nid_store() argument 1722 damon_sysfs_scheme_release(struct kobject * kobj) damon_sysfs_scheme_release() argument 1820 nr_schemes_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_schemes_show() argument 1829 nr_schemes_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_schemes_store() argument 1851 damon_sysfs_schemes_release(struct kobject * kobj) damon_sysfs_schemes_release() argument [all...] |
H A D | sysfs.c | 19 struct kobject kobj; member 28 static ssize_t start_show(struct kobject *kobj, struct kobj_attribute *attr, in start_show() argument 31 struct damon_sysfs_region *region = container_of(kobj, in start_show() 32 struct damon_sysfs_region, kobj); in start_show() 37 static ssize_t start_store(struct kobject *kobj, struct kobj_attribute *attr, in start_store() argument 40 struct damon_sysfs_region *region = container_of(kobj, in start_store() 41 struct damon_sysfs_region, kobj); in start_store() 47 static ssize_t end_show(struct kobject *kobj, struct kobj_attribute *attr, in end_show() argument 50 struct damon_sysfs_region *region = container_of(kobj, in end_show() 51 struct damon_sysfs_region, kobj); in end_show() 56 end_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) end_store() argument 66 damon_sysfs_region_release(struct kobject * kobj) damon_sysfs_region_release() argument 95 struct kobject kobj; global() member 155 nr_regions_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_regions_show() argument 164 nr_regions_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_regions_store() argument 187 damon_sysfs_regions_release(struct kobject * kobj) damon_sysfs_regions_release() argument 212 struct kobject kobj; global() member 245 pid_target_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) pid_target_show() argument 254 pid_target_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) pid_target_store() argument 266 damon_sysfs_target_release(struct kobject * kobj) damon_sysfs_target_release() argument 291 struct kobject kobj; global() member 359 nr_targets_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_targets_show() argument 368 nr_targets_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_targets_store() argument 391 damon_sysfs_targets_release(struct kobject * kobj) damon_sysfs_targets_release() argument 416 struct kobject kobj; global() member 439 sample_us_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) sample_us_show() argument 448 sample_us_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) sample_us_store() argument 463 aggr_us_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) aggr_us_show() argument 472 aggr_us_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) aggr_us_store() argument 487 update_us_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) update_us_show() argument 496 update_us_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) update_us_store() argument 511 damon_sysfs_intervals_release(struct kobject * kobj) damon_sysfs_intervals_release() argument 544 struct kobject kobj; global() member 605 damon_sysfs_attrs_release(struct kobject * kobj) damon_sysfs_attrs_release() argument 633 struct kobject kobj; global() member 745 avail_operations_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) avail_operations_show() argument 760 operations_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) operations_show() argument 769 operations_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) operations_store() argument 785 damon_sysfs_context_release(struct kobject * kobj) damon_sysfs_context_release() argument 814 struct kobject kobj; global() member 882 nr_contexts_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_contexts_show() argument 891 nr_contexts_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_contexts_store() argument 915 damon_sysfs_contexts_release(struct kobject * kobj) damon_sysfs_contexts_release() argument 940 struct kobject kobj; global() member 1065 state_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) state_show() argument 1587 state_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) state_store() argument 1609 pid_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) pid_show() argument 1632 damon_sysfs_kdamond_release(struct kobject * kobj) damon_sysfs_kdamond_release() argument 1666 struct kobject kobj; global() member 1751 nr_kdamonds_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) nr_kdamonds_show() argument 1760 nr_kdamonds_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nr_kdamonds_store() argument 1784 damon_sysfs_kdamonds_release(struct kobject * kobj) damon_sysfs_kdamonds_release() argument 1809 struct kobject kobj; global() member 1838 damon_sysfs_ui_dir_release(struct kobject * kobj) damon_sysfs_ui_dir_release() argument [all...] |
H A D | sysfs-common.c | 27 range->kobj = (struct kobject){}; in damon_sysfs_ul_range_alloc() 34 static ssize_t min_show(struct kobject *kobj, struct kobj_attribute *attr, in min_show() argument 37 struct damon_sysfs_ul_range *range = container_of(kobj, in min_show() 38 struct damon_sysfs_ul_range, kobj); in min_show() 43 static ssize_t min_store(struct kobject *kobj, struct kobj_attribute *attr, in min_store() argument 46 struct damon_sysfs_ul_range *range = container_of(kobj, in min_store() 47 struct damon_sysfs_ul_range, kobj); in min_store() 59 static ssize_t max_show(struct kobject *kobj, struct kobj_attribute *attr, in max_show() argument 62 struct damon_sysfs_ul_range *range = container_of(kobj, in max_show() 63 struct damon_sysfs_ul_range, kobj); in max_show() [all …]
|
/linux/drivers/gpu/drm/xe/ |
H A D | xe_hw_engine_class_sysfs.c | 35 static void kobj_xe_hw_engine_release(struct kobject *kobj) in kobj_xe_hw_engine_release() argument 37 kfree(kobj); in kobj_xe_hw_engine_release() 45 static ssize_t job_timeout_max_store(struct kobject *kobj, in job_timeout_max_store() argument 49 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_max_store() 70 static ssize_t job_timeout_max_show(struct kobject *kobj, in job_timeout_max_show() argument 73 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_max_show() 81 static ssize_t job_timeout_min_store(struct kobject *kobj, in job_timeout_min_store() argument 85 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_min_store() 106 static ssize_t job_timeout_min_show(struct kobject *kobj, in job_timeout_min_show() argument 109 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_min_show() [all …]
|
/linux/include/linux/ |
H A D | kobject.h | 84 __printf(2, 3) int kobject_set_name(struct kobject *kobj, const char *name, ...); 85 __printf(2, 0) int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list vargs); 87 static inline const char *kobject_name(const struct kobject *kobj) in kobject_name() argument 89 return kobj->name; in kobject_name() 92 void kobject_init(struct kobject *kobj, const struct kobj_type *ktype); 93 __printf(3, 4) __must_check int kobject_add(struct kobject *kobj, 96 __printf(4, 5) __must_check int kobject_init_and_add(struct kobject *kobj, 101 void kobject_del(struct kobject *kobj); 108 struct kobject *kobject_get(struct kobject *kobj); 109 struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj); [all …]
|
/linux/drivers/gpu/drm/i915/gt/ |
H A D | sysfs_engines.c | 19 static struct intel_engine_cs *kobj_to_engine(struct kobject *kobj) in kobj_to_engine() argument 21 return container_of(kobj, struct kobj_engine, base)->engine; in kobj_to_engine() 25 name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in name_show() argument 27 return sysfs_emit(buf, "%s\n", kobj_to_engine(kobj)->name); in name_show() 34 class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in class_show() argument 36 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_class); in class_show() 43 inst_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in inst_show() argument 45 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_instance); in inst_show() 52 mmio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in mmio_show() argument 54 return sysfs_emit(buf, "0x%x\n", kobj_to_engine(kobj)->mmio_base); in mmio_show() [all …]
|
H A D | intel_gt_sysfs_pm.c | 28 sysfs_gt_attribute_w_func(struct kobject *kobj, struct attribute *attr, in sysfs_gt_attribute_w_func() argument 34 if (!is_object_gt(kobj)) { in sysfs_gt_attribute_w_func() 36 struct device *dev = kobj_to_dev(kobj); in sysfs_gt_attribute_w_func() 45 gt = intel_gt_sysfs_get_drvdata(kobj, attr->name); in sysfs_gt_attribute_w_func() 53 sysfs_gt_attribute_r_func(struct kobject *kobj, struct attribute *attr, in sysfs_gt_attribute_r_func() argument 62 if (!is_object_gt(kobj)) { in sysfs_gt_attribute_r_func() 64 struct device *dev = kobj_to_dev(kobj); in sysfs_gt_attribute_r_func() 83 gt = intel_gt_sysfs_get_drvdata(kobj, attr->name); in sysfs_gt_attribute_r_func() 99 static ssize_t _name##_show_common(struct kobject *kobj, \ 102 u32 val = sysfs_gt_attribute_r_##_attr_type##_func(kobj, attr, \ [all …]
|
/linux/fs/nfs/ |
H A D | sysfs.c | 23 static void nfs_kset_release(struct kobject *kobj) in nfs_kset_release() argument 25 struct kset *kset = container_of(kobj, struct kset, kobj); in nfs_kset_release() 30 const struct kobject *kobj) in nfs_netns_object_child_ns_type() argument 49 ret = kobject_set_name(&nfs_kset->kobj, "nfs"); in nfs_sysfs_init() 55 nfs_kset->kobj.parent = fs_kobj; in nfs_sysfs_init() 56 nfs_kset->kobj.ktype = &nfs_kset_type; in nfs_sysfs_init() 57 nfs_kset->kobj.kset = NULL; in nfs_sysfs_init() 73 static ssize_t nfs_netns_identifier_show(struct kobject *kobj, in nfs_netns_identifier_show() argument 76 struct nfs_netns_client *c = container_of(kobj, in nfs_netns_identifier_show() 95 nfs_netns_identifier_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) nfs_netns_identifier_store() argument 120 nfs_netns_client_release(struct kobject * kobj) nfs_netns_client_release() argument 129 nfs_netns_client_namespace(const struct kobject * kobj) nfs_netns_client_namespace() argument 150 nfs_netns_object_release(struct kobject * kobj) nfs_netns_object_release() argument 158 nfs_netns_namespace(const struct kobject * kobj) nfs_netns_namespace() argument 232 shutdown_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) shutdown_show() argument 241 shutdown_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) shutdown_store() argument 295 nfs_sysfs_sb_release(struct kobject * kobj) nfs_sysfs_sb_release() argument 300 nfs_netns_server_namespace(const struct kobject * kobj) nfs_netns_server_namespace() argument [all...] |
/linux/drivers/edac/ |
H A D | edac_device_sysfs.c | 23 #define to_edacdev(k) container_of(k, struct edac_device_ctl_info, kobj) 113 #define to_ctl_info(k) container_of(k, struct edac_device_ctl_info, kobj) 117 static ssize_t edac_dev_ctl_info_show(struct kobject *kobj, in edac_dev_ctl_info_show() argument 120 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_show() 129 static ssize_t edac_dev_ctl_info_store(struct kobject *kobj, in edac_dev_ctl_info_store() argument 133 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_store() 202 static void edac_device_ctrl_master_release(struct kobject *kobj) in edac_device_ctrl_master_release() argument 204 struct edac_device_ctl_info *edac_dev = to_edacdev(kobj); in edac_device_ctrl_master_release() 244 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); in edac_device_register_sysfs_main_kobj() 257 err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, in edac_device_register_sysfs_main_kobj() [all …]
|
/linux/drivers/cpuidle/ |
H A D | sysfs.c | 131 retval = sysfs_create_group(&dev_root->kobj, &cpuidle_attr_group); in cpuidle_add_interface() 142 sysfs_remove_group(&dev->kobj, &cpuidle_attr_group); in cpuidle_remove_interface() 156 struct kobject kobj; member 159 static inline struct cpuidle_device *to_cpuidle_device(struct kobject *kobj) in to_cpuidle_device() argument 162 container_of(kobj, struct cpuidle_device_kobj, kobj); in to_cpuidle_device() 167 static ssize_t cpuidle_show(struct kobject *kobj, struct attribute *attr, in cpuidle_show() argument 171 struct cpuidle_device *dev = to_cpuidle_device(kobj); in cpuidle_show() 182 static ssize_t cpuidle_store(struct kobject *kobj, struct attribute *attr, in cpuidle_store() argument 186 struct cpuidle_device *dev = to_cpuidle_device(kobj); in cpuidle_store() 202 static void cpuidle_sysfs_release(struct kobject *kobj) in cpuidle_sysfs_release() argument [all …]
|
/linux/drivers/block/rnbd/ |
H A D | rnbd-srv-sysfs.c | 27 static void rnbd_srv_dev_release(struct kobject *kobj) in rnbd_srv_dev_release() argument 31 dev = container_of(kobj, struct rnbd_srv_dev, dev_kobj); in rnbd_srv_dev_release() 61 bdev_kobj = &disk_to_dev(bdev->bd_disk)->kobj; in rnbd_srv_create_dev_sysfs() 85 static ssize_t read_only_show(struct kobject *kobj, struct kobj_attribute *attr, in read_only_show() argument 90 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in read_only_show() 98 static ssize_t access_mode_show(struct kobject *kobj, in access_mode_show() argument 104 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in access_mode_show() 113 static ssize_t mapping_path_show(struct kobject *kobj, in mapping_path_show() argument 118 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in mapping_path_show() 126 static ssize_t rnbd_srv_dev_session_force_close_show(struct kobject *kobj, in rnbd_srv_dev_session_force_close_show() argument [all …]
|
/linux/arch/powerpc/kernel/ |
H A D | secvar-sysfs.c | 21 static ssize_t format_show(struct kobject *kobj, struct kobj_attribute *attr, in format_show() argument 38 static ssize_t size_show(struct kobject *kobj, struct kobj_attribute *attr, in size_show() argument 44 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in size_show() 47 pr_err("Error retrieving %s variable size %d\n", kobj->name, rc); in size_show() 54 static ssize_t data_read(struct file *filep, struct kobject *kobj, in data_read() argument 62 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in data_read() 65 pr_err("Error getting %s variable size %d\n", kobj->name, rc); in data_read() 74 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, data, &dsize); in data_read() 76 pr_err("Error getting %s variable %d\n", kobj->name, rc); in data_read() 87 static ssize_t update_write(struct file *filep, struct kobject *kobj, in update_write() argument [all …]
|
/linux/fs/btrfs/ |
H A D | sysfs.c | 58 struct kobject kobj; member 101 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj); 102 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj); 103 static struct kobject *get_btrfs_kobj(struct kobject *kobj); 176 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show() argument 180 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() 192 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument 202 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store() 260 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument 263 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible() [all …]
|
/linux/drivers/infiniband/ulp/rtrs/ |
H A D | rtrs-clt-sysfs.c | 19 static void rtrs_clt_path_release(struct kobject *kobj) in rtrs_clt_path_release() argument 23 clt_path = container_of(kobj, struct rtrs_clt_path, kobj); in rtrs_clt_path_release() 33 static void rtrs_clt_path_stats_release(struct kobject *kobj) in rtrs_clt_path_stats_release() argument 37 stats = container_of(kobj, struct rtrs_clt_stats, kobj_stats); in rtrs_clt_path_stats_release() 198 static ssize_t rtrs_clt_state_show(struct kobject *kobj, in rtrs_clt_state_show() argument 203 clt_path = container_of(kobj, struct rtrs_clt_path, kobj); in rtrs_clt_state_show() 213 static ssize_t rtrs_clt_reconnect_show(struct kobject *kobj, in rtrs_clt_reconnect_show() argument 219 static ssize_t rtrs_clt_reconnect_store(struct kobject *kobj, in rtrs_clt_reconnect_store() argument 226 clt_path = container_of(kobj, struct rtrs_clt_path, kobj); in rtrs_clt_reconnect_store() 243 static ssize_t rtrs_clt_disconnect_show(struct kobject *kobj, in rtrs_clt_disconnect_show() argument [all …]
|
H A D | rtrs-srv-sysfs.c | 16 static void rtrs_srv_release(struct kobject *kobj) in rtrs_srv_release() argument 20 srv_path = container_of(kobj, struct rtrs_srv_path, kobj); in rtrs_srv_release() 29 static ssize_t rtrs_srv_disconnect_show(struct kobject *kobj, in rtrs_srv_disconnect_show() argument 35 static ssize_t rtrs_srv_disconnect_store(struct kobject *kobj, in rtrs_srv_disconnect_store() argument 43 srv_path = container_of(kobj, struct rtrs_srv_path, kobj); in rtrs_srv_disconnect_store() 56 sysfs_remove_file_self(&srv_path->kobj, &attr->attr); in rtrs_srv_disconnect_store() 66 static ssize_t rtrs_srv_hca_port_show(struct kobject *kobj, in rtrs_srv_hca_port_show() argument 73 srv_path = container_of(kobj, typeof(*srv_path), kobj); in rtrs_srv_hca_port_show() 82 static ssize_t rtrs_srv_hca_name_show(struct kobject *kobj, in rtrs_srv_hca_name_show() argument 88 srv_path = container_of(kobj, struct rtrs_srv_path, kobj); in rtrs_srv_hca_name_show() [all …]
|
/linux/fs/sysfs/ |
H A D | dir.c | 40 int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) in sysfs_create_dir_ns() argument 46 if (WARN_ON(!kobj)) in sysfs_create_dir_ns() 49 if (kobj->parent) in sysfs_create_dir_ns() 50 parent = kobj->parent->sd; in sysfs_create_dir_ns() 57 kobject_get_ownership(kobj, &uid, &gid); in sysfs_create_dir_ns() 59 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), 0755, uid, gid, in sysfs_create_dir_ns() 60 kobj, ns); in sysfs_create_dir_ns() 63 sysfs_warn_dup(parent, kobject_name(kobj)); in sysfs_create_dir_ns() 67 kobj->sd = kn; in sysfs_create_dir_ns() 79 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir() argument [all …]
|
H A D | symlink.c | 67 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link() argument 72 if (!kobj) in sysfs_do_create_link() 75 parent = kobj->sd; in sysfs_do_create_link() 89 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link() argument 92 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link() 105 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn() argument 108 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn() 121 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, in sysfs_delete_link() argument 132 if (targ->sd && kernfs_ns_enabled(kobj->sd)) in sysfs_delete_link() 135 kernfs_remove_by_name_ns(kobj->sd, name, ns); in sysfs_delete_link() [all …]
|
/linux/drivers/vfio/mdev/ |
H A D | mdev_sysfs.c | 31 static ssize_t mdev_type_attr_show(struct kobject *kobj, in mdev_type_attr_show() argument 35 struct mdev_type *type = to_mdev_type(kobj); in mdev_type_attr_show() 43 static ssize_t mdev_type_attr_store(struct kobject *kobj, in mdev_type_attr_store() argument 48 struct mdev_type *type = to_mdev_type(kobj); in mdev_type_attr_store() 135 static umode_t mdev_types_core_is_visible(struct kobject *kobj, in mdev_types_core_is_visible() argument 139 !to_mdev_type(kobj)->parent->mdev_driver->show_description) in mdev_types_core_is_visible() 154 static void mdev_type_release(struct kobject *kobj) in mdev_type_release() argument 156 struct mdev_type *type = to_mdev_type(kobj); in mdev_type_release() 158 pr_debug("Releasing group %s\n", kobj->name); in mdev_type_release() 173 type->kobj.kset = parent->mdev_types_kset; in mdev_type_add() [all …]
|
/linux/arch/powerpc/platforms/pseries/ |
H A D | vas-sysfs.c | 22 struct kobject kobj; member 26 #define to_caps_entry(entry) container_of(entry, struct vas_caps_entry, kobj) 121 static ssize_t vas_type_show(struct kobject *kobj, struct attribute *attr, in vas_type_show() argument 128 centry = to_caps_entry(kobj); in vas_type_show() 138 static ssize_t vas_type_store(struct kobject *kobj, struct attribute *attr, in vas_type_store() argument 145 centry = to_caps_entry(kobj); in vas_type_store() 154 static void vas_type_release(struct kobject *kobj) in vas_type_release() argument 156 struct vas_caps_entry *centry = to_caps_entry(kobj); in vas_type_release() 178 struct kobject **kobj) in vas_caps_kobj_name() argument 183 kobject_init(¢ry->kobj, &vas_qos_attr_type); in vas_caps_kobj_name() [all …]
|
/linux/arch/powerpc/platforms/powernv/ |
H A D | opal-elog.c | 21 struct kobject kobj; member 28 #define to_elog_obj(x) container_of(x, struct elog_obj, kobj) 79 if (sysfs_remove_file_self(&elog_obj->kobj, &attr->attr)) { in elog_ack_store() 81 kobject_put(&elog_obj->kobj); in elog_ack_store() 95 static ssize_t elog_attr_show(struct kobject *kobj, in elog_attr_show() argument 103 elog = to_elog_obj(kobj); in elog_attr_show() 111 static ssize_t elog_attr_store(struct kobject *kobj, in elog_attr_store() argument 119 elog = to_elog_obj(kobj); in elog_attr_store() 132 static void elog_release(struct kobject *kobj) in elog_release() argument 136 elog = to_elog_obj(kobj); in elog_release() [all …]
|
/linux/Documentation/translations/zh_CN/core-api/ |
H A D | kobject.rst | 67 struct kobject kobj; 71 如果你有一个uio_map结构体,找到其嵌入的kobject只是一个使用kobj成员的问题。 89 struct uio_map *u_map = container_of(kp, struct uio_map, kobj); 95 struct kobject kobj; 99 #define to_map(map) container_of(map, struct uio_map, kobj) 103 struct uio_map *map = to_map(kobj); 112 void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 117 int kobject_add(struct kobject *kobj, struct kobject *parent, 121 联,在调用kobject_add()之前必须分配kobj->kset。如果kset与kobject相关联,则 128 int kobject_rename(struct kobject *kobj, const char *new_name); [all …]
|
/linux/net/sunrpc/ |
H A D | sysfs.c | 28 static void rpc_sysfs_object_release(struct kobject *kobj) in rpc_sysfs_object_release() argument 30 kfree(kobj); in rpc_sysfs_object_release() 34 rpc_sysfs_object_child_ns_type(const struct kobject *kobj) in rpc_sysfs_object_child_ns_type() argument 49 struct kobject *kobj; in rpc_sysfs_object_alloc() local 51 kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); in rpc_sysfs_object_alloc() 52 if (kobj) { in rpc_sysfs_object_alloc() 53 kobj->kset = kset; in rpc_sysfs_object_alloc() 54 if (kobject_init_and_add(kobj, &rpc_sysfs_object_type, in rpc_sysfs_object_alloc() 56 return kobj; in rpc_sysfs_object_alloc() 57 kobject_put(kobj); in rpc_sysfs_object_alloc() [all …]
|
/linux/drivers/w1/slaves/ |
H A D | w1_ds2408.c | 67 static ssize_t state_read(struct file *filp, struct kobject *kobj, in state_read() argument 71 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in state_read() 72 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", in state_read() 73 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in state_read() 76 return _read_reg(kobj_to_w1_slave(kobj), W1_F29_REG_LOGIG_STATE, buf); in state_read() 79 static ssize_t output_read(struct file *filp, struct kobject *kobj, in output_read() argument 83 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in output_read() 84 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", in output_read() 85 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in output_read() 88 return _read_reg(kobj_to_w1_slave(kobj), in output_read() 92 activity_read(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) activity_read() argument 105 cond_search_mask_read(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) cond_search_mask_read() argument 119 cond_search_polarity_read(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) cond_search_polarity_read() argument 129 status_control_read(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) status_control_read() argument 162 output_write(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) output_write() argument 212 activity_write(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) activity_write() argument 242 status_control_write(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buf,loff_t off,size_t count) status_control_write() argument [all...] |