samples/bpf, selftests/bpf: Use bpf_probe_read_kernel
[linux-2.6-microblaze.git] / samples / bpf / offwaketime_kern.c
index d459f73..e74ee1c 100644 (file)
 #include <bpf/bpf_helpers.h>
 #include <bpf/bpf_tracing.h>
 
-#define _(P) ({typeof(P) val; bpf_probe_read(&val, sizeof(val), &P); val;})
+#define _(P)                                                                   \
+       ({                                                                     \
+               typeof(P) val;                                                 \
+               bpf_probe_read_kernel(&val, sizeof(val), &(P));                \
+               val;                                                           \
+       })
 
 #define MINBLOCK_US    1