| /linux/drivers/iio/adc/ |
| H A D | envelope-detector.c | 79 static int envelope_detector_comp_latch(struct envelope *env) in envelope_detector_comp_latch() argument 83 spin_lock_irq(&env->comp_lock); in envelope_detector_comp_latch() 84 comp = env->comp; in envelope_detector_comp_latch() 85 env->comp = 0; in envelope_detector_comp_latch() 86 spin_unlock_irq(&env->comp_lock); in envelope_detector_comp_latch() 98 enable_irq(env->comp_irq); in envelope_detector_comp_latch() 101 synchronize_irq(env->comp_irq); in envelope_detector_comp_latch() 104 spin_lock_irq(&env->comp_lock); in envelope_detector_comp_latch() 105 comp = env->comp; in envelope_detector_comp_latch() 106 env->comp = 0; in envelope_detector_comp_latch() [all …]
|
| /linux/tools/perf/util/ |
| H A D | env.c | 27 bool perf_env__insert_bpf_prog_info(struct perf_env *env, in perf_env__insert_bpf_prog_info() argument 32 down_write(&env->bpf_progs.lock); in perf_env__insert_bpf_prog_info() 33 ret = __perf_env__insert_bpf_prog_info(env, info_node); in perf_env__insert_bpf_prog_info() 34 up_write(&env->bpf_progs.lock); in perf_env__insert_bpf_prog_info() 39 bool __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info_node *info_node) in __perf_env__insert_bpf_prog_info() argument 46 p = &env->bpf_progs.infos.rb_node; in __perf_env__insert_bpf_prog_info() 62 rb_insert_color(&info_node->rb_node, &env->bpf_progs.infos); in __perf_env__insert_bpf_prog_info() 63 env->bpf_progs.infos_cnt++; in __perf_env__insert_bpf_prog_info() 67 struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env, in perf_env__find_bpf_prog_info() argument 73 down_read(&env->bpf_progs.lock); in perf_env__find_bpf_prog_info() [all …]
|
| H A D | env.h | 153 int perf_env__read_core_pmu_caps(struct perf_env *env); 154 void perf_env__exit(struct perf_env *env); 156 int perf_env__kernel_is_64_bit(struct perf_env *env); 158 int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]); 160 int perf_env__read_cpuid(struct perf_env *env); 161 int perf_env__read_pmu_mappings(struct perf_env *env); 162 int perf_env__nr_pmu_mappings(struct perf_env *env); 163 const char *perf_env__pmu_mappings(struct perf_env *env); 165 int perf_env__read_cpu_topology_map(struct perf_env *env); 169 const char *perf_env__arch(struct perf_env *env); [all …]
|
| H A D | header.c | 560 struct perf_env *env = &ff->ph->env; in write_cmdline() local 568 n = env->nr_cmdline + 1; in write_cmdline() 578 for (i = 0 ; i < env->nr_cmdline; i++) { in write_cmdline() 579 ret = do_write_string(ff, env->cmdline_argv[i]); in write_cmdline() 590 struct perf_env *env = &ff->ph->env; in write_cpu_topology() local 618 ret = perf_env__read_cpu_topology_map(env); in write_cpu_topology() 622 for (j = 0; j < env->nr_cpus_avail; j++) { in write_cpu_topology() 623 ret = do_write(ff, &env->cpu[j].core_id, in write_cpu_topology() 624 sizeof(env->cpu[j].core_id)); in write_cpu_topology() 627 ret = do_write(ff, &env->cpu[j].socket_id, in write_cpu_topology() [all …]
|
| /linux/kernel/bpf/ |
| H A D | verifier.c | 205 static int acquire_reference(struct bpf_verifier_env *env, int insn_idx); 207 static int release_reference(struct bpf_verifier_env *env, int ref_obj_id); 208 static void invalidate_non_owning_refs(struct bpf_verifier_env *env); 209 static bool in_rbtree_lock_required_cb(struct bpf_verifier_env *env); 210 static int ref_set_non_owning(struct bpf_verifier_env *env, 212 static void specialize_kfunc(struct bpf_verifier_env *env, 367 struct bpf_verifier_env *env = private_data; in verbose() local 370 if (!bpf_verifier_log_needed(&env->log)) in verbose() 374 bpf_verifier_vlog(&env->log, fmt, args); in verbose() 378 static void verbose_invalid_scalar(struct bpf_verifier_env *env, in verbose_invalid_scalar() argument [all …]
|
| H A D | liveness.c | 139 static void compute_callchain(struct bpf_verifier_env *env, struct bpf_verifier_state *st, in compute_callchain() argument 142 struct bpf_subprog_info *subprog_info = env->subprog_info; in compute_callchain() 177 static struct func_instance *__lookup_instance(struct bpf_verifier_env *env, in __lookup_instance() argument 180 struct bpf_liveness *liveness = env->liveness; in __lookup_instance() 190 subprog = bpf_find_containing_subprog(env, callchain->sp_starts[callchain->curframe]); in __lookup_instance() 208 static struct func_instance *lookup_instance(struct bpf_verifier_env *env, in lookup_instance() argument 214 compute_callchain(env, st, &callchain, frameno); in lookup_instance() 215 return __lookup_instance(env, &callchain); in lookup_instance() 218 int bpf_stack_liveness_init(struct bpf_verifier_env *env) in bpf_stack_liveness_init() argument 220 env->liveness = kvzalloc(sizeof(*env->liveness), GFP_KERNEL_ACCOUNT); in bpf_stack_liveness_init() [all …]
|
| H A D | log.c | 14 #define verbose(env, fmt, args...) bpf_verifier_log_write(env, fmt, ##args) argument 304 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, in bpf_verifier_log_write() argument 309 if (!bpf_verifier_log_needed(&env->log)) in bpf_verifier_log_write() 313 bpf_verifier_vlog(&env->log, fmt, args); in bpf_verifier_log_write() 333 find_linfo(const struct bpf_verifier_env *env, u32 insn_off) in find_linfo() argument 340 prog = env->prog; in find_linfo() 381 __printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env, in verbose_linfo() argument 389 if (!bpf_verifier_log_needed(&env->log)) in verbose_linfo() 392 prev_linfo = env->prev_linfo; in verbose_linfo() 393 linfo = find_linfo(env, insn_off); in verbose_linfo() [all …]
|
| H A D | btf.c | 444 s32 (*check_meta)(struct btf_verifier_env *env, 447 int (*resolve)(struct btf_verifier_env *env, 449 int (*check_member)(struct btf_verifier_env *env, 453 int (*check_kflag_member)(struct btf_verifier_env *env, 457 void (*log_details)(struct btf_verifier_env *env, 467 static int btf_resolve(struct btf_verifier_env *env, 470 static int btf_func_check(struct btf_verifier_env *env, 1434 __printf(2, 3) static void btf_verifier_log(struct btf_verifier_env *env, in btf_verifier_log() argument 1437 struct bpf_verifier_log *log = &env->log; in btf_verifier_log() 1448 __printf(4, 5) static void __btf_verifier_log_type(struct btf_verifier_env *env, in __btf_verifier_log_type() argument [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_progs.c | 48 return env.verbosity > VERBOSE_NONE; in verbose() 54 if (verbose() && env.worker_id == -1) { in stdio_hijack_init() 64 stdout = env.stdout_saved; in stdio_hijack_init() 69 if (env.subtest_state) in stdio_hijack_init() 70 env.subtest_state->stdout_saved = stdout; in stdio_hijack_init() 72 env.test_state->stdout_saved = stdout; in stdio_hijack_init() 81 if (verbose() && env.worker_id == -1) { in stdio_hijack() 86 env.stdout_saved = stdout; in stdio_hijack() 87 env.stderr_saved = stderr; in stdio_hijack() 98 if (verbose() && env.worker_id == -1) { in stdio_restore() [all …]
|
| H A D | xdp_features.c | 26 static struct env { struct 38 } env; argument 47 if (level == LIBBPF_DEBUG && !env.verbosity) in libbpf_print_fn() 90 env.feature.action = XDP_PASS; in get_xdp_feature() 91 env.feature.drv_feature = NETDEV_XDP_ACT_BASIC; in get_xdp_feature() 93 env.feature.drv_feature = NETDEV_XDP_ACT_BASIC; in get_xdp_feature() 94 env.feature.action = XDP_DROP; in get_xdp_feature() 96 env.feature.drv_feature = NETDEV_XDP_ACT_BASIC; in get_xdp_feature() 97 env.feature.action = XDP_ABORTED; in get_xdp_feature() 99 env.feature.drv_feature = NETDEV_XDP_ACT_BASIC; in get_xdp_feature() [all …]
|
| H A D | veristat.c | 190 static struct env { struct 237 } env; variable 241 if (!env.verbose) in libbpf_print_fn() 243 if (level == LIBBPF_DEBUG && !env.debug) in libbpf_print_fn() 327 env.show_version = true; in parse_arg() 330 env.verbose = true; in parse_arg() 333 env.debug = true; in parse_arg() 334 env.verbose = true; in parse_arg() 337 env.quiet = true; in parse_arg() 340 err = parse_stats(arg, &env.output_spec); in parse_arg() [all …]
|
| H A D | bench.c | 16 struct env env = { variable 28 if (level == LIBBPF_DEBUG && !env.verbose) in libbpf_print_fn() 74 hits_per_prod = hits_per_sec / env.producer_cnt; in hits_drops_report_progress() 152 hits_mean, hits_stddev, hits_mean / env.producer_cnt); in hits_drops_report_final() 164 hits_per_prod = hits_per_sec / env.producer_cnt; in ops_report_progress() 188 hits_mean, hits_stddev, hits_mean / env.producer_cnt); in ops_report_final() 189 printf("latency %8.3lf ns/op\n", 1000.0 / hits_mean * env.producer_cnt); in ops_report_final() 314 env.verbose = true; in parse_arg() 317 env.list = true; in parse_arg() 320 env.duration_sec = strtol(arg, NULL, 10); in parse_arg() [all …]
|
| /linux/drivers/net/ethernet/netronome/nfp/bpf/ |
| H A D | verifier.c | 16 #define pr_vlog(env, fmt, ...) \ argument 17 bpf_verifier_log_write(env, "[nfp] " fmt, ##__VA_ARGS__) 83 static bool nfp_bpf_map_update_value_ok(struct bpf_verifier_env *env) in nfp_bpf_map_update_value_ok() argument 85 const struct bpf_reg_state *reg1 = cur_regs(env) + BPF_REG_1; in nfp_bpf_map_update_value_ok() 86 const struct bpf_reg_state *reg3 = cur_regs(env) + BPF_REG_3; in nfp_bpf_map_update_value_ok() 92 state = env->cur_state->frame[reg3->frameno]; in nfp_bpf_map_update_value_ok() 113 …pr_vlog(env, "value at offset %d/%d may be non-zero, bpf_map_update_elem() is required to initiali… in nfp_bpf_map_update_value_ok() 124 nfp_bpf_stack_arg_ok(const char *fname, struct bpf_verifier_env *env, in nfp_bpf_stack_arg_ok() argument 131 pr_vlog(env, "%s: unsupported ptr type %d\n", in nfp_bpf_stack_arg_ok() 136 pr_vlog(env, "%s: variable pointer\n", fname); in nfp_bpf_stack_arg_ok() [all …]
|
| /linux/lib/ |
| H A D | kobject_uevent.c | 116 struct kobj_uevent_env *env = NULL; in kobject_action_args() local 127 env = kzalloc(sizeof(*env), GFP_KERNEL); in kobject_action_args() 128 if (!env) in kobject_action_args() 133 add_uevent_var(env, "SYNTH_UUID=%.*s", UUID_STRING_LEN, buf)) in kobject_action_args() 167 if (add_uevent_var(env, "SYNTH_ARG_%.*s=%.*s", in kobject_action_args() 175 kfree(env); in kobject_action_args() 177 *ret_env = env; in kobject_action_args() 196 struct kobj_uevent_env *env; in kobject_synth_uevent() local 212 count - (action_args - buf), &env); in kobject_synth_uevent() 221 r = kobject_uevent_env(kobj, action, env->envp); in kobject_synth_uevent() [all …]
|
| /linux/arch/x86/kernel/fpu/ |
| H A D | regset.c | 331 static void __convert_from_fxsr(struct user_i387_ia32_struct *env, in __convert_from_fxsr() argument 335 struct _fpreg *to = (struct _fpreg *) &env->st_space[0]; in __convert_from_fxsr() 339 env->cwd = fxsave->cwd | 0xffff0000u; in __convert_from_fxsr() 340 env->swd = fxsave->swd | 0xffff0000u; in __convert_from_fxsr() 341 env->twd = twd_fxsr_to_i387(fxsave); in __convert_from_fxsr() 344 env->fip = fxsave->rip; in __convert_from_fxsr() 345 env->foo = fxsave->rdp; in __convert_from_fxsr() 350 env->fcs = task_pt_regs(tsk)->cs; in __convert_from_fxsr() 352 savesegment(ds, env->fos); in __convert_from_fxsr() 354 env->fos = tsk->thread.ds; in __convert_from_fxsr() [all …]
|
| /linux/include/linux/ |
| H A D | bpf_verifier.h | 671 struct bpf_verifier_env *env; member 833 static inline struct bpf_func_info_aux *subprog_aux(struct bpf_verifier_env *env, int subprog) in subprog_aux() argument 835 return &env->prog->aux->func_info_aux[subprog]; in subprog_aux() 838 static inline struct bpf_subprog_info *subprog_info(struct bpf_verifier_env *env, int subprog) in subprog_info() argument 840 return &env->subprog_info[subprog]; in subprog_info() 845 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, 854 __printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env, 858 #define verifier_bug_if(cond, env, fmt, args...) \ argument 862 verifier_bug(env, fmt " (" #cond ")", ##args); \ 865 #define verifier_bug(env, fmt, args...) \ argument [all …]
|
| /linux/tools/perf/tests/ |
| H A D | topology.c | 73 struct perf_env *env; in check_cpu_topology() local 77 env = perf_session__env(session); in check_cpu_topology() 101 if (!env->cpu && strncmp(env->arch, "s390", 4) && strncmp(env->arch, "aarch64", 7)) in check_cpu_topology() 110 if (!strncmp(env->arch, "ppc64le", 7)) { in check_cpu_topology() 115 TEST_ASSERT_VAL("Session header CPU map not set", env->cpu); in check_cpu_topology() 117 for (i = 0; i < env->nr_cpus_avail; i++) { in check_cpu_topology() 122 env->cpu[i].core_id, in check_cpu_topology() 123 env->cpu[i].socket_id); in check_cpu_topology() 133 env->cpu[cpu.cpu].core_id == id.core); in check_cpu_topology() 135 env->cpu[cpu.cpu].socket_id == id.socket); in check_cpu_topology() [all …]
|
| /linux/tools/perf/arch/ |
| H A D | common.c | 109 char *env = getenv("PATH"); in lookup_path() local 111 if (!env) in lookup_path() 114 env = strdup(env); in lookup_path() 115 if (!env) in lookup_path() 118 path = strtok_r(env, ":", &tmp); in lookup_path() 127 free(env); in lookup_path() 144 static int perf_env__lookup_binutils_path(struct perf_env *env, in perf_env__lookup_binutils_path() argument 148 const char *arch = perf_env__arch(env), *cross_env; in perf_env__lookup_binutils_path() 221 int perf_env__lookup_objdump(struct perf_env *env, char **path) in perf_env__lookup_objdump() argument 227 if (env->arch == NULL) in perf_env__lookup_objdump() [all …]
|
| /linux/arch/mips/alchemy/common/ |
| H A D | prom.c | 67 char **env = prom_envp; in prom_getenv() local 69 int yamon = (*env && strchr(*env, '=') == NULL); in prom_getenv() 71 while (*env) { in prom_getenv() 73 if (strcmp(envname, *env++) == 0) in prom_getenv() 74 return *env; in prom_getenv() 75 } else if (strncmp(envname, *env, i) == 0 && (*env)[i] == '=') in prom_getenv() 76 return *env + i + 1; in prom_getenv() 77 env++; in prom_getenv()
|
| /linux/security/tomoyo/ |
| H A D | environ.c | 24 return tomoyo_path_matches_pattern(r->param.environ.name, acl->env); in tomoyo_check_env_acl() 50 int tomoyo_env_perm(struct tomoyo_request_info *r, const char *env) in tomoyo_env_perm() argument 55 if (!env || !*env) in tomoyo_env_perm() 57 environ.name = env; in tomoyo_env_perm() 82 return p1->env == p2->env; in tomoyo_same_env_acl() 102 e.env = tomoyo_get_name(data); in tomoyo_write_env() 103 if (!e.env) in tomoyo_write_env() 107 tomoyo_put_name(e.env); in tomoyo_write_env()
|
| /linux/drivers/of/ |
| H A D | device.c | 215 void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env) in of_device_uevent() argument 225 add_uevent_var(env, "OF_NAME=%pOFn", dev->of_node); in of_device_uevent() 226 add_uevent_var(env, "OF_FULLNAME=%pOF", dev->of_node); in of_device_uevent() 229 add_uevent_var(env, "OF_TYPE=%s", type); in of_device_uevent() 235 add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat); in of_device_uevent() 238 add_uevent_var(env, "OF_COMPATIBLE_N=%d", seen); in of_device_uevent() 244 add_uevent_var(env, "OF_ALIAS_%d=%s", seen, in of_device_uevent() 253 int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env) in of_device_uevent_modalias() argument 261 if (add_uevent_var(env, "MODALIAS=")) in of_device_uevent_modalias() 264 sl = of_modalias(dev->of_node, &env->buf[env->buflen-1], in of_device_uevent_modalias() [all …]
|
| /linux/kernel/sched/ |
| H A D | fair.c | 2113 static void update_numa_stats(struct task_numa_env *env, in update_numa_stats() argument 2134 !cpumask_test_cpu(cpu, env->p->cpus_ptr)) in update_numa_stats() 2147 ns->node_type = numa_classify(env->imbalance_pct, ns); in update_numa_stats() 2153 static void task_numa_assign(struct task_numa_env *env, in task_numa_assign() argument 2156 struct rq *rq = cpu_rq(env->dst_cpu); in task_numa_assign() 2159 if (env->best_cpu != env->dst_cpu && xchg(&rq->numa_migrate_on, 1)) { in task_numa_assign() 2161 int start = env->dst_cpu; in task_numa_assign() 2164 for_each_cpu_wrap(cpu, cpumask_of_node(env->dst_nid), start + 1) { in task_numa_assign() 2165 if (cpu == env->best_cpu || !idle_cpu(cpu) || in task_numa_assign() 2166 !cpumask_test_cpu(cpu, env->p->cpus_ptr)) { in task_numa_assign() [all …]
|
| /linux/tools/testing/selftests/drivers/net/lib/py/ |
| H A D | env.py | 26 self.env = self._load_env_file() 32 env = os.environ.copy() 36 return ksft_setup(env) 51 env[pair[0]] = pair[1] 52 return ksft_setup(env) 80 if 'NETIF' in self.env: 84 self.dev = ip("-d link show dev " + self.env['NETIF'], json=True)[0] 128 if "NETIF" in self.env: 133 self.dev = ip("-d link show dev " + self.env['NETIF'], json=True)[0] 135 self.addr_v["4"] = self.env.get("LOCAL_V4") [all …]
|
| /linux/Documentation/sphinx/ |
| H A D | kerneldoc.py | 97 env = self.state.document.settings.env 98 cmd = [env.config.kerneldoc_bin, '-rst', '-enable-lineno'] 100 filename = env.config.kerneldoc_srctree + '/' + self.arguments[0] 128 env.note_dependency(os.path.abspath(filename)) 180 for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern): 181 env.note_dependency(os.path.abspath(f)) 198 env = self.state.document.settings.env 212 elif env.config.kerneldoc_verbosity > 0: 226 env = self.state.document.settings.env 241 doc = str(env.srcdir) + "/" + env.docname + ":" + str(self.lineno) [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | core_env.c | 1240 static int mlxsw_env_line_cards_alloc(struct mlxsw_env *env) in mlxsw_env_line_cards_alloc() argument 1245 for (i = 0; i < env->num_of_slots; i++) { in mlxsw_env_line_cards_alloc() 1246 env->line_cards[i] = kzalloc(struct_size(env->line_cards[i], in mlxsw_env_line_cards_alloc() 1248 env->max_module_count), in mlxsw_env_line_cards_alloc() 1250 if (!env->line_cards[i]) in mlxsw_env_line_cards_alloc() 1256 for (j = 0; j < env->max_module_count; j++) { in mlxsw_env_line_cards_alloc() 1257 module_info = &env->line_cards[i]->module_info[j]; in mlxsw_env_line_cards_alloc() 1267 kfree(env->line_cards[i]); in mlxsw_env_line_cards_alloc() 1271 static void mlxsw_env_line_cards_free(struct mlxsw_env *env) in mlxsw_env_line_cards_free() argument 1273 int i = env->num_of_slots; in mlxsw_env_line_cards_free() [all …]
|