linux/arch/powerpc
Breno Leitao ae3575e241 powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
commit 897bc3df8c upstream.

Commit e1c3743e1a ("powerpc/tm: Set MSR[TS] just prior to recheckpoint")
moved a code block around and this block uses a 'msr' variable outside of
the CONFIG_PPC_TRANSACTIONAL_MEM, however the 'msr' variable is declared
inside a CONFIG_PPC_TRANSACTIONAL_MEM block, causing a possible error when
CONFIG_PPC_TRANSACTION_MEM is not defined.

	error: 'msr' undeclared (first use in this function)

This is not causing a compilation error in the mainline kernel, because
'msr' is being used as an argument of MSR_TM_ACTIVE(), which is defined as
the following when CONFIG_PPC_TRANSACTIONAL_MEM is *not* set:

	#define MSR_TM_ACTIVE(x) 0

This patch just fixes this issue avoiding the 'msr' variable usage outside
the CONFIG_PPC_TRANSACTIONAL_MEM block, avoiding trusting in the
MSR_TM_ACTIVE() definition.

Reported-by: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Fixes: e1c3743e1a ("powerpc/tm: Set MSR[TS] just prior to recheckpoint")
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-04-04 16:14:03 +01:00
..
boot powerpc: Fix COFF zImage booting on old powermacs 2019-02-11 17:54:13 +00:00
configs powerpc/configs: Don't enable PPC_EARLY_DEBUG in defconfigs 2019-04-04 16:14:01 +01:00
crypto crypto: add missing crypto module aliases 2015-02-04 10:57:50 +00:00
include powerpc/fadump: handle crash memory ranges array index overflow 2018-12-16 22:08:41 +00:00
kernel powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM 2019-04-04 16:14:03 +01:00
kvm KVM: Protect device ops->create and list_add with kvm->lock 2019-03-25 17:32:35 +00:00
lib powerpc/lib: Fix the feature fixup tests to actually work 2018-11-20 18:04:53 +00:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/pseries: Fix unitialized timer reset on migration 2018-12-16 22:09:25 +00:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-25 10:44:05 +00:00
oprofile cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE} 2014-03-19 14:10:24 +01:00
perf powerpc/perf: Dereference BHRB entries safely 2018-03-03 15:51:58 +00:00
platforms powerpc/pseries: Fix how we iterate over the DTL entries 2019-02-11 17:53:26 +00:00
sysdev powerpc: Fix size calculation using resource_size() 2018-12-16 22:08:41 +00:00
xmon powerpc/xmon: Fix another endiannes issue in RTAS call from xmon 2015-02-04 10:58:05 +00:00
Kconfig powerpc/bpf/jit: Disable classic BPF JIT on ppc64le 2016-08-22 22:38:18 +01:00
Kconfig.debug powerpc/powernv: Remove OPAL v1 takeover 2014-06-25 13:10:47 +10:00
Makefile powerpc/e500mc: Set assembler machine type to e500mc 2018-11-20 18:05:17 +00:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00