powerpc/perf: Fix 32bit compile
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Thu, 21 Apr 2022 02:57:56 +0000 (12:57 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 21 Apr 2022 13:26:47 +0000 (23:26 +1000)
The "read_bhrb" global symbol is only called under CONFIG_PPC64 of
arch/powerpc/perf/core-book3s.c but it is compiled for both 32 and 64 bit
anyway (and LLVM fails to link this on 32bit).

This fixes it by moving bhrb.o to obj64 targets.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220421025756.571995-1-aik@ozlabs.ru
arch/powerpc/perf/Makefile

index 2f46e31c76129799eb13378b31498ae76cbe5611..4f53d0b97539bb6cd31fadfbc5eab06a8054ffc8 100644 (file)
@@ -3,11 +3,11 @@
 obj-y                          += callchain.o callchain_$(BITS).o perf_regs.o
 obj-$(CONFIG_COMPAT)           += callchain_32.o
 
-obj-$(CONFIG_PPC_PERF_CTRS)    += core-book3s.o bhrb.o
+obj-$(CONFIG_PPC_PERF_CTRS)    += core-book3s.o
 obj64-$(CONFIG_PPC_PERF_CTRS)  += ppc970-pmu.o power5-pmu.o \
                                   power5+-pmu.o power6-pmu.o power7-pmu.o \
                                   isa207-common.o power8-pmu.o power9-pmu.o \
-                                  generic-compat-pmu.o power10-pmu.o
+                                  generic-compat-pmu.o power10-pmu.o bhrb.o
 obj32-$(CONFIG_PPC_PERF_CTRS)  += mpc7450-pmu.o
 
 obj-$(CONFIG_PPC_POWERNV)      += imc-pmu.o