Home
last modified time | relevance | path

Searched refs:kobject (Results 1 – 25 of 564) sorted by relevance

12345678910>>...23

/kernel/linux/linux-5.10/include/linux/
Dsysfs.h25 struct kobject;
86 umode_t (*is_visible)(struct kobject *,
88 umode_t (*is_bin_visible)(struct kobject *,
172 ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *,
174 ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *,
176 int (*mmap)(struct file *, struct kobject *, struct bin_attribute *attr,
231 ssize_t (*show)(struct kobject *, struct attribute *, char *);
232 ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t);
237 int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns);
238 void sysfs_remove_dir(struct kobject *kobj);
[all …]
Dkobject.h64 struct kobject { struct
67 struct kobject *parent; argument
83 int kobject_set_name(struct kobject *kobj, const char *name, ...); argument
85 int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
88 static inline const char *kobject_name(const struct kobject *kobj) in kobject_name()
93 extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
95 int kobject_add(struct kobject *kobj, struct kobject *parent,
98 int kobject_init_and_add(struct kobject *kobj,
99 struct kobj_type *ktype, struct kobject *parent,
102 extern void kobject_del(struct kobject *kobj);
[all …]
/kernel/linux/linux-5.10/fs/xfs/
Dxfs_sysfs.c18 ssize_t (*show)(struct kobject *kobject, char *buf);
19 ssize_t (*store)(struct kobject *kobject, const char *buf,
40 struct kobject *kobject, in xfs_sysfs_object_show() argument
46 return xfs_attr->show ? xfs_attr->show(kobject, buf) : 0; in xfs_sysfs_object_show()
51 struct kobject *kobject, in xfs_sysfs_object_store() argument
58 return xfs_attr->store ? xfs_attr->store(kobject, buf, count) : 0; in xfs_sysfs_object_store()
81 struct kobject *kobject, in bug_on_assert_store() argument
104 struct kobject *kobject, in bug_on_assert_show() argument
113 struct kobject *kobject, in log_recovery_delay_store() argument
134 struct kobject *kobject, in log_recovery_delay_show() argument
[all …]
Dxfs_sysfs.h16 to_kobj(struct kobject *kobject) in to_kobj() argument
18 return container_of(kobject, struct xfs_kobj, kobject); in to_kobj()
22 xfs_sysfs_release(struct kobject *kobject) in xfs_sysfs_release() argument
24 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release()
35 struct kobject *parent; in xfs_sysfs_init()
37 parent = parent_kobj ? &parent_kobj->kobject : NULL; in xfs_sysfs_init()
39 return kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name); in xfs_sysfs_init()
46 kobject_del(&kobj->kobject); in xfs_sysfs_del()
47 kobject_put(&kobj->kobject); in xfs_sysfs_del()
/kernel/linux/linux-5.10/fs/nfs/
Dsysfs.c20 struct kobject *nfs_client_kobj;
23 static void nfs_netns_object_release(struct kobject *kobj) in nfs_netns_object_release()
29 struct kobject *kobj) in nfs_netns_object_child_ns_type()
40 static struct kobject *nfs_netns_object_alloc(const char *name, in nfs_netns_object_alloc()
41 struct kset *kset, struct kobject *parent) in nfs_netns_object_alloc()
43 struct kobject *kobj; in nfs_netns_object_alloc()
76 static ssize_t nfs_netns_identifier_show(struct kobject *kobj, in nfs_netns_identifier_show()
81 kobject); in nfs_netns_identifier_show()
98 static ssize_t nfs_netns_identifier_store(struct kobject *kobj, in nfs_netns_identifier_store()
104 kobject); in nfs_netns_identifier_store()
[all …]
/kernel/linux/linux-5.10/Documentation/core-api/
Dkobject.rst11 Part of the difficulty in understanding the driver model - and the kobject
19 - A kobject is an object of type struct kobject. Kobjects have a name
20 and a reference count. A kobject also has a parent pointer (allowing
28 No structure should **EVER** have more than one kobject embedded within it.
32 - A ktype is the type of object that embeds a kobject. Every structure
33 that embeds a kobject needs a corresponding ktype. The ktype controls
34 what happens to the kobject when it is created and destroyed.
40 this kobject automatically.
43 of those directories corresponds to a kobject in the same kset.
52 It is rare for kernel code to create a standalone kobject, with one major
[all …]
/kernel/linux/linux-5.10/lib/
Dkobject.c28 const void *kobject_namespace(struct kobject *kobj) in kobject_namespace()
48 void kobject_get_ownership(struct kobject *kobj, kuid_t *uid, kgid_t *gid) in kobject_get_ownership()
66 static int populate_dir(struct kobject *kobj) in populate_dir()
83 static int create_dir(struct kobject *kobj) in create_dir()
129 static int get_kobj_path_length(struct kobject *kobj) in get_kobj_path_length()
132 struct kobject *parent = kobj; in get_kobj_path_length()
147 static void fill_kobj_path(struct kobject *kobj, char *path, int length) in fill_kobj_path()
149 struct kobject *parent; in fill_kobj_path()
171 char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) in kobject_get_path()
189 static void kobj_kset_join(struct kobject *kobj) in kobj_kset_join()
[all …]
/kernel/linux/linux-5.10/fs/sysfs/
Dsymlink.c21 struct kobject *target_kobj, in sysfs_do_create_link_sd()
61 int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target, in sysfs_create_link_sd()
67 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link()
89 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link()
105 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn()
121 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, in sysfs_delete_link()
143 void sysfs_remove_link(struct kobject *kobj, const char *name) in sysfs_remove_link()
166 int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *targ, in sysfs_rename_link_ns()
Dfile.c28 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops()
43 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show()
84 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read()
108 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read()
134 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write()
147 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write()
168 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap()
173 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr) in sysfs_notify()
256 struct kobject *kobj = parent->priv; in sysfs_add_file_mode_ns()
322 int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr, in sysfs_create_file_ns()
[all …]
Dgroup.c34 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files()
108 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group()
172 int sysfs_create_group(struct kobject *kobj, in sysfs_create_group()
179 static int internal_create_groups(struct kobject *kobj, int update, in internal_create_groups()
212 int sysfs_create_groups(struct kobject *kobj, in sysfs_create_groups()
230 int sysfs_update_groups(struct kobject *kobj, in sysfs_update_groups()
255 int sysfs_update_group(struct kobject *kobj, in sysfs_update_group()
270 void sysfs_remove_group(struct kobject *kobj, in sysfs_remove_group()
305 void sysfs_remove_groups(struct kobject *kobj, in sysfs_remove_groups()
326 int sysfs_merge_group(struct kobject *kobj, in sysfs_merge_group()
[all …]
Ddir.c40 int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) in sysfs_create_dir_ns()
80 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir()
106 int sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, in sysfs_rename_dir_ns()
118 int sysfs_move_dir_ns(struct kobject *kobj, struct kobject *new_parent_kobj, in sysfs_move_dir_ns()
135 int sysfs_create_mount_point(struct kobject *parent_kobj, const char *name) in sysfs_create_mount_point()
156 void sysfs_remove_mount_point(struct kobject *parent_kobj, const char *name) in sysfs_remove_mount_point()
/kernel/linux/linux-5.10/kernel/
Dksysfs.c31 static ssize_t uevent_seqnum_show(struct kobject *kobj, in uevent_seqnum_show()
40 static ssize_t uevent_helper_show(struct kobject *kobj, in uevent_helper_show()
45 static ssize_t uevent_helper_store(struct kobject *kobj, in uevent_helper_store()
61 static ssize_t profiling_show(struct kobject *kobj, in profiling_show()
66 static ssize_t profiling_store(struct kobject *kobj, in profiling_store()
92 static ssize_t kexec_loaded_show(struct kobject *kobj, in kexec_loaded_show()
99 static ssize_t kexec_crash_loaded_show(struct kobject *kobj, in kexec_crash_loaded_show()
106 static ssize_t kexec_crash_size_show(struct kobject *kobj, in kexec_crash_size_show()
111 static ssize_t kexec_crash_size_store(struct kobject *kobj, in kexec_crash_size_store()
130 static ssize_t vmcoreinfo_show(struct kobject *kobj, in vmcoreinfo_show()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/
Dsysfs_engines.c15 struct kobject base;
19 static struct intel_engine_cs *kobj_to_engine(struct kobject *kobj) in kobj_to_engine()
25 name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in name_show()
34 class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in class_show()
43 inst_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in inst_show()
52 mmio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in mmio_show()
127 caps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in caps_show()
138 all_caps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in all_caps_show()
147 max_spin_store(struct kobject *kobj, struct kobj_attribute *attr, in max_spin_store()
184 max_spin_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in max_spin_show()
[all …]
/kernel/linux/linux-5.10/kernel/power/
Dmain.c100 static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_show()
106 static ssize_t pm_async_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_store()
124 static ssize_t mem_sleep_show(struct kobject *kobj, struct kobj_attribute *attr, in mem_sleep_show()
166 static ssize_t mem_sleep_store(struct kobject *kobj, struct kobj_attribute *attr, in mem_sleep_store()
202 static ssize_t sync_on_suspend_show(struct kobject *kobj, in sync_on_suspend_show()
208 static ssize_t sync_on_suspend_store(struct kobject *kobj, in sync_on_suspend_store()
239 static ssize_t pm_test_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_show()
260 static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_store()
311 static ssize_t _name##_show(struct kobject *kobj, \
329 static ssize_t last_failed_dev_show(struct kobject *kobj, in last_failed_dev_show()
[all …]
/kernel/linux/linux-5.10/fs/hmdfs/comm/
Ddevice_node.c133 static ssize_t sbi_cmd_show(struct kobject *kobj, struct sbi_attribute *attr, in sbi_cmd_show()
164 static ssize_t sbi_cmd_store(struct kobject *kobj, struct sbi_attribute *attr, in sbi_cmd_store()
194 static ssize_t sbi_status_show(struct kobject *kobj, struct sbi_attribute *attr, in sbi_status_show()
228 static ssize_t sbi_status_store(struct kobject *kobj, in sbi_status_store()
238 static ssize_t sbi_stat_show(struct kobject *kobj, struct sbi_attribute *attr, in sbi_stat_show()
271 static ssize_t sbi_stat_store(struct kobject *kobj, struct sbi_attribute *attr, in sbi_stat_store()
298 static ssize_t sbi_dcache_precision_show(struct kobject *kobj, in sbi_dcache_precision_show()
306 static ssize_t sbi_dcache_precision_store(struct kobject *kobj, in sbi_dcache_precision_store()
329 static ssize_t sbi_dcache_threshold_show(struct kobject *kobj, in sbi_dcache_threshold_show()
336 static ssize_t sbi_dcache_threshold_store(struct kobject *kobj, in sbi_dcache_threshold_store()
[all …]
Ddevice_node.h60 ssize_t (*show)(struct kobject *kobj, struct sbi_attribute *attr,
62 ssize_t (*store)(struct kobject *kobj, struct sbi_attribute *attr,
68 ssize_t (*show)(struct kobject *kobj, struct peer_attribute *attr,
70 ssize_t (*store)(struct kobject *kobj, struct peer_attribute *attr,
94 static inline struct hmdfs_sb_info *to_sbi(struct kobject *x) in to_sbi()
104 static inline struct hmdfs_peer *to_peer(struct kobject *x) in to_peer()
/kernel/linux/linux-5.10/Documentation/translations/zh_CN/filesystems/
Dsysfs.txt27 sysfs - 用于导出内核对象(kobject)的文件系统
42 sysfs 始终与 kobject 的底层结构紧密相关。请阅读
43 Documentation/core-api/kobject.rst 文档以获得更多关于 kobject 接口的
59 任何 kobject 在系统中注册,就会有一个目录在 sysfs 中被创建。这个
60 目录是作为该 kobject 的父对象所在目录的子目录创建的,以准确地传递
65 目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于
66 kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject
73 kobject 的属性可在文件系统中以普通文件的形式导出。Sysfs 为属性定义
94 int sysfs_create_file(struct kobject * kobj, const struct attribute * attr);
95 void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr);
[all …]
/kernel/linux/linux-5.10/net/batman-adv/
Dsysfs.h36 ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
43 ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
51 int batadv_sysfs_add_hardif(struct kobject **hardif_obj,
53 void batadv_sysfs_del_hardif(struct kobject **hardif_obj);
70 static inline int batadv_sysfs_add_hardif(struct kobject **hardif_obj, in batadv_sysfs_add_hardif()
76 static inline void batadv_sysfs_del_hardif(struct kobject **hardif_obj) in batadv_sysfs_del_hardif()
Dsysfs.c56 static struct net_device *batadv_kobj_to_netdev(struct kobject *obj) in batadv_kobj_to_netdev()
63 static struct batadv_priv *batadv_kobj_to_batpriv(struct kobject *obj) in batadv_kobj_to_batpriv()
76 static struct batadv_priv *batadv_vlan_kobj_to_batpriv(struct kobject *obj) in batadv_vlan_kobj_to_batpriv()
98 batadv_kobj_to_vlan(struct batadv_priv *bat_priv, struct kobject *obj) in batadv_kobj_to_vlan()
137 ssize_t batadv_store_##_name(struct kobject *kobj, \
155 ssize_t batadv_show_##_name(struct kobject *kobj, \
176 ssize_t batadv_store_##_name(struct kobject *kobj, \
196 ssize_t batadv_show_##_name(struct kobject *kobj, \
215 ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \
237 ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdkfd/
Dkfd_topology.h113 struct kobject *kobj;
135 struct kobject *kobj;
154 struct kobject *kobj;
177 struct kobject *kobj_node;
178 struct kobject *kobj_mem;
179 struct kobject *kobj_cache;
180 struct kobject *kobj_iolink;
181 struct kobject *kobj_perf;
196 struct kobject *kobj_topology;
197 struct kobject *kobj_nodes;
/kernel/linux/linux-5.10/fs/btrfs/
Dsysfs.c34 struct kobject kobj;
73 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj);
74 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj);
147 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show()
163 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store()
231 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible()
297 static ssize_t rmdir_subvol_show(struct kobject *kobj, in rmdir_subvol_show()
304 static ssize_t supported_checksums_show(struct kobject *kobj, in supported_checksums_show()
325 static ssize_t send_stream_version_show(struct kobject *kobj, in send_stream_version_show()
357 static ssize_t btrfs_discardable_bytes_show(struct kobject *kobj, in btrfs_discardable_bytes_show()
[all …]
/kernel/linux/linux-5.10/drivers/staging/hungtask/
Dhungtask_user.h13 ssize_t htuser_list_store(struct kobject *kobj,
15 ssize_t htuser_list_show(struct kobject *kobj,
22 static inline ssize_t htuser_list_store(struct kobject *kobj, in htuser_list_store()
28 static inline ssize_t htuser_list_show(struct kobject *kobj, in htuser_list_show()
/kernel/linux/linux-5.10/arch/x86/kernel/
Dksysfs.c22 static ssize_t version_show(struct kobject *kobj, in version_show()
30 static ssize_t boot_params_data_read(struct file *fp, struct kobject *kobj, in boot_params_data_read()
62 static int kobj_to_setup_data_nr(struct kobject *kobj, int *nr) in kobj_to_setup_data_nr()
135 static ssize_t type_show(struct kobject *kobj, in type_show()
174 struct kobject *kobj, in setup_data_data_read()
271 static int __init create_setup_data_node(struct kobject *parent, in create_setup_data_node()
272 struct kobject **kobjp, int nr) in create_setup_data_node()
276 struct kobject *kobj; in create_setup_data_node()
300 static void __init cleanup_setup_data_node(struct kobject *kobj) in cleanup_setup_data_node()
327 static int __init create_setup_data_nodes(struct kobject *parent) in create_setup_data_nodes()
[all …]
/kernel/linux/linux-5.10/drivers/staging/greybus/
Daudio_manager_sysfs.c14 static ssize_t manager_sysfs_add_store(struct kobject *kobj, in manager_sysfs_add_store()
39 static ssize_t manager_sysfs_remove_store(struct kobject *kobj, in manager_sysfs_remove_store()
60 static ssize_t manager_sysfs_dump_store(struct kobject *kobj, in manager_sysfs_dump_store()
84 static void manager_sysfs_init_attribute(struct kobject *kobj, in manager_sysfs_init_attribute()
96 void gb_audio_manager_sysfs_init(struct kobject *kobj) in gb_audio_manager_sysfs_init()
/kernel/linux/linux-5.10/samples/kobject/
Dkobject-example.c28 static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr, in foo_show()
34 static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, in foo_store()
54 static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, in b_show()
66 static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, in b_store()
109 static struct kobject *example_kobj;

12345678910>>...23