summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLikhitha Korrapati <likhitha@linux.ibm.com>2025-03-21 15:37:26 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:34 +0200
commitf1e30175f3581fa6b66ceb8cab33c9977b3e1600 (patch)
treefbf267635b5c9a649347c86312f0ba6b512d4d34 /tools
parent101cbee41be8e4cc05fb801f312e2c376db218f7 (diff)
downloadlinux-f1e30175f3581fa6b66ceb8cab33c9977b3e1600.tar.gz
linux-f1e30175f3581fa6b66ceb8cab33c9977b3e1600.tar.bz2
linux-f1e30175f3581fa6b66ceb8cab33c9977b3e1600.zip
perf tools: Fix is_compat_mode build break in ppc64
[ Upstream commit 7e442be7015af524d2b5fb84f0ff04a44501542b ] Commit 54f9aa1092457 ("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: 54f9aa1092457 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/arch/powerpc/util/header.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index c7df534dbf8f..0be74f048f96 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -14,8 +14,8 @@
static bool is_compat_mode(void)
{
- u64 base_platform = getauxval(AT_BASE_PLATFORM);
- u64 platform = getauxval(AT_PLATFORM);
+ unsigned long base_platform = getauxval(AT_BASE_PLATFORM);
+ unsigned long platform = getauxval(AT_PLATFORM);
if (!strcmp((char *)platform, (char *)base_platform))
return false;