WSL2-Linux-Kernel/arch/powerpc
Gautham R. Shenoy 424f8acd32 powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop
Commit 09206b600c ("powernv: Pass PSSCR value and mask to
power9_idle_stop") added additional code in power_enter_stop() to
distinguish between stop requests whose PSSCR had ESL=EC=1 from those
which did not. When ESL=EC=1, we do a forward-jump to a location
labelled by "1", which had the code to handle the ESL=EC=1 case.

Unfortunately just a couple of instructions before this label, is the
macro IDLE_STATE_ENTER_SEQ() which also has a label "1" in its
expansion.

As a result, the current code can result in directly executing stop
instruction for deep stop requests with PSSCR ESL=EC=1, without saving
the hypervisor state.

Fix this BUG by labeling the location that handles ESL=EC=1 case with
a more descriptive label ".Lhandle_esl_ec_set" (local label suggestion
a la .Lxx from Anton Blanchard).

While at it, rename the label "2" labelling the location of the code
handling entry into deep stop states with ".Lhandle_deep_stop".

For a good measure, change the label in IDLE_STATE_ENTER_SEQ() macro
to an not-so commonly used value in order to avoid similar mishaps in
the future.

Fixes: 09206b600c ("powernv: Pass PSSCR value and mask to power9_idle_stop")
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-03-03 11:24:50 +11:00
..
boot powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
configs powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
crypto crypto: crc32c-vpmsum - Rename CRYPT_CRC32C_VPMSUM option 2016-11-28 21:23:17 +08:00
include powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop 2017-03-03 11:24:50 +11:00
kernel powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop 2017-03-03 11:24:50 +11:00
kvm mm: cma_alloc: allow to specify GFP mask 2017-02-24 17:46:55 -08:00
lib powerpc: emulate_step() tests for load/store instructions 2017-03-03 11:24:50 +11:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm powerpc/64: Invalidate process table caching after setting process table 2017-03-03 11:24:50 +11:00
net powerpc updates for 4.11 part 1. 2017-02-22 10:30:38 -08:00
oprofile ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
perf Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2017-02-18 21:37:14 +11:00
platforms powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
purgatory powerpc: Add purgatory for kexec_file_load() implementation. 2016-11-30 23:15:26 +11:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc/powernv: Properly set "host-ipi" on IPIs 2017-02-09 15:51:21 +11:00
xmon powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
Kconfig powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
Kconfig.debug powerpc/xmon: Enable disassembly files (compilation changes) 2017-02-15 20:02:42 +11:00
Makefile powerpc: Add purgatory for kexec_file_load() implementation. 2016-11-30 23:15:26 +11:00
relocs_check.sh powerpc/64: whitelist unresolved modversions CRCs 2016-09-22 14:46:31 +02:00