Lines Matching refs:group

86  * Memory groups, indexed by memory group id (mgid).
197 zone = zone_for_pfn_range(mem->online_type, mem->nid, mem->group,
218 nr_pages - nr_vmemmap_pages, zone, mem->group);
230 adjust_present_page_count(pfn_to_page(start_pfn), mem->group,
261 adjust_present_page_count(pfn_to_page(start_pfn), mem->group,
265 nr_pages - nr_vmemmap_pages, mem->zone, mem->group);
270 mem->group, nr_vmemmap_pages);
415 struct memory_group *group,
421 zone = zone_for_pfn_range(online_type, nid, group, start_pfn, nr_pages);
434 struct memory_group *group = mem->group;
455 default_zone = zone_for_pfn_range(MMOP_ONLINE, nid, group,
459 len += print_allowed_zone(buf, len, nid, group, start_pfn, nr_pages,
461 len += print_allowed_zone(buf, len, nid, group, start_pfn, nr_pages,
759 struct memory_group *group)
794 if (group) {
795 mem->group = group;
796 list_add(&mem->group_next, &group->memory_blocks);
820 struct memory_group *group)
822 return add_memory_block(block_id, MEM_OFFLINE, altmap, group);
832 if (memory->group) {
834 memory->group = NULL;
851 struct memory_group *group)
864 ret = add_hotplug_memory_block(block_id, altmap, group);
1049 * memory groups. Note that the passed memory group will be copied to a
1050 * dynamically allocated memory group. After this call, the passed
1051 * memory group should no longer be used.
1053 static int memory_group_register(struct memory_group group)
1059 if (!node_possible(group.nid))
1062 new_group = kzalloc(sizeof(group), GFP_KERNEL);
1065 *new_group = group;
1073 } else if (group.is_dynamic) {
1080 * memory_group_register_static() - Register a static memory group.
1083 * group.
1085 * Register a new static memory group and return the memory group id.
1086 * All memory in the group belongs to a single unit, such as a DIMM. All
1087 * memory belonging to a static memory group is added in one go to be removed
1092 * returns the new memory group id.
1096 struct memory_group group = {
1105 return memory_group_register(group);
1110 * memory_group_register_dynamic() - Register a dynamic memory group.
1113 * memory group.
1115 * Register a new dynamic memory group and return the memory group id.
1116 * Memory within a dynamic memory group is added/removed dynamically
1122 * new memory group id.
1126 struct memory_group group = {
1137 return memory_group_register(group);
1142 * memory_group_unregister() - Unregister a memory group.
1143 * @mgid: the memory group id
1145 * Unregister a memory group. If any memory block still belongs to this
1146 * memory group, unregistering will fail.
1148 * Returns -EINVAL if the memory group id is invalid, returns -EBUSY if some
1149 * memory blocks still belong to this memory group and returns 0 if
1154 struct memory_group *group;
1159 group = xa_load(&memory_groups, mgid);
1160 if (!group)
1162 if (!list_empty(&group->memory_blocks))
1165 kfree(group);
1172 * lookup a memory group. We don't care about locking, as we don't expect a
1173 * memory group to get unregistered while adding memory to it -- because
1174 * the group and the memory is managed by the same driver.
1183 * walk all dynamic memory groups excluding a given memory group, either
1189 struct memory_group *group;
1193 xa_for_each_marked(&memory_groups, index, group,
1195 if (group == excluded)
1198 if (nid != NUMA_NO_NODE && group->nid != nid)
1201 ret = func(group, arg);