Lines Matching refs:n_pfns
95 unsigned long n_pfns) in xen_add_extra_mem() argument
105 if (xen_extra_mem[i].n_pfns == 0) { in xen_add_extra_mem()
107 xen_extra_mem[i].n_pfns = n_pfns; in xen_add_extra_mem()
111 if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns == in xen_add_extra_mem()
113 xen_extra_mem[i].n_pfns += n_pfns; in xen_add_extra_mem()
120 memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns)); in xen_add_extra_mem()
124 unsigned long n_pfns) in xen_del_extra_mem() argument
131 size_r = xen_extra_mem[i].n_pfns; in xen_del_extra_mem()
135 BUG_ON(n_pfns > size_r); in xen_del_extra_mem()
136 xen_extra_mem[i].start_pfn += n_pfns; in xen_del_extra_mem()
137 xen_extra_mem[i].n_pfns -= n_pfns; in xen_del_extra_mem()
141 if (start_r + size_r == start_pfn + n_pfns) { in xen_del_extra_mem()
142 BUG_ON(n_pfns > size_r); in xen_del_extra_mem()
143 xen_extra_mem[i].n_pfns -= n_pfns; in xen_del_extra_mem()
148 BUG_ON(start_pfn + n_pfns > start_r + size_r); in xen_del_extra_mem()
149 xen_extra_mem[i].n_pfns = start_pfn - start_r; in xen_del_extra_mem()
151 xen_add_extra_mem(start_pfn + n_pfns, start_r + size_r - in xen_del_extra_mem()
152 (start_pfn + n_pfns)); in xen_del_extra_mem()
156 memblock_free(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns)); in xen_del_extra_mem()
170 pfn < xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns) in xen_chk_extra_mem()
186 if (!xen_extra_mem[i].n_pfns) in xen_inv_extra_mem()
189 pfn_e = pfn_s + xen_extra_mem[i].n_pfns; in xen_inv_extra_mem()
730 unsigned long max_pfn, pfn_s, n_pfns; in xen_memory_setup() local
823 n_pfns = PFN_DOWN(addr + chunk_size) - pfn_s; in xen_memory_setup()
824 extra_pages -= n_pfns; in xen_memory_setup()
825 xen_add_extra_mem(pfn_s, n_pfns); in xen_memory_setup()
826 xen_max_p2m_pfn = pfn_s + n_pfns; in xen_memory_setup()