exe_ctx test fails on s390, because get_preempt_count() is not
implemented and its fallback path always returns 0. Implement it
using the new bpf_get_lowcore() kfunc.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20260217160813.100855-3-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
return bpf_get_current_task_btf()->thread_info.preempt.count;
#elif defined(bpf_target_powerpc)
return bpf_get_current_task_btf()->thread_info.preempt_count;
+#elif defined(bpf_target_s390)
+ return bpf_get_lowcore()->preempt_count;
#endif
return 0;
}
* * x86
* * arm64
* * powerpc64
+ * * s390x
*/
static inline int bpf_in_interrupt(void)
{
* * x86
* * arm64
* * powerpc64
+ * * s390x
*/
static inline int bpf_in_nmi(void)
{
* * x86
* * arm64
* * powerpc64
+ * * s390x
*/
static inline int bpf_in_hardirq(void)
{
* * x86
* * arm64
* * powerpc64
+ * * s390x
*/
static inline int bpf_in_serving_softirq(void)
{
* * x86
* * arm64
* * powerpc64
+ * * s390x
*/
static inline int bpf_in_task(void)
{