函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpuid.c Create Date:2022-07-27 09:19:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cpuid_init

函数原型:static int __init cpuid_init(void)

返回类型:int

参数:

152  如果__register_chrdev(CPUID_MAJOR, 0, CPU数量, "cpu/cpuid", & File operations we support)则
154  printk(r conditions "cpuid: unable to get major %d for cpuid\n", CPUID_MAJOR)
156  返回:负EBUSY
158  cpuid_class等于This is a #define to keep the compiler from merging different* instances of the __key variable (THIS_MODULE, "cpuid")
159  如果是错误
160  err等于错误
161  转到:out_chrdev
163  devnode等于cpuid_devnode
165  err等于puhp_setup_state - Setup hotplug state callbacks with calling the callbacks*@state: The state for which the calls are installed*@name: Name of the callback (will be used in debug output)*@startup: startup callback function*@teardown: teardown callback
167  如果err小于0则转到:out_class
170  cpuhp_cpuid_state等于err
171  返回:0
173  out_class :
174  class_destroy(cpuid_class)
175  out_chrdev :
176  __unregister_chrdev(CPUID_MAJOR, 0, CPU数量, "cpu/cpuid")
177  返回:err