Lines Matching refs:usage
208 subsection_mask_set(ms->usage->subsection_map, pfn, pfns); in subsection_map_init()
302 struct mem_section_usage *usage, unsigned long flags) in sparse_init_one_section() argument
307 ms->usage = usage; in sparse_init_one_section()
335 struct mem_section_usage *usage; in sparse_early_usemaps_alloc_pgdat_section() local
352 usage = memblock_alloc_try_nid(size, SMP_CACHE_BYTES, goal, limit, nid); in sparse_early_usemaps_alloc_pgdat_section()
353 if (!usage && limit) { in sparse_early_usemaps_alloc_pgdat_section()
357 return usage; in sparse_early_usemaps_alloc_pgdat_section()
361 struct mem_section_usage *usage) in check_usemap_section_nr() argument
375 usemap_snr = pfn_to_section_nr(__pa(usage) >> PAGE_SHIFT); in check_usemap_section_nr()
411 struct mem_section_usage *usage) in check_usemap_section_nr() argument
509 struct mem_section_usage *usage; in sparse_init_nid() local
513 usage = sparse_early_usemaps_alloc_pgdat_section(NODE_DATA(nid), in sparse_init_nid()
515 if (!usage) { in sparse_init_nid()
535 check_usemap_section_nr(nid, usage); in sparse_init_nid()
536 sparse_init_one_section(__nr_to_section(pnum), pnum, map, usage, in sparse_init_nid()
538 usage = (void *) usage + mem_section_usage_size(); in sparse_init_nid()
659 unsigned long *subsection_map = ms->usage in clear_subsection_map()
660 ? &ms->usage->subsection_map[0] : NULL; in clear_subsection_map()
677 return bitmap_empty(&ms->usage->subsection_map[0], in is_subsection_map_empty()
690 subsection_map = &ms->usage->subsection_map[0]; in fill_subsection_map()
808 if (!PageReserved(virt_to_page(ms->usage))) { in section_deactivate()
809 kfree_rcu(ms->usage, rcu); in section_deactivate()
810 WRITE_ONCE(ms->usage, NULL); in section_deactivate()
833 struct mem_section_usage *usage = NULL; in section_activate() local
837 if (!ms->usage) { in section_activate()
838 usage = kzalloc(mem_section_usage_size(), GFP_KERNEL); in section_activate()
839 if (!usage) in section_activate()
841 ms->usage = usage; in section_activate()
846 if (usage) in section_activate()
847 ms->usage = NULL; in section_activate()
848 kfree(usage); in section_activate()
920 sparse_init_one_section(ms, section_nr, memmap, ms->usage, 0); in sparse_add_section()