提交 d89dc1bf 编写于 作者: A Alexey Kardashevskiy 提交者: Zheng Zengkai

powerpc/perf: Fix 32bit compile

stable inclusion
from stable-v5.10.114
commit 42e8ec3b4be8f8bb453301a10bc42098e3f24f55
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IY1V

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=42e8ec3b4be8f8bb453301a10bc42098e3f24f55

--------------------------------

[ Upstream commit bb82c574 ]

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: NAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220421025756.571995-1-aik@ozlabs.ruSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 5f507a3d
...@@ -5,11 +5,11 @@ ifdef CONFIG_COMPAT ...@@ -5,11 +5,11 @@ ifdef CONFIG_COMPAT
obj-$(CONFIG_PERF_EVENTS) += callchain_32.o obj-$(CONFIG_PERF_EVENTS) += callchain_32.o
endif endif
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 \ obj64-$(CONFIG_PPC_PERF_CTRS) += ppc970-pmu.o power5-pmu.o \
power5+-pmu.o power6-pmu.o power7-pmu.o \ power5+-pmu.o power6-pmu.o power7-pmu.o \
isa207-common.o power8-pmu.o power9-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 obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
obj-$(CONFIG_PPC_POWERNV) += imc-pmu.o obj-$(CONFIG_PPC_POWERNV) += imc-pmu.o
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册