Function report |
Source Code:arch\x86\kernel\cpu\mce\core.c |
Create Date:2022-07-28 08:01:15 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Per CPU device init. All of the CPUs still share the same bank device:
Proto:static int mce_device_create(unsigned int cpu)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned int | cpu |
| 2330 | If Not mce_available( & common cpu data for all cpus ) Then Return -EIO |
| 2333 | dev = per_cpu(mce_device, cpu) |
| 2334 | If dev Then Return 0 |
| 2337 | dev = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 2341 | bus = mce_subsys |
| 2342 | release = mce_device_release |
| 2345 | If err Then |
| 2346 | put_device(dev) |
| 2347 | Return err |
| 2350 | When mce_device_attrs[i] cycle |
| 2351 | err = device_create_file(dev, mce_device_attrs[i]) |
| 2355 | When j < per_cpu(mce_num_banks, cpu) cycle |
| 2356 | err = device_create_file(dev, & device attribute ) |
| 2360 | pumask_set_cpu - set a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer |
| 2361 | per_cpu(mce_device, cpu) = dev |
| 2363 | Return 0 |
| 2364 | error2 : |
| 2366 | device_remove_file(dev, & device attribute ) |
| 2367 | error : |
| 2369 | device_remove_file(dev, mce_device_attrs[i]) |
| 2371 | device_unregister(dev) |
| 2373 | Return err |
| Name | Describe |
|---|---|
| mce_cpu_online |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |