linux/tools/perf/arch/powerpc
Likhitha Korrapati 7e442be701 perf tools: Fix is_compat_mode build break in ppc64
Commit 54f9aa1092 ("tools/perf/powerpc/util: Add support to
handle compatible mode PVR for perf json events") introduced
to select proper JSON events in case of compat mode using
auxiliary vector. But this caused a compilation error in ppc64
Big Endian.

arch/powerpc/util/header.c: In function 'is_compat_mode':
arch/powerpc/util/header.c:20:21: error: cast to pointer from
integer of different size [-Werror=int-to-pointer-cast]
   20 |         if (!strcmp((char *)platform, (char *)base_platform))
      |                     ^
arch/powerpc/util/header.c:20:39: error: cast to pointer from
integer of different size [-Werror=int-to-pointer-cast]
   20 |         if (!strcmp((char *)platform, (char *)base_platform))
      |

Commit saved the getauxval(AT_BASE_PLATFORM) and getauxval(AT_PLATFORM)
return values in u64 which causes the compilation error.

Patch fixes this issue by changing u64 to "unsigned long".

Fixes: 54f9aa1092 ("tools/perf/powerpc/util: Add support to handle compatible mode PVR for perf json events")
Signed-off-by: Likhitha Korrapati <likhitha@linux.ibm.com>
Reviewed-by: Athira Rajeev <atrajeev@linux.ibm.com>
Link: https://lore.kernel.org/r/20250321100726.699956-1-likhitha@linux.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
History 2025-03-23 23:14:19 -07:00
..
annotate perf disasm: Add e_machine/e_flags to struct arch 2024-11-09 08:39:13 -08:00
entry/syscalls perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
include perf syscalltbl: Remove syscall_table.h 2025-03-20 22:57:35 -07:00
tests perf tools: Fix compile error on sample->user_regs 2025-02-14 12:33:41 -08:00
util perf tools: Fix is_compat_mode build break in ppc64 2025-03-23 23:14:19 -07:00
Build perf util: Make util its own library 2024-06-26 11:07:42 -07:00
Makefile perf tools powerpc: Use generic syscall table scripts 2025-01-10 10:57:01 -03:00