Re: [PATCH v2 4/5] bpf ppc32: add support for BPF_ATOMIC bitwise operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 11/06/22 10:44 pm, Christophe Leroy wrote:


Le 10/06/2022 à 17:55, Hari Bathini a écrit :
Adding instructions for ppc32 for

atomic_and
atomic_or
atomic_xor
atomic_fetch_add
atomic_fetch_and
atomic_fetch_or
atomic_fetch_xor

Signed-off-by: Hari Bathini <hbathini@xxxxxxxxxxxxx>
---

Changes in v2:
* Used an additional register (BPF_REG_AX)
      - to avoid clobbering src_reg.
      - to keep the lwarx reservation as intended.
      - to avoid the odd switch/goto construct.

Might be a stupid question as I don't know the internals of BPF: Are we
sure BPF_REG_AX cannot be the src reg or the dst reg ?


AFAICS, BPF_REG_AX wouldn't be used as src_reg or dst_reg unless this
code is reused internally, by arch-specific code, for JIT'ing some other
instruction(s) using BPF_REG_AX as either src or dst reg..

Thanks
Hari



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux