[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <38f35b60-df8b-48a0-a59a-560bed340a6e@amd.com>
Date: Wed, 30 Apr 2025 12:06:20 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Joe Mario <jmario@...hat.com>,
Stephane Eranian <eranian@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Santosh Shukla <santosh.shukla@....com>,
Ananth Narayan <ananth.narayan@....com>, Sandipan Das
<sandipan.das@....com>, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH v4 4/4] perf test amd ibs: Add sample period unit test
> Another issue when building with clang on musl:
>
> arch/x86/tests/amd-ibs-period.c:81:3: error: no matching function for call to 'memcpy'
> memcpy(func, insn1, sizeof(insn1));
> ^~~~~~
> /usr/include/string.h:27:7: note: candidate function not viable: no known conversion from 'int (*)(void)' to 'void *' for 1st argument
> void *memcpy (void *__restrict, const void *__restrict, size_t);
> ^
> /usr/include/fortify/string.h:40:27: note: candidate function not viable: no known conversion from 'int (*)(void)' to 'void *const' for 1st argument
> _FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od,
> ^
> arch/x86/tests/amd-ibs-period.c:87:3: error: no matching function for call to 'memcpy'
> memcpy(func, insn2, sizeof(insn2));
> ^~~~~~
> /usr/include/string.h:27:7: note: candidate function not viable: no known conversion from 'int (*)(void)' to 'void *' for 1st argument
> void *memcpy (void *__restrict, const void *__restrict, size_t);
> ^
> /usr/include/fortify/string.h:40:27: note: candidate function not viable: no known conversion from 'int (*)(void)' to 'void *const' for 1st argument
> _FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od,
> ^
> 2 errors generated.
> CC /tmp/build/perf/ui/browsers/header.o
> CC /tmp/build/perf/arch/x86/util/mem-events.o
>
> Adding the patch below cures it, still need to test on a Zen 5 system.
Thanks for the fix. Looks good.
Ravi
Powered by blists - more mailing lists