16e277efbSYonghong Song // SPDX-License-Identifier: GPL-2.0 26e277efbSYonghong Song /* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */ 36e277efbSYonghong Song #include <vmlinux.h> 46e277efbSYonghong Song #include <bpf/bpf_helpers.h> 56e277efbSYonghong Song #include "../test_kmods/bpf_testmod_kfunc.h" 66e277efbSYonghong Song 7*90e43f1bSPuranjay Mohan #if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ 8*90e43f1bSPuranjay Mohan defined(__BPF_FEATURE_STACK_ARGUMENT) 96e277efbSYonghong Song 106e277efbSYonghong Song long subprog_call_mem_kfunc(long a, long b, long c, long d, long e, long size) 116e277efbSYonghong Song { 126e277efbSYonghong Song char buf[8] = {}; 136e277efbSYonghong Song 146e277efbSYonghong Song return bpf_kfunc_call_stack_arg_mem(a, b, c, d, e, buf, size); 156e277efbSYonghong Song } 166e277efbSYonghong Song 176e277efbSYonghong Song #else 186e277efbSYonghong Song 196e277efbSYonghong Song long subprog_call_mem_kfunc(void) 206e277efbSYonghong Song { 216e277efbSYonghong Song return 0; 226e277efbSYonghong Song } 236e277efbSYonghong Song 246e277efbSYonghong Song #endif 25