函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Per CPU device init. All of the CPUs still share the same bank device:

函数原型:static int mce_device_create(unsigned int cpu)

返回类型:int

参数:

类型参数名称
unsigned intcpu
2330  如果非mce_available( & common cpu data for all cpus )则返回:负EIO
2333  dev等于per_cpu(mce_device, cpu)
2334  如果dev则返回:0
2337  dev等于分配内存并置零
2338  如果非dev则返回:负ENOMEM
2340  id等于cpu
2341  bus等于mce_subsys
2342  release等于mce_device_release
2344  err等于High level routines for use by the bus drivers
2345  如果err
2346  put_device(dev)
2347  返回:err
2350 mce_device_attrs[i]循环
2351  err等于device_create_file(dev, mce_device_attrs[i])
2352  如果err则转到:error
2355 j小于per_cpu(mce_num_banks, cpu)循环
2356  err等于device_create_file(dev, & device attribute )
2357  如果err则转到:error2
2360  设置CPU信息
2361  per_cpu(mce_device, cpu)等于dev
2363  返回:0
2364  error2 :
2365 j先自减大于等于0循环
2366  device_remove_file(dev, & device attribute )
2367  error :
2368 i先自减大于等于0循环
2369  device_remove_file(dev, mce_device_attrs[i])
2371  device_unregister(dev)
2373  返回:err
调用者
名称描述
mce_cpu_online