Lines Matching +full:offset +full:- +full:y
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
7 #define __round_mask(x, y) ((__typeof__(x))((y)-1)) argument
10 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) argument
26 int offset; in bpf_alloc() local
29 if (size >= PAGE_SIZE - 8) in bpf_alloc()
38 *cur_offset = PAGE_SIZE - 8; in bpf_alloc()
39 obj_cnt = page + PAGE_SIZE - 8; in bpf_alloc()
43 obj_cnt = page + PAGE_SIZE - 8; in bpf_alloc()
46 offset = *cur_offset - size; in bpf_alloc()
47 if (offset < 0) in bpf_alloc()
51 *cur_offset = offset; in bpf_alloc()
52 return page + offset; in bpf_alloc()
59 addr = (void __arena *)(((long)addr) & ~(PAGE_SIZE - 1)); in bpf_free()
60 obj_cnt = addr + PAGE_SIZE - 8; in bpf_free()
61 if (--(*obj_cnt) == 0) in bpf_free()