/linux-4.4.14/include/linux/ |
H A D | kobject.h | 67 struct kset *kset; member in struct:kobject 133 int (* const filter)(struct kset *kset, struct kobject *kobj); 134 const char *(* const name)(struct kset *kset, struct kobject *kobj); 135 int (* const uevent)(struct kset *kset, struct kobject *kobj, 152 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. 154 * A kset defines a group of kobjects. They can be individually 160 * @list: the list of all kobjects for this kset 162 * @kobj: the embedded kobject for this kset (recursion, isn't it fun...) 163 * @uevent_ops: the set of uevent operations for this kset. These are 164 * called whenever a kobject has something happen to it so that the kset 168 struct kset { struct 175 extern void kset_init(struct kset *kset); 176 extern int __must_check kset_register(struct kset *kset); 177 extern void kset_unregister(struct kset *kset); 178 extern struct kset * __must_check kset_create_and_add(const char *name, 182 static inline struct kset *to_kset(struct kobject *kobj) to_kset() 184 return kobj ? container_of(kobj, struct kset, kobj) : NULL; to_kset() 187 static inline struct kset *kset_get(struct kset *k) kset_get() 192 static inline void kset_put(struct kset *k) kset_put() 202 extern struct kobject *kset_find_obj(struct kset *, const char *);
|
H A D | iscsi_boot_sysfs.h | 106 struct kset *kset; member in struct:iscsi_boot_kset
|
H A D | slub_def.h | 91 struct kset *memcg_kset;
|
H A D | efi.h | 1105 struct kset *kset; member in struct:efivars
|
H A D | module.h | 758 extern struct kset *module_kset;
|
H A D | device.h | 195 extern struct kset *bus_get_kset(struct bus_type *bus);
|
H A D | netdevice.h | 1642 struct kset *queues_kset;
|
/linux-4.4.14/lib/ |
H A D | kobject.c | 139 * kobject_get_path - generate and return the path associated with a given kobj and kset pair. 163 /* add the kobject to its kset's list */ kobj_kset_join() 166 if (!kobj->kset) kobj_kset_join() 169 kset_get(kobj->kset); kobj_kset_join() 170 spin_lock(&kobj->kset->list_lock); kobj_kset_join() 171 list_add_tail(&kobj->entry, &kobj->kset->list); kobj_kset_join() 172 spin_unlock(&kobj->kset->list_lock); kobj_kset_join() 175 /* remove the kobject from its kset's list */ kobj_kset_leave() 178 if (!kobj->kset) kobj_kset_leave() 181 spin_lock(&kobj->kset->list_lock); kobj_kset_leave() 183 spin_unlock(&kobj->kset->list_lock); kobj_kset_leave() 184 kset_put(kobj->kset); kobj_kset_leave() 216 /* join kset if set, use it as parent if we do not already have one */ kobject_add_internal() 217 if (kobj->kset) { kobject_add_internal() 219 parent = kobject_get(&kobj->kset->kobj); kobject_add_internal() 227 kobj->kset ? kobject_name(&kobj->kset->kobj) : "<NULL>"); kobject_add_internal() 380 * kobject associated with the kset assigned to this kobject. If no kset 530 if (kobj->kset) kobject_move() 531 new_parent = kobject_get(&kobj->kset->kobj); kobject_move() 764 * kset_init - initialize a kset for use 765 * @k: kset 767 void kset_init(struct kset *k) kset_init() 806 * kset_register - initialize and add a kset. 807 * @k: kset. 809 int kset_register(struct kset *k) kset_register() 826 * kset_unregister - remove a kset. 827 * @k: kset. 829 void kset_unregister(struct kset *k) kset_unregister() 839 * kset_find_obj - search for object in kset. 840 * @kset: kset we're looking in. 843 * Lock kset via @kset->subsys, and iterate over @kset->list, 847 struct kobject *kset_find_obj(struct kset *kset, const char *name) kset_find_obj() argument 852 spin_lock(&kset->list_lock); kset_find_obj() 854 list_for_each_entry(k, &kset->list, entry) { kset_find_obj() 861 spin_unlock(&kset->list_lock); kset_find_obj() 867 struct kset *kset = container_of(kobj, struct kset, kobj); kset_release() local 870 kfree(kset); kset_release() 879 * kset_create - create a struct kset dynamically 881 * @name: the name for the kset 882 * @uevent_ops: a struct kset_uevent_ops for the kset 883 * @parent_kobj: the parent kobject of this kset, if any. 885 * This function creates a kset structure dynamically. This structure can 891 * If the kset was not able to be created, NULL will be returned. 893 static struct kset *kset_create(const char *name, kset_create() 897 struct kset *kset; kset_create() local 900 kset = kzalloc(sizeof(*kset), GFP_KERNEL); kset_create() 901 if (!kset) kset_create() 903 retval = kobject_set_name(&kset->kobj, "%s", name); kset_create() 905 kfree(kset); kset_create() 908 kset->uevent_ops = uevent_ops; kset_create() 909 kset->kobj.parent = parent_kobj; kset_create() 912 * The kobject of this kset will have a type of kset_ktype and belong to kset_create() 913 * no kset itself. That way we can properly free it when it is kset_create() 916 kset->kobj.ktype = &kset_ktype; kset_create() 917 kset->kobj.kset = NULL; kset_create() 919 return kset; kset_create() 923 * kset_create_and_add - create a struct kset dynamically and add it to sysfs 925 * @name: the name for the kset 926 * @uevent_ops: a struct kset_uevent_ops for the kset 927 * @parent_kobj: the parent kobject of this kset, if any. 929 * This function creates a kset structure dynamically and registers it 934 * If the kset was not able to be created, NULL will be returned. 936 struct kset *kset_create_and_add(const char *name, kset_create_and_add() 940 struct kset *kset; kset_create_and_add() local 943 kset = kset_create(name, uevent_ops, parent_kobj); kset_create_and_add() 944 if (!kset) kset_create_and_add() 946 error = kset_register(kset); kset_create_and_add() 948 kfree(kset); kset_create_and_add() 951 return kset; kset_create_and_add()
|
H A D | kobject_uevent.c | 96 if (!ops && kobj->kset) { kobj_bcast_filter() 97 ksobj = &kobj->kset->kobj; kobj_bcast_filter() 172 struct kset *kset; kobject_uevent_env() local 183 /* search the kset we belong to */ kobject_uevent_env() 185 while (!top_kobj->kset && top_kobj->parent) kobject_uevent_env() 188 if (!top_kobj->kset) { kobject_uevent_env() 190 "without kset!\n", kobject_name(kobj), kobj, kobject_uevent_env() 195 kset = top_kobj->kset; kobject_uevent_env() 196 uevent_ops = kset->uevent_ops; kobject_uevent_env() 207 if (!uevent_ops->filter(kset, kobj)) { kobject_uevent_env() 216 subsystem = uevent_ops->name(kset, kobj); kobject_uevent_env() 218 subsystem = kobject_name(&kset->kobj); kobject_uevent_env() 258 /* let the kset specific function add its stuff */ kobject_uevent_env() 260 retval = uevent_ops->uevent(kset, kobj, env); kobject_uevent_env()
|
/linux-4.4.14/samples/kobject/ |
H A D | kset-example.c | 2 * Sample kset and ktype implementation 18 * This module shows how to create a kset in sysfs called 19 * /sys/kernel/kset-example 20 * Then tree kobjects are created and assigned to this kset, "foo", "baz", 195 static struct kset *example_kset; 211 * As we have a kset for this kobject, we need to set it before calling create_foo_obj() 214 foo->kobj.kset = example_kset; create_foo_obj() 218 * will be created here. As we have already specified a kset for this create_foo_obj() 220 * will be placed beneath that kset automatically. create_foo_obj() 245 * Create a kset with the name of "kset_example", example_init() 253 * Create three objects and register them with our kset example_init()
|
/linux-4.4.14/drivers/base/ |
H A D | base.h | 6 * @subsys - the struct kset that defines this subsystem 29 struct kset subsys; 30 struct kset *devices_kset; 34 struct kset *drivers_kset; 41 struct kset glue_dirs; 136 extern struct kset *devices_kset;
|
H A D | core.c | 273 static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) dev_uevent_filter() argument 287 static const char *dev_uevent_name(struct kset *kset, struct kobject *kobj) dev_uevent_name() argument 298 static int dev_uevent(struct kset *kset, struct kobject *kobj, dev_uevent() argument 375 struct kset *kset; uevent_show() local 381 /* search the kset, the device belongs to */ uevent_show() 383 while (!top_kobj->kset && top_kobj->parent) uevent_show() 385 if (!top_kobj->kset) uevent_show() 388 kset = top_kobj->kset; uevent_show() 389 if (!kset->uevent_ops || !kset->uevent_ops->uevent) uevent_show() 393 if (kset->uevent_ops && kset->uevent_ops->filter) uevent_show() 394 if (!kset->uevent_ops->filter(kset, &dev->kobj)) uevent_show() 401 /* let the kset specific function add its keys */ uevent_show() 402 retval = kset->uevent_ops->uevent(kset, &dev->kobj, env); uevent_show() 534 struct kset *devices_kset; 702 dev->kobj.kset = devices_kset; device_initialize() 767 dir->kobj.kset = &class->p->glue_dirs; class_dir_create_and_add() 843 glue_dir->kset != &dev->class->p->glue_dirs) cleanup_glue_dir() 2063 * Make sure the device is off the kset list, in the device_shutdown()
|
H A D | bus.c | 26 static struct kset *system_kset; 165 static int bus_uevent_filter(struct kset *kset, struct kobject *kobj) bus_uevent_filter() argument 178 static struct kset *bus_kset; 695 priv->kobj.kset = bus->p->drivers_kset; bus_add_driver() 907 priv->subsys.kobj.kset = bus_kset; bus_register() 999 struct kset *bus_get_kset(struct bus_type *bus) bus_get_kset()
|
H A D | class.c | 86 static struct kset *class_kset; 193 cp->subsys.kobj.kset = class_kset; __class_register() 195 cp->subsys.kobj.kset = class_kset; __class_register()
|
/linux-4.4.14/drivers/scsi/ |
H A D | iscsi_boot_sysfs.c | 319 boot_kobj->kobj.kset = boot_kset->kset; iscsi_boot_create_kobj() 358 * @boot_kset: boot kset 383 * @boot_kset: boot kset 409 * @boot_kset: boot kset 445 boot_kset->kset = kset_create_and_add(set_name, NULL, firmware_kobj); iscsi_boot_create_kset() 446 if (!boot_kset->kset) { iscsi_boot_create_kset() 476 * iscsi_boot_destroy_kset() - destroy kset and kobjects under it 477 * @boot_kset: boot kset 479 * This will remove the kset and kobjects and attrs under it. 492 kset_unregister(boot_kset->kset); iscsi_boot_destroy_kset()
|
/linux-4.4.14/fs/exofs/ |
H A D | sys.c | 57 static struct kset *exofs_kset; 161 s_kobj->kset = exofs_kset; exofs_sysfs_sb_add() 181 d_kobj->kset = exofs_kset; exofs_sysfs_odev_add()
|
/linux-4.4.14/fs/ocfs2/cluster/ |
H A D | masklog.c | 167 static struct kset mlog_kset = { 171 int mlog_sys_init(struct kset *o2cb_kset) mlog_sys_init() 182 mlog_kset.kobj.kset = o2cb_kset; mlog_sys_init()
|
H A D | sys.c | 55 static struct kset *o2cb_kset;
|
H A D | masklog.h | 200 int mlog_sys_init(struct kset *o2cb_subsys);
|
/linux-4.4.14/drivers/firmware/efi/ |
H A D | runtime-map.c | 106 static struct kset *map_kset; 131 entry->kobj.kset = map_kset; add_sysfs_runtime_map_entry()
|
H A D | esrt.c | 165 static struct kset *esrt_kset; 178 entry->kobj.kset = esrt_kset; esre_create_sysfs_entry() 426 pr_err("kset creation failed.\n"); esrt_sysfs_init()
|
H A D | efivars.c | 86 static struct kset *efivars_kset; 569 new_var->kobj.kset = efivars_kset; efivar_create_sysfs_entry()
|
/linux-4.4.14/fs/ext4/ |
H A D | sysfs.c | 342 static struct kset ext4_kset = { 352 .kset = &ext4_kset, 391 sbi->s_kobj.kset = &ext4_kset; ext4_register_sysfs()
|
/linux-4.4.14/arch/powerpc/platforms/powernv/ |
H A D | opal-elog.c | 92 static struct kset *elog_kset; 195 elog->kobj.kset = elog_kset; create_elog_obj() 290 pr_warn("%s: failed to create elog kset\n", __func__); opal_elog_init()
|
H A D | opal-dump.c | 156 static struct kset *dump_kset; 332 dump->kobj.kset = dump_kset; create_dump_obj() 405 pr_warn("%s: Failed to create dump kset\n", __func__); opal_platform_dump_init()
|
/linux-4.4.14/drivers/pci/ |
H A D | slot.c | 15 struct kset *pci_slots_kset; 301 slot->kobj.kset = pci_slots_kset; pci_create_slot() 400 struct kset *pci_bus_kset; pci_slot_init()
|
H A D | pci.h | 214 extern struct kset *pci_slots_kset;
|
/linux-4.4.14/drivers/s390/char/ |
H A D | sclp_ocf.c | 34 static struct kset *ocf_kset;
|
H A D | sclp_cpi_sys.c | 384 static struct kset *cpi_kset;
|
/linux-4.4.14/drivers/of/ |
H A D | of_private.h | 36 extern struct kset *of_kset;
|
H A D | base.c | 42 struct kset *of_kset; 171 np->kobj.kset = of_kset; __of_attach_node_sysfs() 196 /* Create the kset, and register existing nodes */ of_core_init()
|
/linux-4.4.14/fs/dlm/ |
H A D | lockspace.c | 195 static struct kset *dlm_kset; 227 static int dlm_uevent(struct kset *kset, struct kobject *kobj, dlm_uevent() argument 249 printk(KERN_WARNING "%s: can not create kset\n", __func__); dlm_lockspace_init() 629 ls->ls_kobj.kset = dlm_kset; new_lockspace()
|
/linux-4.4.14/fs/gfs2/ |
H A D | sys.c | 60 static struct kset *gfs2_kset; 661 sdp->sd_kobj.kset = gfs2_kset; gfs2_sys_fs_add() 709 static int gfs2_uevent(struct kset *kset, struct kobject *kobj, gfs2_uevent() argument
|
/linux-4.4.14/drivers/staging/most/mostcore/ |
H A D | core.c | 524 static struct kset *most_channel_kset; 543 c->kobj.kset = most_channel_kset; create_most_c_obj() 723 static struct kset *most_inst_kset; 729 * This allocates memory for an instance structure, assigns the proper kset 742 inst->kobj.kset = most_inst_kset; create_most_inst_obj() 1084 static struct kset *most_aim_kset; 1090 * This creates an AIM object assigns the proper kset and registers 1102 most_aim->kobj.kset = most_aim_kset; create_most_aim_obj()
|
/linux-4.4.14/arch/s390/kernel/ |
H A D | ipl.c | 562 static struct kset *ipl_kset; 1040 static struct kset *reipl_kset; 1041 static struct kset *reipl_fcp_kset; 1239 /* sysfs: create fcp kset for mixing attr group and bin attrs */ reipl_fcp_init() 1420 static struct kset *dump_kset; 1595 static struct kset *vmcmd_kset; 1658 static struct kset *shutdown_actions_kset;
|
/linux-4.4.14/drivers/parisc/ |
H A D | pdc_stable.c | 962 static struct kset *paths_kset; 992 entry->kobj.kset = paths_kset; pdcs_register_pathentries() 1069 /* register the paths kset as a child of the stable kset */ pdc_stable_init() 1076 /* now we create all "files" for the paths kset */ pdc_stable_init()
|
/linux-4.4.14/kernel/ |
H A D | params.c | 812 mk->kobj.kset = module_kset; locate_module_kobject() 968 static int uevent_filter(struct kset *kset, struct kobject *kobj) uevent_filter() argument 981 struct kset *module_kset; 1002 printk(KERN_WARNING "%s (%d): error creating kset\n", param_sysfs_init()
|
H A D | module.c | 1774 mod->mkobj.kobj.kset = module_kset; mod_sysfs_init()
|
/linux-4.4.14/drivers/firmware/ |
H A D | dmi-sysfs.c | 569 static struct kset *dmi_kset; 599 entry->kobj.kset = dmi_kset; dmi_sysfs_register_handle()
|
H A D | memmap.c | 187 static struct kset *mmap_kset; add_sysfs_fw_map_entry() 198 entry->kobj.kset = mmap_kset; add_sysfs_fw_map_entry()
|
H A D | edd.c | 634 static struct kset *edd_kset; 724 edev->kobj.kset = edd_kset; edd_device_register()
|
/linux-4.4.14/crypto/ |
H A D | pcrypt.c | 61 static struct kset *pcrypt_kset; 394 pinst->kobj.kset = pcrypt_kset; pcrypt_sysfs_add()
|
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/ |
H A D | ptlrpc_internal.h | 83 int ptlrpc_sysfs_register_service(struct kset *parent,
|
H A D | lproc_ptlrpc.c | 1055 if (svc->srv_kobj.kset) { ptlrpc_sysfs_unregister_service() 1061 int ptlrpc_sysfs_register_service(struct kset *parent, ptlrpc_sysfs_register_service() 1066 svc->srv_kobj.kset = parent; ptlrpc_sysfs_register_service()
|
H A D | service.c | 540 struct kset *parent, ptlrpc_register_service()
|
/linux-4.4.14/fs/nilfs2/ |
H A D | sysfs.c | 29 static struct kset *nilfs_kset; 101 kobj->kset = nilfs_kset; \ 206 root->snapshot_kobj.kset = nilfs_kset; nilfs_sysfs_create_snapshot_group() 1006 nilfs->ns_dev_kobj.kset = nilfs_kset; nilfs_sysfs_create_device_group()
|
/linux-4.4.14/arch/arm/mach-omap1/ |
H A D | pm.h | 118 extern struct kset power_subsys;
|
/linux-4.4.14/fs/btrfs/ |
H A D | sysfs.c | 715 static struct kset *btrfs_kset; 733 fs_devs->fsid_kobj.kset = btrfs_kset; btrfs_sysfs_add_fsid()
|
/linux-4.4.14/drivers/staging/lustre/lustre/ldlm/ |
H A D | ldlm_internal.h | 163 extern struct kset *ldlm_ns_kset;
|
H A D | ldlm_lockd.c | 62 struct kset *ldlm_ns_kset; 63 static struct kset *ldlm_svc_kset;
|
H A D | ldlm_resource.c | 397 ns->ns_kobj.kset = ldlm_ns_kset; ldlm_namespace_sysfs_register()
|
/linux-4.4.14/fs/xfs/ |
H A D | xfs_super.c | 63 static struct kset *xfs_kset; /* top-level xfs sysfs dir */ 1455 mp->m_kobj.kobject.kset = xfs_kset; xfs_fs_fill_super() 1865 xfsstats.xs_kobj.kobject.kset = xfs_kset; init_xfs_fs() 1879 xfs_dbg_kobj.kobject.kset = xfs_kset; init_xfs_fs()
|
/linux-4.4.14/fs/ocfs2/ |
H A D | stackglue.c | 632 static struct kset *ocfs2_kset;
|
/linux-4.4.14/fs/f2fs/ |
H A D | super.c | 40 static struct kset *f2fs_kset; 1307 sbi->s_kobj.kset = f2fs_kset; f2fs_fill_super()
|
/linux-4.4.14/net/core/ |
H A D | net-sysfs.c | 892 kobj->kset = dev->queues_kset; rx_queue_add_kobject() 1284 kobj->kset = dev->queues_kset; netdev_queue_add_kobject()
|
/linux-4.4.14/fs/ecryptfs/ |
H A D | main.c | 796 printk(KERN_ERR "Unable to create ecryptfs kset\n"); do_sysfs_registration()
|
/linux-4.4.14/drivers/iommu/ |
H A D | iommu.c | 36 static struct kset *iommu_group_kset; 184 group->kobj.kset = iommu_group_kset; iommu_group_alloc()
|
/linux-4.4.14/mm/ |
H A D | slub.c | 5312 static int uevent_filter(struct kset *kset, struct kobject *kobj) uevent_filter() argument 5325 static struct kset *slab_kset; 5327 static inline struct kset *cache_kset(struct kmem_cache *s) cache_kset() 5395 s->kobj.kset = cache_kset(s); sysfs_slab_add()
|
/linux-4.4.14/drivers/staging/lustre/lustre/llite/ |
H A D | lproc_llite.c | 1061 sbi->ll_kobj.kset = llite_kset; ldebugfs_register_mountpoint()
|
H A D | llite_internal.h | 637 extern struct kset *llite_kset;
|
H A D | llite_lib.c | 61 struct kset *llite_kset;
|
/linux-4.4.14/drivers/acpi/ |
H A D | bus.c | 1083 printk(KERN_WARNING "%s: kset create error\n", __func__); acpi_init()
|
/linux-4.4.14/drivers/md/bcache/ |
H A D | super.c | 871 * only class / kset properties are persistent */ bch_cached_dev_run()
|
/linux-4.4.14/drivers/staging/lustre/lustre/include/ |
H A D | lustre_net.h | 2505 struct kset *parent,
|