Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-28 15:27:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hugetlb_sysfs_add_hstate

Proto:static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent, struct kobject **hstate_kobjs, const struct attribute_group *hstate_attr_group)

Type:int

Parameter:

TypeParameterName
struct hstate *h
struct kobject *parent
struct kobject **hstate_kobjs
const struct attribute_group *hstate_attr_group
2651  hi = hstate_index(h)
2653  hstate_kobjs[hi] = kobject_create_and_add() - Create a struct kobject dynamically and* register it with sysfs.*@name: the name for the kobject*@parent: the parent kobject of this kobject, if any.* This function creates a kobject structure dynamically and registers it
2654  If Not hstate_kobjs[hi] Then Return -ENOMEM
2657  retval = sysfs_create_group(hstate_kobjs[hi], hstate_attr_group)
2658  If retval Then kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
2661  Return retval
Caller
NameDescribe
hugetlb_sysfs_init
hugetlb_register_nodeRegister hstate attributes for a single node device.* No-op if attributes already registered.