trace: Fix build for Linux v6.10

In Linux v6.10, the __assign_str() macro was updated to remove the 2nd
argument. Add a test to the conftest script to detect this and update
the various trace header files as necessary.

Bug 4593750

Change-Id: I495e78658249baa84cca5b864f4e172c1f3f0838
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152310
(cherry picked from commit 083d7038d1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170281
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2024-06-06 11:39:48 +01:00
committed by mobile promotions
parent d99dede530
commit 537492a880
6 changed files with 94 additions and 10 deletions

View File

@@ -6451,6 +6451,37 @@ compile_test() {
compile_check_conftest "$CODE" "NV_CRYPTO_PRESENT" "" "symbols"
;;
__assign_str_has_no_src_arg)
#
echo "
#define TRACE_INCLUDE_FILE conftest$$
#define TRACE_INCLUDE_PATH ${PWD}
#include <linux/types.h>
#include <linux/tracepoint.h>
TRACE_EVENT(conftest,
TP_PROTO(const char *test),
TP_ARGS(test),
TP_STRUCT__entry(
__string(test, test)
),
TP_fast_assign(
__assign_str(test);
),
TP_printk(\"test=%s\", __get_str(test))
);
#include <trace/define_trace.h>" > conftest$$.h
CODE="
#define CREATE_TRACE_POINTS
#include \"conftest$$.h\"
"
compile_check_conftest "$CODE" "NV___ASSIGN_STR_HAS_NO_SRC_ARG" "" "types"
rm conftest$$.h
;;
__alloc_disk_node_has_lkclass_arg)
#
# Determine if the function __alloc_disk_node() has an 'lkclass'