Commit 5d35634e authored by Jiri Slaby's avatar Jiri Slaby Committed by Arnaldo Carvalho de Melo
Browse files

perf trace: Fix non-listed archs in the syscalltbl routines



This fixes a build breakage on 32-bit arm, where the
syscalltbl__id_at_idx() function was missing.

Committer notes:

Generating a proper syscall table from a copy of
arch/arm/tools/syscall.tbl ends up being too big a patch for this rc
stage, I started doing it but while testing noticed some other problems
with using BPF to collect pointer args on arm7 (32-bit) will maybe
continue trying to make it work on the next cycle...

Fixes: 7a2fb561 ("perf trace: Fix iteration of syscall ids in syscalltbl->entries")
Suggested-by: default avatarHoward Chu <howardchu95@gmail.com>
Signed-off-by: default avatar <jslaby@suse.cz>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/lkml/3a592835-a14f-40be-8961-c0cee7720a94@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7fbff3c0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -46,6 +46,11 @@ static const char *const *syscalltbl_native = syscalltbl_mips_n64;
#include <asm/syscalls.c>
const int syscalltbl_native_max_id = SYSCALLTBL_LOONGARCH_MAX_ID;
static const char *const *syscalltbl_native = syscalltbl_loongarch;
#else
const int syscalltbl_native_max_id = 0;
static const char *const syscalltbl_native[] = {
	[0] = "unknown",
};
#endif

struct syscall {
@@ -182,6 +187,11 @@ int syscalltbl__id(struct syscalltbl *tbl, const char *name)
	return audit_name_to_syscall(name, tbl->audit_machine);
}

int syscalltbl__id_at_idx(struct syscalltbl *tbl __maybe_unused, int idx)
{
	return idx;
}

int syscalltbl__strglobmatch_next(struct syscalltbl *tbl __maybe_unused,
				  const char *syscall_glob __maybe_unused, int *idx __maybe_unused)
{