From: Menglong Dong <menglong.dong@linux.dev>
To: Menglong Dong <menglong8.dong@gmail.com>,
ast@kernel.org, Ilya Leoshkevich <iii@linux.ibm.com>
Cc: daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev,
eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
haoluo@google.com, jolsa@kernel.org, hca@linux.ibm.com,
gor@linux.ibm.com, agordeev@linux.ibm.com,
borntraeger@linux.ibm.com, svens@linux.ibm.com,
bpf@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/3] bpf,s390: introduce emit_store_stack_imm64() for trampoline
Date: Tue, 24 Feb 2026 10:48:12 +0800 [thread overview]
Message-ID: <23014019.EfDdHjke4D@7940hx> (raw)
In-Reply-To: <9a939e13-d462-48e8-bc4e-19157b353b4c@linux.ibm.com>
On 2026/2/23 19:44 Ilya Leoshkevich <iii@linux.ibm.com> write:
>
> On 2/23/26 09:40, Menglong Dong wrote:
> > Introduce a helper to store 64-bit immediate on the trampoline stack with
> > a help of a register.
> >
> > Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
> > ---
> > arch/s390/net/bpf_jit_comp.c | 27 +++++++++++----------------
> > 1 file changed, 11 insertions(+), 16 deletions(-)
>
> [...]
>
> > @@ -2743,18 +2747,9 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im,
> > * arg_cnt = m->nr_args;
> > */
> >
> > - if (flags & BPF_TRAMP_F_IP_ARG) {
> > - /* %r0 = func_addr */
> > - load_imm64(jit, REG_0, (u64)func_addr);
> > - /* stg %r0,ip_off(%r15) */
> > - EMIT6_DISP_LH(0xe3000000, 0x0024, REG_0, REG_0, REG_15,
> > - tjit->ip_off);
> > - }
> > - /* lghi %r0,nr_bpf_args */
> > - EMIT4_IMM(0xa7090000, REG_0, nr_bpf_args);
>
> LGHI is more space-efficient than load_imm64(), can we keep it open-coded?
OK, I can keep this lghi instruction as it was.
Thanks for your reviewing :)
>
> With this changed:
>
> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
>
>
>
next prev parent reply other threads:[~2026-02-24 2:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 8:40 [PATCH bpf-next 0/3] bpf: fsession support for s390 Menglong Dong
2026-02-23 8:40 ` [PATCH bpf-next 1/3] bpf,s390: introduce emit_store_stack_imm64() for trampoline Menglong Dong
2026-02-23 11:44 ` Ilya Leoshkevich
2026-02-24 2:48 ` Menglong Dong [this message]
2026-02-23 8:40 ` [PATCH bpf-next 2/3] bpf,s390: add fsession support for trampolines Menglong Dong
2026-02-23 12:14 ` Ilya Leoshkevich
2026-02-24 2:53 ` Menglong Dong
2026-02-23 8:40 ` [PATCH bpf-next 3/3] selftests/bpf: factor out get_func_* tests for fsession Menglong Dong
2026-02-23 11:44 ` Ilya Leoshkevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23014019.EfDdHjke4D@7940hx \
--to=menglong.dong@linux.dev \
--cc=agordeev@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=gor@linux.ibm.com \
--cc=haoluo@google.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=menglong8.dong@gmail.com \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=svens@linux.ibm.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox