Lines Matching refs:alloc
74 static u64 checksum(struct efi_pool_allocation *alloc) in checksum() argument
76 u64 addr = (uintptr_t)alloc; in checksum()
77 u64 ret = (addr >> 32) ^ (addr << 32) ^ alloc->num_pages ^ in checksum()
633 struct efi_pool_allocation *alloc; in efi_allocate_pool() local
648 alloc = (struct efi_pool_allocation *)(uintptr_t)addr; in efi_allocate_pool()
649 alloc->num_pages = num_pages; in efi_allocate_pool()
650 alloc->checksum = checksum(alloc); in efi_allocate_pool()
651 *buffer = alloc->data; in efi_allocate_pool()
688 struct efi_pool_allocation *alloc; in efi_free_pool() local
697 alloc = container_of(buffer, struct efi_pool_allocation, data); in efi_free_pool()
700 if (((uintptr_t)alloc & EFI_PAGE_MASK) || in efi_free_pool()
701 alloc->checksum != checksum(alloc)) { in efi_free_pool()
706 alloc->checksum = 0; in efi_free_pool()
708 ret = efi_free_pages((uintptr_t)alloc, alloc->num_pages); in efi_free_pool()