xref: /openbmc/linux/tools/testing/selftests/bpf/progs/test_access_variable_array.c (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2023 Bytedance */
3 
4 #include "vmlinux.h"
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
7 
8 unsigned long span = 0;
9 
10 SEC("fentry/load_balance")
BPF_PROG(fentry_fentry,int this_cpu,struct rq * this_rq,struct sched_domain * sd)11 int BPF_PROG(fentry_fentry, int this_cpu, struct rq *this_rq,
12 		struct sched_domain *sd)
13 {
14 	span = sd->span[0];
15 
16 	return 0;
17 }
18 
19 char _license[] SEC("license") = "GPL";
20