Lines Matching +full:time +full:- +full:slots
1 // SPDX-License-Identifier: GPL-2.0
13 * Return the number of slots covered by this entry, i.e., the number of
24 if (md->type != EFI_CONVENTIONAL_MEMORY) in get_entry_num_slots()
28 (md->attribute & EFI_MEMORY_SP)) in get_entry_num_slots()
31 region_end = min(md->phys_addr + md->num_pages * EFI_PAGE_SIZE - 1, in get_entry_num_slots()
36 first_slot = round_up(md->phys_addr, align); in get_entry_num_slots()
37 last_slot = round_down(region_end - size + 1, align); in get_entry_num_slots()
42 return ((unsigned long)(last_slot - first_slot) >> align_shift) + 1; in get_entry_num_slots()
51 #define MD_NUM_SLOTS(md) ((md)->virt_addr)
81 /* count the suitable slots in each memory map entry */ in efi_random_alloc()
84 unsigned long slots; in efi_random_alloc() local
86 slots = get_entry_num_slots(md, size, ilog2(align)); in efi_random_alloc()
87 MD_NUM_SLOTS(md) = slots; in efi_random_alloc()
88 total_slots += slots; in efi_random_alloc()
96 * it corresponds with exactly one of the suitable slots we recorded in efi_random_alloc()
97 * when iterating over the memory map the first time around. in efi_random_alloc()
100 * slots of each entry at each iteration, until we have found the entry in efi_random_alloc()
111 target_slot -= MD_NUM_SLOTS(md); in efi_random_alloc()
115 target = round_up(md->phys_addr, align) + target_slot * align; in efi_random_alloc()