Function report |
Source Code:mm\memory_hotplug.c |
Create Date:2022-07-28 15:56:57 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int __ref add_memory_resource(int nid, struct resource *res)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 | If ret Then |
| 1071 | arch_remove_memory(nid, start, size, NULL) |
| 1072 | Go to error |
| 1075 | If new_node Then |
| 1081 | node_set_online(nid) |
| 1091 | firmware_map_add_hotplug(start, start + size, "System RAM") |
| 1094 | mem_hotplug_done() |
| 1097 | If memhp_auto_online Then walk_memory_blocks(start, size, NULL, online_memory_block) |
| 1100 | Return ret |
| 1101 | error : |
| 1103 | If new_node Then rollback_node_hotadd(nid) |
| 1105 | memblock_remove(start, size) |
| 1106 | mem_hotplug_done() |
| 1107 | Return ret |
| Name | Describe |
|---|---|
| __add_memory | quires device_hotplug_lock, see add_memory_resource() |
| 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 |