Home
last modified time | relevance | path

Searched refs:target_slot (Results 1 - 2 of 2) sorted by relevance

/kernel/linux/linux-5.10/drivers/firmware/efi/libstub/
H A Drandomalloc.c58 unsigned long total_slots = 0, target_slot; in efi_random_alloc() local
83 target_slot = (total_slots * (u64)(random_seed & U32_MAX)) >> 32; in efi_random_alloc()
86 * target_slot is now a value in the range [0, total_slots), and so in efi_random_alloc()
92 * that covers our chosen slot. Use the residual value of target_slot in efi_random_alloc()
101 if (target_slot >= MD_NUM_SLOTS(md)) { in efi_random_alloc()
102 target_slot -= MD_NUM_SLOTS(md); in efi_random_alloc()
106 target = round_up(md->phys_addr, align) + target_slot * align; in efi_random_alloc()
/kernel/linux/linux-6.6/drivers/firmware/efi/libstub/
H A Drandomalloc.c62 unsigned long total_slots = 0, target_slot; in efi_random_alloc() local
95 target_slot = (total_slots * (u64)(random_seed & U32_MAX)) >> 32; in efi_random_alloc()
98 * target_slot is now a value in the range [0, total_slots), and so in efi_random_alloc()
104 * that covers our chosen slot. Use the residual value of target_slot in efi_random_alloc()
118 if (target_slot >= MD_NUM_SLOTS(md)) { in efi_random_alloc()
119 target_slot -= MD_NUM_SLOTS(md); in efi_random_alloc()
123 target = round_up(md->phys_addr, align) + target_slot * align; in efi_random_alloc()

Completed in 1 milliseconds