函数逻辑报告 | 
Source Code:mm\memory_hotplug.c | 
Create Date:2022-07-27 17:31:00 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:NOTE: The caller must call lock_device_hotplug() to serialize hotplug* and online/offline operations (triggered e.g. by sysfs).* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG
函数原型:int __ref add_memory_resource(int nid, struct resource *res)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| int | nid | |
| struct resource * | res | 
| 1036 | struct mhp_restrictions restrictions = {} | 
| 1038 | bool new_node = false | 
| 1042 | size等于resource_size(res) | 
| 1044 | ret等于check_hotplug_memory_range(start, size) | 
| 1048 | mem_hotplug_begin() | 
| 1056 | memblock_add_node(start, size, nid) | 
| 1064 | ret等于arch_add_memory(nid, start, size, & restrictions) | 
| 1069 | ret等于create_memory_block_devices(start, size) | 
| 1070 | 如果ret则 | 
| 1071 | arch_remove_memory(nid, start, size, NULL) | 
| 1072 | 转到:error | 
| 1075 | 如果new_node则 | 
| 1081 | node_set_online(nid) | 
| 1091 | firmware_map_add_hotplug(start, start + size, "System RAM") | 
| 1094 | mem_hotplug_done() | 
| 1100 | 返回:ret | 
| 1101 | error : | 
| 1103 | 如果new_node则rollback_node_hotadd(nid) | 
| 1105 | memblock_remove(start, size) | 
| 1106 | mem_hotplug_done() | 
| 1107 | 返回:ret | 
| 名称 | 描述 | 
|---|---|
| __add_memory | quires device_hotplug_lock, see add_memory_resource() | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |