函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:msr_init

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

返回类型:int

参数:

211  如果__register_chrdev(MSR_MAJOR, 0, CPU数量, "cpu/msr", & File operations we support)则
212  打印错误信息("unable to get major %d for msr\n", MSR_MAJOR)
213  返回:负EBUSY
215  msr_class等于This is a #define to keep the compiler from merging different* instances of the __key variable (THIS_MODULE, "msr")
216  如果是错误
217  err等于错误
218  转到:out_chrdev
220  devnode等于msr_devnode
222  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
224  如果err小于0则转到:out_class
226  cpuhp_msr_state等于err
227  返回:0
229  out_class :
230  class_destroy(msr_class)
231  out_chrdev :
232  __unregister_chrdev(MSR_MAJOR, 0, CPU数量, "cpu/msr")
233  返回:err