Skip to content

Commit 4a6cea3

Browse files
committed
Cleanup
Signed-off-by: Dave Thaler <[email protected]>
1 parent 06536a3 commit 4a6cea3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

isa/kernel.org/instruction-set.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ mode
331331
BPF_ABS 0x20 legacy BPF packet access (absolute) `Legacy BPF Packet access instructions`_
332332
BPF_IND 0x40 legacy BPF packet access (indirect) `Legacy BPF Packet access instructions`_
333333
BPF_MEM 0x60 regular load and store operations `Regular load and store operations`_
334-
BPF_ATOMIC 0xc0 atomic operations `Atomic operations`
334+
BPF_ATOMIC 0xc0 atomic operations `Atomic operations`_
335335
============= ===== ==================================== =============
336336

337337
size
@@ -392,10 +392,10 @@ arithmetic operations in the 'imm' field to encode the atomic operation:
392392
======== ===== =========== =======
393393
imm value description version
394394
======== ===== =========== =======
395-
BPF_ADD 0x00 atomic add v1
396-
BPF_OR 0x40 atomic or v3
397-
BPF_AND 0x50 atomic and v3
398-
BPF_XOR 0xa0 atomic xor v3
395+
BPF_ADD 0x00 atomic add 1
396+
BPF_OR 0x40 atomic or 3
397+
BPF_AND 0x50 atomic and 3
398+
BPF_XOR 0xa0 atomic xor 3
399399
======== ===== =========== =======
400400

401401
where 'version' indicates the first ISA version in which the value was supported.
@@ -408,17 +408,18 @@ where 'version' indicates the first ISA version in which the value was supported
408408

409409
*(uint64_t *)(dst + offset) += src
410410

411-
*Linux implementation note*: ``BPF_XADD`` is a deprecated name for ``BPF_ATOMIC | BPF_ADD``.
411+
``BPF_XADD`` appeared in version 1, but is now considered to be a deprecated alias
412+
for ``BPF_ATOMIC | BPF_ADD``.
412413

413414
In addition to the simple atomic operations above, there also is a modifier and
414415
two complex atomic operations:
415416

416417
=========== ================ =========================== =======
417418
imm value description version
418419
=========== ================ =========================== =======
419-
BPF_FETCH 0x01 modifier: return old value v3
420-
BPF_XCHG 0xe0 | BPF_FETCH atomic exchange v3
421-
BPF_CMPXCHG 0xf0 | BPF_FETCH atomic compare and exchange v3
420+
BPF_FETCH 0x01 modifier: return old value 3
421+
BPF_XCHG 0xe0 | BPF_FETCH atomic exchange 3
422+
BPF_CMPXCHG 0xf0 | BPF_FETCH atomic compare and exchange 3
422423
=========== ================ =========================== =======
423424

424425
The ``BPF_FETCH`` modifier is optional for simple atomic operations, and

0 commit comments

Comments
 (0)