Home
last modified time | relevance | path

Searched refs:kset (Results 1 – 25 of 89) sorted by relevance

1234

/linux-6.6.21/Documentation/translations/zh_CN/core-api/
Dkobject.rst39 - 一个kset是一组kobjects。这些kobjects可以是相同的ktype或者属于不同的
40 ktype。kset是kobjects集合的基本容器类型。Ksets包含它们自己的kobjects,
41 但你可以安全地忽略这个实现细节,因为kset的核心代码会自动处理这个kobject。
44 于同一个kset中的一个kobject。
120 这将正确设置kobject的父级和kobject的名称。如果该kobject要与一个特定的kset相关
121 联,在调用kobject_add()之前必须分配kobj->kset。如果kset与kobject相关联,则
122 kobject的父级可以在调用kobject_add()时被设置为NULL,则kobject的父级将是kset
283 一个kset仅仅是一个希望相互关联的kobjects的集合。没有限制它们必须是相
286 一个kset有以下功能:
288 - 它像是一个包含一组对象的袋子。一个kset可以被内核用来追踪“所有块
[all …]
/linux-6.6.21/lib/
Dkobject.c176 if (!kobj->kset) in kobj_kset_join()
179 kset_get(kobj->kset); in kobj_kset_join()
180 spin_lock(&kobj->kset->list_lock); in kobj_kset_join()
181 list_add_tail(&kobj->entry, &kobj->kset->list); in kobj_kset_join()
182 spin_unlock(&kobj->kset->list_lock); in kobj_kset_join()
188 if (!kobj->kset) in kobj_kset_leave()
191 spin_lock(&kobj->kset->list_lock); in kobj_kset_leave()
193 spin_unlock(&kobj->kset->list_lock); in kobj_kset_leave()
194 kset_put(kobj->kset); in kobj_kset_leave()
228 if (kobj->kset) { in kobject_add_internal()
[all …]
Dkobject_uevent.c393 if (!ops && kobj->kset) { in kobject_uevent_net_broadcast()
394 struct kobject *ksobj = &kobj->kset->kobj; in kobject_uevent_net_broadcast()
465 struct kset *kset; in kobject_uevent_env() local
482 while (!top_kobj->kset && top_kobj->parent) in kobject_uevent_env()
485 if (!top_kobj->kset) { in kobject_uevent_env()
492 kset = top_kobj->kset; in kobject_uevent_env()
493 uevent_ops = kset->uevent_ops; in kobject_uevent_env()
515 subsystem = kobject_name(&kset->kobj); in kobject_uevent_env()
/linux-6.6.21/include/linux/
Dkobject.h68 struct kset *kset; member
168 struct kset { struct
175 void kset_init(struct kset *kset); argument
176 int __must_check kset_register(struct kset *kset);
177 void kset_unregister(struct kset *kset);
178 struct kset * __must_check kset_create_and_add(const char *name, const struct kset_uevent_ops *u,
181 static inline struct kset *to_kset(struct kobject *kobj) in to_kset()
183 return kobj ? container_of(kobj, struct kset, kobj) : NULL; in to_kset()
186 static inline struct kset *kset_get(struct kset *k) in kset_get()
191 static inline void kset_put(struct kset *k) in kset_put()
[all …]
Discsi_boot_sysfs.h105 struct kset *kset; member
/linux-6.6.21/Documentation/core-api/
Dkobject.rst36 - A kset is a group of kobjects. These kobjects can be of the same ktype
37 or belong to different ktypes. The kset is the basic container type for
39 safely ignore that implementation detail as the kset core code handles
43 of those directories corresponds to a kobject in the same kset.
131 properly. If the kobject is to be associated with a specific kset,
132 kobj->kset must be assigned before calling kobject_add(). If a kset is
135 kset itself.
325 A kset is merely a collection of kobjects that want to be associated with
329 A kset serves these functions:
331 - It serves as a bag containing a group of objects. A kset can be used by
[all …]
/linux-6.6.21/fs/nfs/
Dsysfs.c21 static struct kset *nfs_kset;
25 struct kset *kset = container_of(kobj, struct kset, kobj); in nfs_kset_release() local
26 kfree(kset); in nfs_kset_release()
57 nfs_kset->kobj.kset = NULL; in nfs_sysfs_init()
177 p->kobject.kset = nfs_kset; in nfs_netns_client_alloc()
178 p->nfs_net_kobj.kset = nfs_kset; in nfs_netns_client_alloc()
/linux-6.6.21/drivers/base/
Dbase.h43 struct kset subsys;
44 struct kset *devices_kset;
48 struct kset *drivers_kset;
56 struct kset glue_dirs;
191 extern struct kset *devices_kset;
Dbus.c26 static struct kset *system_kset;
29 static struct kset *bus_kset;
74 struct kset *kset = container_of(kobj, struct kset, kobj); in bus_to_subsys() local
76 sp = container_of_const(kset, struct subsys_private, subsys); in bus_to_subsys()
665 priv->kobj.kset = sp->drivers_kset; in bus_add_driver()
864 bus_kobj->kset = bus_kset; in bus_register()
991 struct kset *bus_get_kset(const struct bus_type *bus) in bus_get_kset()
994 struct kset *kset; in bus_get_kset() local
999 kset = &sp->subsys; in bus_get_kset()
1002 return kset; in bus_get_kset()
Dclass.c24 static struct kset *class_kset;
56 struct kset *kset = container_of(kobj, struct kset, kobj); in class_to_subsys() local
58 sp = container_of_const(kset, struct subsys_private, subsys); in class_to_subsys()
201 cp->subsys.kobj.kset = class_kset; in class_register()
/linux-6.6.21/drivers/firmware/
Dqemu_fw_cfg.c492 static int fw_cfg_build_symlink(struct kset *dir, in fw_cfg_build_symlink()
496 struct kset *subdir; in fw_cfg_build_symlink()
533 subdir = kzalloc(sizeof(struct kset), GFP_KERNEL); in fw_cfg_build_symlink()
538 subdir->kobj.kset = dir; in fw_cfg_build_symlink()
562 static void fw_cfg_kset_unregister_recursive(struct kset *kset) in fw_cfg_kset_unregister_recursive() argument
566 list_for_each_entry_safe(k, next, &kset->list, entry) in fw_cfg_kset_unregister_recursive()
568 if (k->ktype == kset->kobj.ktype) in fw_cfg_kset_unregister_recursive()
572 kset_unregister(kset); in fw_cfg_kset_unregister_recursive()
578 static struct kset *fw_cfg_fname_kset;
/linux-6.6.21/drivers/dma-buf/
Ddma-buf-sysfs-stats.c144 static struct kset *dma_buf_stats_kset;
145 static struct kset *dma_buf_per_buffer_stats_kset;
185 sysfs_entry->kobj.kset = dma_buf_per_buffer_stats_kset; in dma_buf_stats_setup()
/linux-6.6.21/drivers/platform/x86/hp/hp-bioscfg/
Dbioscfg.c538 static void destroy_attribute_objs(struct kset *kset) in destroy_attribute_objs() argument
542 list_for_each_entry_safe(pos, next, &kset->list, entry) in destroy_attribute_objs()
604 attr_name_kobj->kset = bioscfg_drv.authentication_dir_kset; in hp_add_other_attributes()
609 attr_name_kobj->kset = bioscfg_drv.main_dir_kset; in hp_add_other_attributes()
662 struct kset *temp_kset; in hp_init_bios_package_attribute()
720 attr_name_kobj->kset = temp_kset; in hp_init_bios_package_attribute()
773 struct kset *temp_kset; in hp_init_bios_buffer_attribute()
813 attr_name_kobj->kset = temp_kset; in hp_init_bios_buffer_attribute()
/linux-6.6.21/net/sunrpc/
Dsysfs.c25 static struct kset *rpc_sunrpc_kset;
46 struct kset *kset, in rpc_sysfs_object_alloc() argument
53 kobj->kset = kset; in rpc_sysfs_object_alloc()
467 p->kobject.kset = rpc_sunrpc_kset; in rpc_sysfs_client_alloc()
487 p->kobject.kset = rpc_sunrpc_kset; in rpc_sysfs_xprt_switch_alloc()
507 p->kobject.kset = rpc_sunrpc_kset; in rpc_sysfs_xprt_alloc()
/linux-6.6.21/drivers/platform/x86/
Dthink-lmi.h92 struct kset *attribute_kset;
93 struct kset *authentication_kset;
/linux-6.6.21/fs/ocfs2/cluster/
Dmasklog.c152 static struct kset mlog_kset = {
156 int mlog_sys_init(struct kset *o2cb_kset) in mlog_sys_init()
167 mlog_kset.kobj.kset = o2cb_kset; in mlog_sys_init()
/linux-6.6.21/drivers/platform/x86/dell/dell-wmi-sysman/
Dsysman.c349 static void destroy_attribute_objs(struct kset *kset) in destroy_attribute_objs() argument
353 list_for_each_entry_safe(pos, next, &kset->list, entry) { in destroy_attribute_objs()
397 struct kset *tmp_set; in init_bios_attributes()
470 attr_name_kobj->kset = tmp_set; in init_bios_attributes()
/linux-6.6.21/fs/erofs/
Dsysfs.c192 static struct kset erofs_root = {
202 .kset = &erofs_root,
225 sbi->s_kobj.kset = &erofs_root; in erofs_register_sysfs()
/linux-6.6.21/fs/ubifs/
Dsysfs.c87 static struct kset ubifs_kset = {
110 c->kobj.kset = &ubifs_kset; in ubifs_sysfs_register()
/linux-6.6.21/drivers/scsi/
Discsi_boot_sysfs.c352 boot_kobj->kobj.kset = boot_kset->kset; in iscsi_boot_create_kobj()
504 boot_kset->kset = kset_create_and_add(set_name, NULL, firmware_kobj); in iscsi_boot_create_kset()
505 if (!boot_kset->kset) { in iscsi_boot_create_kset()
551 kset_unregister(boot_kset->kset); in iscsi_boot_destroy_kset()
/linux-6.6.21/samples/kobject/
DMakefile2 obj-$(CONFIG_SAMPLE_KOBJECT) += kobject-example.o kset-example.o
/linux-6.6.21/drivers/staging/greybus/
Daudio_manager_private.h17 struct kset *manager_kset,
/linux-6.6.21/drivers/pci/
Dslot.c15 struct kset *pci_slots_kset;
267 slot->kobj.kset = pci_slots_kset; in pci_create_slot()
369 struct kset *pci_bus_kset; in pci_slot_init()
/linux-6.6.21/arch/x86/platform/efi/
Druntime-map.c102 static struct kset *map_kset;
127 entry->kobj.kset = map_kset; in add_sysfs_runtime_map_entry()
/linux-6.6.21/drivers/net/phy/
Dphylink.c2296 struct ethtool_link_ksettings *kset) in phylink_get_ksettings() argument
2298 phylink_merge_link_mode(kset->link_modes.advertising, state->advertising); in phylink_get_ksettings()
2299 linkmode_copy(kset->link_modes.lp_advertising, state->lp_advertising); in phylink_get_ksettings()
2300 if (kset->base.rate_matching == RATE_MATCH_NONE) { in phylink_get_ksettings()
2301 kset->base.speed = state->speed; in phylink_get_ksettings()
2302 kset->base.duplex = state->duplex; in phylink_get_ksettings()
2304 kset->base.autoneg = linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, in phylink_get_ksettings()
2319 struct ethtool_link_ksettings *kset) in phylink_ethtool_ksettings_get() argument
2326 phy_ethtool_ksettings_get(pl->phydev, kset); in phylink_ethtool_ksettings_get()
2328 kset->base.port = pl->link_port; in phylink_ethtool_ksettings_get()
[all …]

1234