Home
last modified time | relevance | path

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

12345678910>>...19

/linux/Documentation/translations/zh_CN/core-api/
H A Dkobject.rst3 :Original: Documentation/core-api/kobject.rst
21 理解驱动模型和建立在其上的kobject抽象的部分的困难在于,没有明显的切入点。
26 - 一个kobject是一个kobject结构体类型的对象。Kobjects有一个名字和一个
27 引用计数。一个kobject也有一个父指针(允许对象被排列成层次结构),一个
33 任何结构体都 **不应该** 有一个以上的kobject嵌入其中。如果有的话,对象的引用计
36 - ktype是嵌入一个kobject的对象的类型。每个嵌入kobject的结构体都需要一个
37 相应的ktype。ktype控制着kobject在被创建和销毁时的行为。
41 但你可以安全地忽略这个实现细节,因为kset的核心代码会自动处理这个kobject。
44 于同一个kset中的一个kobject。
53 内核代码很少创建孤立的kobject,只有一个主要的例外,下面会解释。相反,
[all …]
/linux/include/linux/
H A Dsysfs.h25 struct kobject;
108 umode_t (*is_visible)(struct kobject *,
110 umode_t (*is_visible_const)(struct kobject *,
113 umode_t (*is_bin_visible)(struct kobject *,
115 size_t (*bin_size)(struct kobject *,
170 struct kobject *kobj, struct attribute *attr, int n) \
202 struct kobject *kobj, struct attribute *a, int n) \
217 struct kobject *kobj, const struct bin_attribute *attr, int n) \
226 struct kobject *kobj, const struct bin_attribute *a, int n) \
316 ssize_t (*read)(struct file *, struct kobject *, const struct bin_attribute *,
[all …]
/linux/fs/xfs/
H A Dxfs_sysfs.c22 ssize_t (*show)(struct kobject *kobject, char *buf);
23 ssize_t (*store)(struct kobject *kobject, const char *buf,
44 struct kobject *kobject, in xfs_sysfs_object_show() argument
50 return xfs_attr->show ? xfs_attr->show(kobject, buf) : 0; in xfs_sysfs_object_show()
55 struct kobject *kobject, in xfs_sysfs_object_store() argument
62 return xfs_attr->store ? xfs_attr->store(kobject, buf, count) : 0; in xfs_sysfs_object_store()
86 struct kobject *kobject, in bug_on_assert_store() argument
109 struct kobject *kobject, in bug_on_assert_show() argument
118 struct kobject *kobject, in log_recovery_delay_store() argument
139 struct kobject *kobject, in log_recovery_delay_show() argument
[all …]
H A Dxfs_sysfs.h15 to_kobj(struct kobject *kobject) in to_kobj() argument
17 return container_of(kobject, struct xfs_kobj, kobject); in to_kobj()
21 xfs_sysfs_release(struct kobject *kobject) in xfs_sysfs_release() argument
23 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release()
34 struct kobject *parent; in xfs_sysfs_init()
37 parent = parent_kobj ? &parent_kobj->kobject : NULL; in xfs_sysfs_init()
39 err = kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name); in xfs_sysfs_init()
41 kobject_put(&kobj->kobject); in xfs_sysfs_init()
50 kobject_del(&kobj->kobject); in xfs_sysfs_del()
51 kobject_put(&kobj->kobject); in xfs_sysfs_del()
/linux/net/sunrpc/
H A Dsysfs.c6 #include <linux/kobject.h>
27 static struct kobject *rpc_sunrpc_client_kobj, *rpc_sunrpc_xprt_switch_kobj;
29 static void rpc_sysfs_object_release(struct kobject *kobj) in rpc_sysfs_object_release()
35 rpc_sysfs_object_child_ns_type(const struct kobject *kobj) in rpc_sysfs_object_child_ns_type()
46 static struct kobject *rpc_sysfs_object_alloc(const char *name, in rpc_sysfs_object_alloc()
48 struct kobject *parent) in rpc_sysfs_object_alloc()
50 struct kobject *kobj; in rpc_sysfs_object_alloc()
64 rpc_sysfs_client_kobj_get_clnt(struct kobject *kobj) in rpc_sysfs_client_kobj_get_clnt()
67 struct rpc_sysfs_client, kobject); in rpc_sysfs_client_kobj_get_clnt()
74 rpc_sysfs_xprt_kobj_get_xprt(struct kobject *kob
[all...]
/linux/fs/nfs/
H A Dsysfs.c25 static void nfs_kset_release(struct kobject *kobj) in nfs_kset_release()
32 const struct kobject *kobj) in nfs_netns_object_child_ns_type()
75 static ssize_t nfs_netns_identifier_show(struct kobject *kobj, in nfs_netns_identifier_show()
80 kobject); in nfs_netns_identifier_show()
97 static ssize_t nfs_netns_identifier_store(struct kobject *kobj, in nfs_netns_identifier_store()
103 kobject); in nfs_netns_identifier_store()
122 static void nfs_netns_client_release(struct kobject *kobj) in nfs_netns_client_release()
126 kobject); in nfs_netns_client_release()
131 static const struct ns_common *nfs_netns_client_namespace(const struct kobject *kobj) in nfs_netns_client_namespace()
134 kobject)->net); in nfs_netns_client_namespace()
[all …]
H A Dsysfs.h12 struct kobject kobject; member
13 struct kobject nfs_net_kobj;
18 extern struct kobject *nfs_net_kobj;
/linux/drivers/gpu/drm/xe/
H A Dxe_hw_engine_class_sysfs.c17 struct kobject *parent);
35 static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj) in xe_hw_engine_sysfs_kobj_release()
40 static ssize_t xe_hw_engine_class_sysfs_attr_show(struct kobject *kobj, in xe_hw_engine_class_sysfs_attr_show()
56 static ssize_t xe_hw_engine_class_sysfs_attr_store(struct kobject *kobj, in xe_hw_engine_class_sysfs_attr_store()
88 static ssize_t job_timeout_max_store(struct kobject *kobj, in job_timeout_max_store()
113 static ssize_t job_timeout_max_show(struct kobject *kobj, in job_timeout_max_show()
124 static ssize_t job_timeout_min_store(struct kobject *kobj, in job_timeout_min_store()
149 static ssize_t job_timeout_min_show(struct kobject *kobj, in job_timeout_min_show()
160 static ssize_t job_timeout_store(struct kobject *kobj, in job_timeout_store()
182 static ssize_t job_timeout_show(struct kobject *kobj, in job_timeout_show()
[all …]
H A Dxe_gt_freq.c66 static ssize_t act_freq_show(struct kobject *kobj, in act_freq_show()
80 static ssize_t cur_freq_show(struct kobject *kobj, in cur_freq_show()
97 static ssize_t rp0_freq_show(struct kobject *kobj, in rp0_freq_show()
107 static ssize_t rpe_freq_show(struct kobject *kobj, in rpe_freq_show()
121 static ssize_t rpa_freq_show(struct kobject *kobj, in rpa_freq_show()
135 static ssize_t rpn_freq_show(struct kobject *kobj, in rpn_freq_show()
145 static ssize_t min_freq_show(struct kobject *kobj, in min_freq_show()
161 static ssize_t min_freq_store(struct kobject *kobj, in min_freq_store()
182 static ssize_t max_freq_show(struct kobject *kobj, in max_freq_show()
198 static ssize_t max_freq_store(struct kobject *kobj, in max_freq_store()
[all …]
/linux/fs/sysfs/
H A 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()
H A Dgroup.c34 static umode_t __first_visible(const struct attribute_group *grp, struct kobject *kobj) in __first_visible()
48 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files()
129 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group()
212 int sysfs_create_group(struct kobject *kobj, in sysfs_create_group()
219 static int internal_create_groups(struct kobject *kobj, int update, in internal_create_groups()
252 int sysfs_create_groups(struct kobject *kobj, in sysfs_create_groups()
270 int sysfs_update_groups(struct kobject *kobj, in sysfs_update_groups()
295 int sysfs_update_group(struct kobject *kobj, in sysfs_update_group()
310 void sysfs_remove_group(struct kobject *kobj, in sysfs_remove_group()
344 void sysfs_remove_groups(struct kobject *kobj, in sysfs_remove_groups()
[all …]
H A Ddir.c40 int sysfs_create_dir_ns(struct kobject *kobj, const struct ns_common *ns) in sysfs_create_dir_ns()
79 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir()
105 int sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, in sysfs_rename_dir_ns()
117 int sysfs_move_dir_ns(struct kobject *kobj, struct kobject *new_parent_kobj, in sysfs_move_dir_ns()
134 int sysfs_create_mount_point(struct kobject *parent_kobj, const char *name) in sysfs_create_mount_point()
155 void sysfs_remove_mount_point(struct kobject *parent_kobj, const char *name) in sysfs_remove_mount_point()
/linux/drivers/platform/x86/hp/hp-bioscfg/
H A Dbioscfg.h134 struct kobject *attr_name_kobj;
143 struct kobject *attr_name_kobj;
153 struct kobject *attr_name_kobj;
162 struct kobject *attr_name_kobj;
171 struct kobject *attr_name_kobj;
196 struct kobject *attr_name_kobj;
220 struct kobject *sure_start_attr_kobj;
288 static int get_##type##_instance_id(struct kobject *kobj) \
301 static ssize_t name##_show(struct kobject *kobj, struct kobj_attribute *attr, \
311 static ssize_t name##_show(struct kobject *kobj, struct kobj_attribute *attr, \
[all …]
/linux/mm/
H A Dhugetlb_sysfs.c23 static struct kobject *hugepages_kobj;
24 static struct kobject *hstate_kobjs[HUGE_MAX_HSTATE];
26 static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp);
28 static struct hstate *kobj_to_hstate(struct kobject *kobj, int *nidp) in kobj_to_hstate()
42 static ssize_t nr_hugepages_show_common(struct kobject *kobj, in nr_hugepages_show_common()
59 struct kobject *kobj, const char *buf, in nr_hugepages_store_common()
75 static ssize_t nr_hugepages_show(struct kobject *kobj, in nr_hugepages_show()
81 static ssize_t nr_hugepages_store(struct kobject *kobj, in nr_hugepages_store()
94 static ssize_t nr_hugepages_mempolicy_show(struct kobject *kobj, in nr_hugepages_mempolicy_show()
101 static ssize_t nr_hugepages_mempolicy_store(struct kobject *kobj, in nr_hugepages_mempolicy_store()
[all …]
/linux/drivers/gpu/drm/i915/gt/
H A Dsysfs_engines.c16 struct kobject base;
20 static struct intel_engine_cs *kobj_to_engine(struct kobject *kobj) in kobj_to_engine()
26 name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in name_show()
35 class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in class_show()
44 inst_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in inst_show()
53 mmio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in mmio_show()
122 caps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in caps_show()
133 all_caps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in all_caps_show()
142 max_spin_store(struct kobject *kobj, struct kobj_attribute *attr, in max_spin_store()
180 max_spin_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in max_spin_show()
[all …]
H A Dintel_gt_sysfs.h17 bool is_object_gt(struct kobject *kobj);
19 struct drm_i915_private *kobj_to_i915(struct kobject *kobj);
21 static inline struct intel_gt *kobj_to_gt(struct kobject *kobj) in kobj_to_gt()
28 struct intel_gt *intel_gt_sysfs_get_drvdata(struct kobject *kobj,
/linux/fs/btrfs/
H A Dsysfs.c58 struct kobject kobj;
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);
175 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show()
191 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store()
259 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible()
350 static ssize_t rmdir_subvol_show(struct kobject *kobj, in rmdir_subvol_show()
357 static ssize_t supported_checksums_show(struct kobject *kobj, in supported_checksums_show()
378 static ssize_t send_stream_version_show(struct kobject *kobj, in send_stream_version_show()
[all …]
/linux/kernel/power/
H A Dmain.c193 static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_show()
199 static ssize_t pm_async_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_store()
217 static ssize_t mem_sleep_show(struct kobject *kobj, struct kobj_attribute *attr, in mem_sleep_show()
262 static ssize_t mem_sleep_store(struct kobject *kobj, struct kobj_attribute *attr, in mem_sleep_store()
298 static ssize_t sync_on_suspend_show(struct kobject *kobj, in sync_on_suspend_show()
304 static ssize_t sync_on_suspend_store(struct kobject *kobj, in sync_on_suspend_store()
335 static ssize_t pm_test_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_show()
356 static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_store()
468 static ssize_t _name##_show(struct kobject *kobj, \
482 static ssize_t _name##_show(struct kobject *kobj, \
[all …]
/linux/drivers/platform/x86/dell/dell-wmi-sysman/
H A Ddell-wmi-sysman.h27 struct kobject *attr_name_kobj;
38 struct kobject *attr_name_kobj;
50 struct kobject *attr_name_kobj;
61 struct kobject *attr_name_kobj;
107 static int get_##type##_instance_id(struct kobject *kobj) \
118 static ssize_t name##_show(struct kobject *kobj, struct kobj_attribute *attr, \
128 static ssize_t name##_show(struct kobject *kobj, struct kobj_attribute *attr, \
138 static ssize_t curr_val##_store(struct kobject *kobj, \
168 struct kobject *attr_name_kobj, u32 enum_property_count);
173 struct kobject *attr_name_kobj);
[all …]
/linux/Documentation/translations/zh_TW/filesystems/
H A Dsysfs.txt30 sysfs - 用於導出內核對象(kobject)的文件系統
45 sysfs 始終與 kobject 的底層結構緊密相關。請閱讀
46 Documentation/core-api/kobject.rst 文檔以獲得更多關於 kobject 接口的
62 任何 kobject 在系統中註冊,就會有一個目錄在 sysfs 中被創建。這個
63 目錄是作爲該 kobject 的父對象所在目錄的子目錄創建的,以準確地傳遞
68 目錄的 kobject 的指針。以前,這個 kobject 指針被 sysfs 直接用於
69 kobject 文件打開和關閉的引用計數。而現在的 sysfs 實現中,kobject
76 kobject 的屬性可在文件系統中以普通文件的形式導出。Sysfs 爲屬性定義
97 int sysfs_create_file(struct kobject * kobj, const struct attribute * attr);
98 void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr);
[all …]
/linux/Documentation/translations/zh_CN/filesystems/
H A 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 …]
/linux/arch/x86/kernel/
H A 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 …]
/linux/drivers/block/rnbd/
H A Drnbd-srv-sysfs.c25 static struct kobject *rnbd_devs_kobj;
27 static void rnbd_srv_dev_release(struct kobject *kobj) in rnbd_srv_dev_release()
44 struct kobject *bdev_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()
98 static ssize_t access_mode_show(struct kobject *kobj, in access_mode_show()
113 static ssize_t mapping_path_show(struct kobject *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()
133 static ssize_t rnbd_srv_dev_session_force_close_store(struct kobject *kobj, in rnbd_srv_dev_session_force_close_store()
179 static void rnbd_srv_sess_dev_release(struct kobject *kobj) in rnbd_srv_sess_dev_release()
H A Drnbd-clt-sysfs.c30 static struct kobject *rnbd_devs_kobj;
225 static ssize_t state_show(struct kobject *kobj, in state_show()
250 static ssize_t nr_poll_queues_show(struct kobject *kobj, in nr_poll_queues_show()
263 static ssize_t mapping_path_show(struct kobject *kobj, in mapping_path_show()
276 static ssize_t access_mode_show(struct kobject *kobj, in access_mode_show()
289 static ssize_t rnbd_clt_unmap_dev_show(struct kobject *kobj, in rnbd_clt_unmap_dev_show()
296 static ssize_t rnbd_clt_unmap_dev_store(struct kobject *kobj, in rnbd_clt_unmap_dev_store()
359 static ssize_t rnbd_clt_resize_dev_show(struct kobject *kobj, in rnbd_clt_resize_dev_show()
367 static ssize_t rnbd_clt_resize_dev_store(struct kobject *kobj, in rnbd_clt_resize_dev_store()
392 static ssize_t rnbd_clt_remap_dev_show(struct kobject *kobj, in rnbd_clt_remap_dev_show()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_module_attach.c52 struct file *file, struct kobject *kobj, in BPF_PROG()
61 struct file *file, struct kobject *kobj, in BPF_PROG()
70 struct file *file, struct kobject *kobj, in BPF_PROG()
80 struct file *file, struct kobject *kobj, in BPF_PROG()
91 struct file *file, struct kobject *kobj, in BPF_PROG()
114 struct file *file, struct kobject *kobj, in BPF_PROG()

12345678910>>...19