Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 58) sorted by relevance

123

/kernel/bpf/
Dtnum.c12 #define TNUM(_v, _m) (struct tnum){.value = _v, .mask = _m}
14 const struct tnum tnum_unknown = { .value = 0, .mask = -1 };
16 struct tnum tnum_const(u64 value) in tnum_const() argument
18 return TNUM(value, 0); in tnum_const()
39 return TNUM(a.value << shift, a.mask << shift); in tnum_lshift()
44 return TNUM(a.value >> shift, a.mask >> shift); in tnum_rshift()
55 return TNUM((u32)(((s32)a.value) >> min_shift), in tnum_arshift()
58 return TNUM((s64)a.value >> min_shift, in tnum_arshift()
67 sv = a.value + b.value; in tnum_add()
78 dv = a.value - b.value; in tnum_sub()
[all …]
Dqueue_stack_maps.c107 static int __queue_map_get(struct bpf_map *map, void *value, bool delete) in __queue_map_get() argument
122 memset(value, 0, qs->map.value_size); in __queue_map_get()
128 memcpy(value, ptr, qs->map.value_size); in __queue_map_get()
141 static int __stack_map_get(struct bpf_map *map, void *value, bool delete) in __stack_map_get() argument
157 memset(value, 0, qs->map.value_size); in __stack_map_get()
167 memcpy(value, ptr, qs->map.value_size); in __stack_map_get()
178 static int queue_map_peek_elem(struct bpf_map *map, void *value) in queue_map_peek_elem() argument
180 return __queue_map_get(map, value, false); in queue_map_peek_elem()
184 static int stack_map_peek_elem(struct bpf_map *map, void *value) in stack_map_peek_elem() argument
186 return __stack_map_get(map, value, false); in stack_map_peek_elem()
[all …]
Dhashtab.c807 void *value, bool onallcpus) in pcpu_copy_value() argument
811 memcpy(this_cpu_ptr(pptr), value, htab->map.value_size); in pcpu_copy_value()
818 value + off, size); in pcpu_copy_value()
825 void *value, bool onallcpus) in pcpu_init_value() argument
840 bpf_long_memcpy(per_cpu_ptr(pptr, cpu), value, in pcpu_init_value()
846 pcpu_copy_value(htab, pptr, value, onallcpus); in pcpu_init_value()
857 void *value, u32 key_size, u32 hash, in alloc_htab_elem() argument
920 pcpu_init_value(htab, pptr, value, onallcpus); in alloc_htab_elem()
926 memcpy(l_new->key + round_up(key_size, 8), value, size); in alloc_htab_elem()
930 value); in alloc_htab_elem()
[all …]
Darraymap.c149 - offsetof(struct bpf_array, value); in array_map_alloc()
183 return array->value + array->elem_size * (index & array->index_mask); in array_map_lookup_elem()
196 *imm = (unsigned long)array->value; in array_map_direct_value_addr()
204 u64 base = (unsigned long)array->value; in array_map_direct_value_meta()
229 *insn++ = BPF_ALU64_IMM(BPF_ADD, map_ptr, offsetof(struct bpf_array, value)); in array_map_gen_lookup()
261 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value) in bpf_percpu_array_copy() argument
280 bpf_long_memcpy(value + off, per_cpu_ptr(pptr, cpu), size); in bpf_percpu_array_copy()
307 static int array_map_update_elem(struct bpf_map *map, void *key, void *value, in array_map_update_elem() argument
332 value, map->value_size); in array_map_update_elem()
334 val = array->value + in array_map_update_elem()
[all …]
Dbpf_struct_ops.c243 void *value) in bpf_struct_ops_map_sys_lookup_elem() argument
256 memset(value, 0, map->value_size); in bpf_struct_ops_map_sys_lookup_elem()
263 uvalue = (struct bpf_struct_ops_value *)value; in bpf_struct_ops_map_sys_lookup_elem()
316 void *value, u64 flags) in bpf_struct_ops_map_update_elem() argument
335 err = check_zero_holes(st_ops->value_type, value); in bpf_struct_ops_map_update_elem()
339 uvalue = (struct bpf_struct_ops_value *)value; in bpf_struct_ops_map_update_elem()
361 memcpy(uvalue, value, map->value_size); in bpf_struct_ops_map_update_elem()
517 void *value; in bpf_struct_ops_map_seq_show_elem() local
520 value = kmalloc(map->value_size, GFP_USER | __GFP_NOWARN); in bpf_struct_ops_map_seq_show_elem()
521 if (!value) in bpf_struct_ops_map_seq_show_elem()
[all …]
Dsyscall.c173 void *value, __u64 flags) in bpf_map_update_value() argument
179 return bpf_map_offload_update_elem(map, key, value, flags); in bpf_map_update_value()
182 return map->ops->map_update_elem(map, key, value, flags); in bpf_map_update_value()
185 return sock_map_update_elem_sys(map, key, value, flags); in bpf_map_update_value()
187 return bpf_fd_array_map_update_elem(map, f.file, key, value, in bpf_map_update_value()
194 err = bpf_percpu_hash_update(map, key, value, flags); in bpf_map_update_value()
196 err = bpf_percpu_array_update(map, key, value, flags); in bpf_map_update_value()
198 err = bpf_percpu_cgroup_storage_update(map, key, value, in bpf_map_update_value()
202 err = bpf_fd_array_map_update_elem(map, f.file, key, value, in bpf_map_update_value()
207 err = bpf_fd_htab_map_update_elem(map, f.file, key, value, in bpf_map_update_value()
[all …]
Dcpumap.c65 struct bpf_cpumap_val value; member
408 rcpu->value.bpf_prog.id = prog->aux->id; in __cpu_map_load_bpf_program()
415 __cpu_map_entry_alloc(struct bpf_cpumap_val *value, u32 cpu, int map_id) in __cpu_map_entry_alloc() argument
417 int numa, err, i, fd = value->bpf_prog.fd; in __cpu_map_entry_alloc()
445 err = ptr_ring_init(rcpu->queue, value->qsize, gfp); in __cpu_map_entry_alloc()
451 rcpu->value.qsize = value->qsize; in __cpu_map_entry_alloc()
546 static int cpu_map_update_elem(struct bpf_map *map, void *key, void *value, in cpu_map_update_elem() argument
555 memcpy(&cpumap_value, value, map->value_size); in cpu_map_update_elem()
636 return rcpu ? &rcpu->value : NULL; in cpu_map_lookup_elem()
Dbpf_local_storage.c73 void *value, bool charge_mem) in bpf_selem_alloc() argument
82 if (value) in bpf_selem_alloc()
83 copy_map_value(&smap->map, SDATA(selem)->data, value); in bpf_selem_alloc()
333 void *value, u64 map_flags) in bpf_local_storage_update() argument
354 selem = bpf_selem_alloc(smap, owner, value, true); in bpf_local_storage_update()
380 value, false); in bpf_local_storage_update()
404 copy_map_value_locked(&smap->map, old_sdata->data, value, in bpf_local_storage_update()
419 selem = bpf_selem_alloc(smap, owner, value, !old_sdata); in bpf_local_storage_update()
Dreuseport_array.c183 void *value) in bpf_fd_reuseport_array_lookup_elem() argument
194 *(u64 *)value = __sock_gen_cookie(sk); in bpf_fd_reuseport_array_lookup_elem()
250 void *value, u64 map_flags) in bpf_fd_reuseport_array_update_elem() argument
267 u64 fd64 = *(u64 *)value; in bpf_fd_reuseport_array_update_elem()
273 fd = *(int *)value; in bpf_fd_reuseport_array_update_elem()
Dhelpers.c46 void *, value, u64, flags) in BPF_CALL_4() argument
49 return map->ops->map_update_elem(map, key, value, flags); in BPF_CALL_4()
78 BPF_CALL_3(bpf_map_push_elem, struct bpf_map *, map, void *, value, u64, flags) in BPF_CALL_3() argument
80 return map->ops->map_push_elem(map, value, flags); in BPF_CALL_3()
93 BPF_CALL_2(bpf_map_pop_elem, struct bpf_map *, map, void *, value) in BPF_CALL_2() argument
95 return map->ops->map_pop_elem(map, value); in BPF_CALL_2()
106 BPF_CALL_2(bpf_map_peek_elem, struct bpf_map *, map, void *, value) in BPF_CALL_2() argument
108 return map->ops->map_peek_elem(map, value); in BPF_CALL_2()
Dbpf_inode_storage.c120 void *value, u64 map_flags) in bpf_fd_inode_storage_update_elem() argument
137 value, map_flags); in bpf_fd_inode_storage_update_elem()
171 void *, value, u64, flags) in BPF_CALL_4() argument
195 inode, (struct bpf_local_storage_map *)map, value, in BPF_CALL_4()
Dlocal_storage.c146 void *value, u64 flags) in cgroup_storage_update_elem() argument
164 copy_map_value_locked(map, storage->buf->data, value, false); in cgroup_storage_update_elem()
175 memcpy(&new->data[0], value, map->value_size); in cgroup_storage_update_elem()
185 void *value) in bpf_percpu_cgroup_storage_copy() argument
205 bpf_long_memcpy(value + off, in bpf_percpu_cgroup_storage_copy()
214 void *value, u64 map_flags) in bpf_percpu_cgroup_storage_update() argument
240 value + off, size); in bpf_percpu_cgroup_storage_update()
/kernel/time/
Ditimer.c48 struct itimerspec64 *const value) in get_cpu_itimer() argument
72 value->it_value = ns_to_timespec64(val); in get_cpu_itimer()
73 value->it_interval = ns_to_timespec64(interval); in get_cpu_itimer()
76 static int do_getitimer(int which, struct itimerspec64 *value) in do_getitimer() argument
83 value->it_value = itimer_get_remtime(&tsk->signal->real_timer); in do_getitimer()
84 value->it_interval = in do_getitimer()
89 get_cpu_itimer(tsk, CPUCLOCK_VIRT, value); in do_getitimer()
92 get_cpu_itimer(tsk, CPUCLOCK_PROF, value); in do_getitimer()
113 SYSCALL_DEFINE2(getitimer, int, which, struct __kernel_old_itimerval __user *, value) in SYSCALL_DEFINE2() argument
118 if (!error && put_itimerval(value, &get_buffer)) in SYSCALL_DEFINE2()
[all …]
Dtimeconst.bc20 /* Adjustment factor when a ceiling value is used. Use as:
30 which brings the mul value into the range 2^b-1 <= x < 2^b. Such
31 a shift value will be correct in the signed integer range and off
55 print "#error \qinclude/generated/timeconst.h has the wrong HZ value!\q\n"
59 print "#error Totally bogus HZ value!\n"
/kernel/power/
Dqos.c79 static void pm_qos_set_value(struct pm_qos_constraints *c, s32 value) in pm_qos_set_value() argument
81 WRITE_ONCE(c->target_value, value); in pm_qos_set_value()
102 enum pm_qos_req_action action, int value) in pm_qos_update_target() argument
110 if (value == PM_QOS_DEFAULT_VALUE) in pm_qos_update_target()
113 new_value = value; in pm_qos_update_target()
248 enum pm_qos_req_action action, s32 value) in cpu_latency_qos_apply() argument
250 int ret = pm_qos_update_target(req->qos, &req->node, action, value); in cpu_latency_qos_apply()
267 void cpu_latency_qos_add_request(struct pm_qos_request *req, s32 value) in cpu_latency_qos_add_request() argument
277 trace_pm_qos_add_request(value); in cpu_latency_qos_add_request()
280 cpu_latency_qos_apply(req, PM_QOS_ADD_REQ, value); in cpu_latency_qos_add_request()
[all …]
Dsuspend_test.c150 static int __init setup_test_suspend(char *value) in setup_test_suspend() argument
157 value++; in setup_test_suspend()
158 suspend_type = strsep(&value, ","); in setup_test_suspend()
162 repeat = strsep(&value, ","); in setup_test_suspend()
/kernel/
Dkexec_elf.c29 static uint64_t elf64_to_cpu(const struct elfhdr *ehdr, uint64_t value) in elf64_to_cpu() argument
32 value = le64_to_cpu(value); in elf64_to_cpu()
34 value = be64_to_cpu(value); in elf64_to_cpu()
36 return value; in elf64_to_cpu()
39 static uint32_t elf32_to_cpu(const struct elfhdr *ehdr, uint32_t value) in elf32_to_cpu() argument
42 value = le32_to_cpu(value); in elf32_to_cpu()
44 value = be32_to_cpu(value); in elf32_to_cpu()
46 return value; in elf32_to_cpu()
49 static uint16_t elf16_to_cpu(const struct elfhdr *ehdr, uint16_t value) in elf16_to_cpu() argument
52 value = le16_to_cpu(value); in elf16_to_cpu()
[all …]
Dacct.c315 static comp_t encode_comp_t(unsigned long value) in encode_comp_t() argument
320 while (value > MAXFRACT) { in encode_comp_t()
321 rnd = value & (1 << (EXPSIZE - 1)); /* Round up? */ in encode_comp_t()
322 value >>= EXPSIZE; /* Base 8 exponent == 3 bit shift. */ in encode_comp_t()
329 if (rnd && (++value > MAXFRACT)) { in encode_comp_t()
330 value >>= EXPSIZE; in encode_comp_t()
340 exp += value; /* and add on the mantissa. */ in encode_comp_t()
359 static comp2_t encode_comp2_t(u64 value) in encode_comp2_t() argument
363 exp = (value > (MAXFRACT2>>1)); in encode_comp2_t()
365 while (value > MAXFRACT2) { in encode_comp2_t()
[all …]
Dkallsyms.c486 unsigned long value; member
495 int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, in arch_get_kallsym() argument
504 &iter->value, &iter->type, in get_ksymbol_arch()
518 &iter->value, &iter->type, in get_ksymbol_mod()
537 &iter->value, &iter->type, in get_ksymbol_ftrace_mod()
555 &iter->value, &iter->type, in get_ksymbol_bpf()
575 &iter->value, &iter->type, in get_ksymbol_kprobe()
585 iter->value = kallsyms_sym_address(iter->pos); in get_ksymbol_core()
674 void *value; in s_show() local
681 value = iter->show_value ? (void *)iter->value : NULL; in s_show()
[all …]
Dtest_kprobes.c18 static u32 (*target)(u32 value);
19 static u32 (*target2)(u32 value);
21 static noinline u32 kprobe_target(u32 value) in kprobe_target() argument
23 return (value / div_factor); in kprobe_target()
82 static noinline u32 kprobe_target2(u32 value) in kprobe_target2() argument
84 return (value / div_factor) + 1; in kprobe_target2()
/kernel/cgroup/
Drdma.c359 char *name, *value = c; in parse_resource() local
363 name = strsep(&value, "="); in parse_resource()
364 if (!name || !value) in parse_resource()
371 len = strlen(value); in parse_resource()
373 argstr.from = value; in parse_resource()
374 argstr.to = value + len; in parse_resource()
382 if (strncmp(value, RDMACG_MAX_STR, len) == 0) { in parse_resource()
497 u32 value; in print_rpool_values() local
506 value = rpool->resources[i].max; in print_rpool_values()
508 value = S32_MAX; in print_rpool_values()
[all …]
/kernel/dma/
DKconfig165 bool "Use mega bytes value only"
168 bool "Use percentage value only"
171 bool "Use lower value (minimum)"
174 bool "Use higher value (maximum)"
191 For example, if your system defaults to 4KiB pages, the order value
194 If unsure, leave the default value "8".
/kernel/trace/
Dtrace_mmiotrace.c186 rw->value, rw->pc, 0); in mmio_print_rw()
193 rw->value, rw->pc, 0); in mmio_print_rw()
201 (rw->value >> 16) & 0xff, (rw->value >> 8) & 0xff, in mmio_print_rw()
202 (rw->value >> 0) & 0xff, rw->pc, 0); in mmio_print_rw()
/kernel/debug/kdb/
Dkdb_main.c343 static int kdbgetulenv(const char *match, unsigned long *value) in kdbgetulenv() argument
353 *value = simple_strtoul(ep, NULL, 0); in kdbgetulenv()
368 int kdbgetintenv(const char *match, int *value) in kdbgetintenv() argument
375 *value = (int) val; in kdbgetintenv()
389 int kdbgetularg(const char *arg, unsigned long *value) in kdbgetularg() argument
406 *value = val; in kdbgetularg()
411 int kdbgetu64arg(const char *arg, u64 *value) in kdbgetu64arg() argument
425 *value = val; in kdbgetu64arg()
553 unsigned long *value, long *offset, in kdbgetaddrarg() argument
630 if (value) in kdbgetaddrarg()
[all …]
Dkdb_private.h36 #define KDB_DEBUG_STATE(text, value) if (KDB_DEBUG(STATE)) \ argument
37 kdb_print_state(text, value)
73 unsigned long value; /* Address of symbol */ member

123