linux/arch/powerpc
Nicholas Piggin a57ac41183 powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits
Presently the dt_cpu_ftrs restore_cpu will only add bits to the LPCR
for secondaries, but some bits must be removed (e.g., UPRT for HPT).
Not clearing these bits on secondaries causes checkstops when booting
with disable_radix.

restore_cpu can not just set LPCR, because it is also called by the
idle wakeup code which relies on opal_slw_set_reg to restore the value
of LPCR, at least on P8 which does not save LPCR to stack in the idle
code.

Fix this by including a mask of bits to clear from LPCR as well, which
is used by restore_cpu.

This is a little messy now, but it's a minimal fix that can be
backported.  Longer term, the idle SPR save/restore code can be
reworked to completely avoid calls to restore_cpu, then restore_cpu
would be able to unconditionally set LPCR to match boot processor
environment.

Fixes: 5a61ef74f2 ("powerpc/64s: Support new device tree binding for discovering CPU features")
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-04-05 16:10:36 +10:00
..
boot powerpc/boot: Remove duplicate typedefs from libfdt_env.h 2018-04-01 00:47:47 +11:00
configs powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
crypto crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
include powerpc: io.h: move iomap.h include so that it can use readq/writeq defs 2018-04-05 14:58:52 +10:00
kernel powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits 2018-04-05 16:10:36 +10:00
kvm KVM: PPC: Book3S HV: Fix ppc_breakpoint_available compile error 2018-04-03 21:50:07 +10:00
lib powerpc/64s: Set assembler machine type to POWER4 2018-04-01 00:47:49 +11:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/mm/radix: Parse disable_radix commandline correctly. 2018-04-04 16:59:36 +10:00
net powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access 2018-02-22 14:36:08 +11:00
oprofile powerpc: Use sizeof(*foo) rather than sizeof(struct foo) 2018-03-20 16:47:53 +11:00
perf powerpc/64s: Remove POWER4 support 2018-04-01 00:47:50 +11:00
platforms powerpc/powernv: Always stop secondaries before reboot/shutdown 2018-04-03 22:59:57 +10:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xmon Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
Kconfig Merge branch 'linus' into sched/urgent, to resolve conflicts 2018-02-06 21:12:31 +01:00
Kconfig.debug powerpc: Add new kconfig CONFIG_PPC_IRQ_SOFT_MASK_DEBUG 2018-01-19 22:37:03 +11:00
Makefile powerpc/64s: Add POWER9 CPU type selection 2018-04-01 22:15:32 +10:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00