[PATCH] riscv, bpf: Introduce shift add helper with Zba optimization

Wang, Xiao W xiao.w.wang at intel.com
Thu May 23 19:29:43 PDT 2024



> -----Original Message-----
> From: Björn Töpel <bjorn at kernel.org>
> Sent: Wednesday, May 22, 2024 12:40 AM
> To: Wang, Xiao W <xiao.w.wang at intel.com>; paul.walmsley at sifive.com;
> palmer at dabbelt.com; aou at eecs.berkeley.edu; luke.r.nels at gmail.com;
> xi.wang at gmail.com
> Cc: ast at kernel.org; daniel at iogearbox.net; andrii at kernel.org;
> martin.lau at linux.dev; eddyz87 at gmail.com; song at kernel.org;
> yonghong.song at linux.dev; john.fastabend at gmail.com; kpsingh at kernel.org;
> sdf at google.com; haoluo at google.com; jolsa at kernel.org; linux-
> riscv at lists.infradead.org; linux-kernel at vger.kernel.org; bpf at vger.kernel.org;
> pulehui at huawei.com; Li, Haicheng <haicheng.li at intel.com>; Wang, Xiao W
> <xiao.w.wang at intel.com>
> Subject: Re: [PATCH] riscv, bpf: Introduce shift add helper with Zba
> optimization
> 
> Xiao Wang <xiao.w.wang at intel.com> writes:
> 
> > Zba extension is very useful for generating addresses that index into array
> > of basic data types. This patch introduces sh2add and sh3add helpers for
> > RV32 and RV64 respectively, to accelerate pointer array addressing.
> >
> > Signed-off-by: Xiao Wang <xiao.w.wang at intel.com>
> 
> This is dependent on [1], and given it hasn't been accepted yet, I'd
> make this patch part of that series.

I would make a new version, combining them as a series. Meanwhile
this patch needs rebase on top of bpf-next and enable one more sh3add
use cases.

BRs,
Xiao

> 
> 
> Björn
> 
> [1] https://lore.kernel.org/linux-riscv/20240516090430.493122-1-
> xiao.w.wang at intel.com/


More information about the linux-riscv mailing list