From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH 0/2] bpf/s390: Implement get_preempt_count()
Date: Tue, 17 Feb 2026 17:05:07 +0100 [thread overview]
Message-ID: <20260217160813.100855-1-iii@linux.ibm.com> (raw)
Hi,
This series adds get_preempt_count() BPF implementation for s390.
On s390 preempt_count lives in lowcore: a per-cpu data structure
mapped at virtual address 0 or 0x70000 depending on the kernel
command line.
Patch 1 adds a kfunc to obtain lowcore address.
Patch 2 is the implementation that delegates to it.
Best regards,
Ilya
Ilya Leoshkevich (2):
s390: Introduce bpf_get_lowcore() kfunc
bpf/s390: Implement get_preempt_count()
arch/s390/kernel/Makefile | 2 ++
arch/s390/kernel/bpf.c | 12 ++++++++++++
kernel/bpf/helpers.c | 3 +++
tools/testing/selftests/bpf/bpf_experimental.h | 11 +++++++++++
4 files changed, 28 insertions(+)
create mode 100644 arch/s390/kernel/bpf.c
--
2.53.0
next reply other threads:[~2026-02-17 16:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 16:05 Ilya Leoshkevich [this message]
2026-02-17 16:05 ` [PATCH 1/2] s390: Introduce bpf_get_lowcore() kfunc Ilya Leoshkevich
2026-02-17 16:05 ` [PATCH 2/2] bpf/s390: Implement get_preempt_count() Ilya Leoshkevich
2026-02-17 17:55 ` [PATCH 0/2] " Vasily Gorbik
2026-02-17 19:32 ` Alexei Starovoitov
2026-02-17 23:34 ` Ilya Leoshkevich
2026-02-18 0:18 ` Alexei Starovoitov
2026-03-03 16:40 ` patchwork-bot+netdevbpf
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=20260217160813.100855-1-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.