Prepare the memory hot-{add,remove} paths for handling sub-section ranges by plumbing the starting page frame and number of pages being handled through arch_{add,remove}_memory() to sparse_{add,remove}_one_section(). This is simply plumbing, small cleanups, and some identifier renames. No intended functional changes.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -346,9 +346,10 @@ extern int add_memory_resource(int nid, struct resource *resource); · 345 unmodified lines | ||
| 346 | 346 | extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, |
| 347 | 347 | unsigned long nr_pages, struct vmem_altmap *altmap); |
| 348 | 348 | extern bool is_memblock_offlined(struct memory_block *mem); |
| 349 | −extern int sparse_add_one_section(int nid, unsigned long start_pfn, | |
| 350 | − struct vmem_altmap *altmap); | |
| 349 | +extern int sparse_add_section(int nid, unsigned long pfn, | |
| 350 | + unsigned long nr_pages, struct vmem_altmap *altmap); | |
| 351 | 351 | extern void sparse_remove_one_section(struct mem_section *ms, |
| 352 | + unsigned long pfn, unsigned long nr_pages, | |
| 352 | 353 | unsigned long map_offset, struct vmem_altmap *altmap); |
| 353 | 354 | extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, |
| 354 | 355 | unsigned long pnum); |