diff mbox series

[kernel] powerpc/perf: Fix 32bit compile

Message ID 20220421025756.571995-1-aik@ozlabs.ru (mailing list archive)
State Accepted
Headers show
Series [kernel] powerpc/perf: Fix 32bit compile | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 7 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.

Commit Message

Alexey Kardashevskiy April 21, 2022, 2:57 a.m. UTC
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>
---
 arch/powerpc/perf/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Ellerman April 24, 2022, 12:15 p.m. UTC | #1
On Thu, 21 Apr 2022 12:57:56 +1000, Alexey Kardashevskiy wrote:
> 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.
> 
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc/perf: Fix 32bit compile
      https://git.kernel.org/powerpc/c/bb82c574691daf8f7fa9a160264d15c5804cb769

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile
index 2f46e31c7612..4f53d0b97539 100644
--- a/arch/powerpc/perf/Makefile
+++ b/arch/powerpc/perf/Makefile
@@ -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