summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/perf/callchain.c
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2020-03-20 11:20:16 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-04-03 00:10:00 +1100
commit0a7601b6ffddec11d7cc0bc3264daf0159f5e1a6 (patch)
tree52797f64ba38524d73d1c66c1379e5a922a68065 /arch/powerpc/perf/callchain.c
parent2910428106ebf23a9a2176cb751749edb2ce57e2 (diff)
downloadlinux-0a7601b6ffddec11d7cc0bc3264daf0159f5e1a6.tar.gz
linux-0a7601b6ffddec11d7cc0bc3264daf0159f5e1a6.tar.bz2
linux-0a7601b6ffddec11d7cc0bc3264daf0159f5e1a6.zip
powerpc/64: make buildable without CONFIG_COMPAT
There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/e5619617020ef3a1f54f0c076e7d74cb9ec9f3bf.1584699455.git.msuchanek@suse.de
Diffstat (limited to 'arch/powerpc/perf/callchain.c')
-rw-r--r--arch/powerpc/perf/callchain.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index 001d0473a61f..b5afd0bec4f8 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -15,7 +15,7 @@
#include <asm/sigcontext.h>
#include <asm/ucontext.h>
#include <asm/vdso.h>
-#ifdef CONFIG_PPC64
+#ifdef CONFIG_COMPAT
#include "../kernel/ppc32.h"
#endif
#include <asm/pte-walk.h>
@@ -284,6 +284,7 @@ static inline void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry
#endif /* CONFIG_PPC64 */
+#if defined(CONFIG_PPC32) || defined(CONFIG_COMPAT)
/*
* On 32-bit we just access the address and let hash_page create a
* HPTE if necessary, so there is no need to fall back to reading
@@ -447,6 +448,11 @@ static void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
sp = next_sp;
}
}
+#else /* 32bit */
+static void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
+ struct pt_regs *regs)
+{}
+#endif /* 32bit */
void
perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)