| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | sysfs.h | 25 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 …]
|
| H A D | kobject.h | 65 struct kobject { struct 68 struct kobject *parent; argument 89 int kobject_set_name(struct kobject *kobj, const char *name, ...); argument 91 int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, 94 static inline const char *kobject_name(const struct kobject *kobj) in kobject_name() 99 extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 101 int kobject_add(struct kobject *kobj, struct kobject *parent, 104 int kobject_init_and_add(struct kobject *kobj, 105 struct kobj_type *ktype, struct kobject *parent, 108 extern void kobject_del(struct kobject *kobj); [all …]
|
| /OK3568_Linux_fs/kernel/fs/xfs/ |
| H A D | xfs_sysfs.c | 18 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 …]
|
| H A D | xfs_sysfs.h | 16 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()
|
| /OK3568_Linux_fs/kernel/Documentation/core-api/ |
| H A D | kobject.rst | 11 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 …]
|
| /OK3568_Linux_fs/kernel/fs/nfs/ |
| H A D | sysfs.c | 20 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 …]
|
| /OK3568_Linux_fs/kernel/lib/ |
| H A D | kobject.c | 28 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 …]
|
| /OK3568_Linux_fs/kernel/kernel/ |
| H A D | ksysfs.c | 31 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 …]
|
| /OK3568_Linux_fs/kernel/fs/sysfs/ |
| H A D | symlink.c | 21 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()
|
| H A D | file.c | 28 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 …]
|
| H A D | group.c | 34 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 …]
|
| H A D | dir.c | 40 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()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/i915/gt/ |
| H A D | sysfs_engines.c | 15 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 …]
|
| /OK3568_Linux_fs/kernel/kernel/power/ |
| H A D | main.c | 100 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 …]
|
| /OK3568_Linux_fs/kernel/fs/btrfs/ |
| H A D | sysfs.c | 34 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 …]
|
| /OK3568_Linux_fs/kernel/Documentation/translations/zh_CN/filesystems/ |
| H A D | sysfs.txt | 27 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/amd/amdkfd/ |
| H A D | kfd_topology.h | 113 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;
|
| /OK3568_Linux_fs/kernel/net/batman-adv/ |
| H A D | sysfs.h | 36 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()
|
| H A D | sysfs.c | 56 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 …]
|
| /OK3568_Linux_fs/kernel/arch/x86/kernel/ |
| H A D | ksysfs.c | 22 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 …]
|
| /OK3568_Linux_fs/kernel/arch/s390/kernel/ |
| H A D | ipl.c | 189 static ssize_t sys_##_prefix##_##_name##_show(struct kobject *kobj, \ 197 static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ 230 static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ 247 static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ 289 static ssize_t ipl_type_show(struct kobject *kobj, struct kobj_attribute *attr, in ipl_type_show() 297 static ssize_t ipl_secure_show(struct kobject *kobj, in ipl_secure_show() 306 static ssize_t ipl_has_secure_show(struct kobject *kobj, in ipl_has_secure_show() 315 static ssize_t ipl_vm_parm_show(struct kobject *kobj, in ipl_vm_parm_show() 328 static ssize_t sys_ipl_device_show(struct kobject *kobj, in sys_ipl_device_show() 349 static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj, in ipl_parameter_read() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/edac/ |
| H A D | edac_device_sysfs.c | 117 static ssize_t edac_dev_ctl_info_show(struct kobject *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() 201 static void edac_device_ctrl_master_release(struct kobject *kobj) in edac_device_ctrl_master_release() 245 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); in edac_device_register_sysfs_main_kobj() 325 static void edac_device_ctrl_instance_release(struct kobject *kobj) in edac_device_ctrl_instance_release() 346 static ssize_t edac_dev_instance_show(struct kobject *kobj, in edac_dev_instance_show() 358 static ssize_t edac_dev_instance_store(struct kobject *kobj, in edac_dev_instance_store() 414 static ssize_t block_ue_count_show(struct kobject *kobj, in block_ue_count_show() 422 static ssize_t block_ce_count_show(struct kobject *kobj, in block_ce_count_show() 431 static void edac_device_ctrl_block_release(struct kobject *kobj) in edac_device_ctrl_block_release() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/block/rnbd/ |
| H A D | rnbd-clt-sysfs.c | 28 static struct kobject *rnbd_devs_kobj; 206 static ssize_t state_show(struct kobject *kobj, in state_show() 231 static ssize_t mapping_path_show(struct kobject *kobj, in mapping_path_show() 244 static ssize_t access_mode_show(struct kobject *kobj, in access_mode_show() 258 static ssize_t rnbd_clt_unmap_dev_show(struct kobject *kobj, in rnbd_clt_unmap_dev_show() 265 static ssize_t rnbd_clt_unmap_dev_store(struct kobject *kobj, in rnbd_clt_unmap_dev_store() 328 static ssize_t rnbd_clt_resize_dev_show(struct kobject *kobj, in rnbd_clt_resize_dev_show() 337 static ssize_t rnbd_clt_resize_dev_store(struct kobject *kobj, in rnbd_clt_resize_dev_store() 362 static ssize_t rnbd_clt_remap_dev_show(struct kobject *kobj, in rnbd_clt_remap_dev_show() 369 static ssize_t rnbd_clt_remap_dev_store(struct kobject *kobj, in rnbd_clt_remap_dev_store() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/parisc/ |
| H A D | pdc_stable.c | 93 struct kobject kobj; 435 pdcspath_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) in pdcspath_attr_show() 455 pdcspath_attr_store(struct kobject *kobj, struct attribute *attr, in pdcspath_attr_store() 515 static ssize_t pdcs_size_read(struct kobject *kobj, in pdcs_size_read() 535 static ssize_t pdcs_auto_read(struct kobject *kobj, in pdcs_auto_read() 560 static ssize_t pdcs_autoboot_read(struct kobject *kobj, in pdcs_autoboot_read() 570 static ssize_t pdcs_autosearch_read(struct kobject *kobj, in pdcs_autosearch_read() 582 static ssize_t pdcs_timer_read(struct kobject *kobj, in pdcs_timer_read() 607 static ssize_t pdcs_osid_read(struct kobject *kobj, in pdcs_osid_read() 627 static ssize_t pdcs_osdep1_read(struct kobject *kobj, in pdcs_osdep1_read() [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/kernel/ |
| H A D | cacheinfo.c | 32 struct kobject *kobj; /* bare (not embedded) kobject for cache 42 struct kobject kobj; 134 static struct cache_index_dir *kobj_to_cache_index_dir(struct kobject *k) in kobj_to_cache_index_dir() 496 struct kobject *kobj = NULL; in cacheinfo_create_cache_dir() 523 static void cache_index_release(struct kobject *kobj) in cache_index_release() 535 static ssize_t cache_index_show(struct kobject *k, struct attribute *attr, char *buf) in cache_index_show() 544 static struct cache *index_kobj_to_cache(struct kobject *k) in index_kobj_to_cache() 553 static ssize_t size_show(struct kobject *k, struct kobj_attribute *attr, char *buf) in size_show() 570 static ssize_t line_size_show(struct kobject *k, struct kobj_attribute *attr, char *buf) in line_size_show() 586 static ssize_t nr_sets_show(struct kobject *k, struct kobj_attribute *attr, char *buf) in nr_sets_show() [all …]
|