Re: [PATCH 5/5] bpf ppc32: Add instructions for atomic_[cmp]xchg

2022-05-13 Thread Christophe Leroy
Le 12/05/2022 à 09:45, Hari Bathini a écrit : > This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc32, both > of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg > operation fundamentally has 3 operands, but we only have two register > fields. Therefore the operand we

[PATCH 5/5] bpf ppc32: Add instructions for atomic_[cmp]xchg

2022-05-12 Thread Hari Bathini
This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc32, both of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg operation fundamentally has 3 operands, but we only have two register fields. Therefore the operand we compare against (the kernel's API calls it 'old') is