summaryrefslogtreecommitdiff
path: root/tools/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-04-11 08:42:47 +0200
committerIngo Molnar <mingo@kernel.org>2017-04-11 08:42:47 +0200
commit84b1e36a6aee080ea01256659e2957114a0a52b5 (patch)
treee105aceb0f5aac46dbed0cb86ec28656cce44f35 /tools/include/linux
parent11e445e9b499dfd96d7cbc55b2f22057fcf2804d (diff)
parent39da7c509acff13fc8cb12ec1bb20337c988ed36 (diff)
Merge tag 'v4.11-rc6' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/include/linux')
-rw-r--r--tools/include/linux/filter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/include/linux/filter.h b/tools/include/linux/filter.h
index 122153b16ea4..390d7c9685fd 100644
--- a/tools/include/linux/filter.h
+++ b/tools/include/linux/filter.h
@@ -168,6 +168,16 @@
.off = OFF, \
.imm = 0 })
+/* Atomic memory add, *(uint *)(dst_reg + off16) += src_reg */
+
+#define BPF_STX_XADD(SIZE, DST, SRC, OFF) \
+ ((struct bpf_insn) { \
+ .code = BPF_STX | BPF_SIZE(SIZE) | BPF_XADD, \
+ .dst_reg = DST, \
+ .src_reg = SRC, \
+ .off = OFF, \
+ .imm = 0 })
+
/* Memory store, *(uint *) (dst_reg + off16) = imm32 */
#define BPF_ST_MEM(SIZE, DST, OFF, IMM) \