Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mce\core.c Create Date:2022-07-28 08:01:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mcheck_init_device

Proto:static __init int mcheck_init_device(void)

Type:int

Parameter:Nothing

2491  MAYBE_BUILD_BUG_ON(__VIRTUAL_MASK_SHIFT >= 63)
2493  If Not mce_available( & common cpu data for all cpus ) Then
2494  err = -EIO
2495  Go to err_out
2498  If Not zalloc_cpumask_var( & mce_device_initialized, GFP_KERNEL) Then
2499  err = -ENOMEM
2500  Go to err_out
2503  mce_init_banks()
2505  err = subsys_system_register( & mce_subsys, NULL)
2506  If err Then Go to err_out_mem
2509  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
2511  If err Then Go to err_out_mem
2514  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
2516  If err < 0 Then Go to err_out_online
2519  register_syscore_ops( & mce_syscore_ops)
2521  Return 0
2523  err_out_online :
2524  puhp_remove_state - Remove hotplug state callbacks and invoke the teardown*@state: The state for which the calls are removed* Removes the callback functions and invokes the teardown callback on* the present cpus which have already reached the @state.
2526  err_out_mem :
2527  free_cpumask_var(mce_device_initialized)
2529  err_out :
2530  pr_err("Unable to init MCE device (rc: %d)\n", err)
2532  Return err