Lines Matching refs:size

54  * The maximum amount of extra memory compared to the base size.  The
55 * main scaling factor is the size of struct page. At extreme ratios
65 static void __init xen_add_extra_mem(u64 start, u64 size)
72 if (xen_extra_mem[i].size == 0) {
74 xen_extra_mem[i].size = size;
78 if (xen_extra_mem[i].start + xen_extra_mem[i].size == start) {
79 xen_extra_mem[i].size += size;
86 memblock_reserve(start, size);
88 xen_max_p2m_pfn = PFN_DOWN(start + size);
161 * the size of that range or zero if not found.
178 e_pfn = PFN_DOWN(entry->addr + entry->size);
246 * start_pfn to start_pfn+size and remaps the underlying RAM of the original
255 unsigned long start_pfn, unsigned long size, unsigned long remap_pfn)
263 unsigned long left = size;
267 WARN_ON(size == 0);
282 mod = (start_pfn + size) % P2M_PER_PAGE;
283 ident_end_pfn_align = start_pfn + size - mod;
284 mod = (remap_pfn + size) % P2M_PER_PAGE;
285 remap_end_pfn_align = remap_pfn + size - mod;
292 BUG_ON(ident_pfn_iter + P2M_PER_PAGE > start_pfn + size);
293 BUG_ON(remap_pfn_iter + P2M_PER_PAGE > remap_pfn + size);
343 BUG_ON(ident_boundary_pfn >= start_pfn + size);
344 BUG_ON(remap_boundary_pfn >= remap_pfn + size);
368 start_pfn + size);
374 if (start_pfn + size > ident_pfn_iter)
376 start_pfn + size);
379 BUG_ON(ident_cnt != size);
380 BUG_ON(remap_cnt != size);
382 return size;
409 unsigned long size = left;
416 cur_pfn + size);
419 if (cur_pfn + size > nr_pages)
420 size = nr_pages - cur_pfn;
430 /* Adjust size to fit in current e820 RAM region */
431 if (size > remap_range_size)
432 size = remap_range_size;
434 if (!xen_do_set_identity_and_remap_chunk(cur_pfn, size, remap_pfn)) {
435 WARN(1, "Failed to remap 1:1 memory cur_pfn=%ld size=%ld remap_pfn=%ld\n",
436 cur_pfn, size, remap_pfn);
443 i += size;
444 remap_pfn += size;
445 *identity += size;
446 *remapped += size;
485 phys_addr_t end = entry->addr + entry->size;
536 static void xen_align_and_add_e820_region(u64 start, u64 size, int type)
538 u64 end = start + size;
591 map[0].size = mem_end;
593 map[0].size += 8ULL << 20;
632 * factor the base size. On non-highmem systems, the base
633 * size is the full initial memory allocation; on highmem it
634 * is limited to the max size of lowmem, so that it doesn't
646 u64 size = map[i].size;
651 size = min(size, mem_end - addr);
653 size = min(size, (u64)extra_pages * PAGE_SIZE);
654 extra_pages -= size / PAGE_SIZE;
655 xen_add_extra_mem(addr, size);
660 xen_align_and_add_e820_region(addr, size, type);
662 map[i].addr += size;
663 map[i].size -= size;
664 if (map[i].size == 0)
738 e820_add_region(map[i].addr, map[i].size, map[i].type);