]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix oops due to bad access of lppaca on bare metal
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Mon, 2 Apr 2018 07:33:37 +0000 (13:03 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 3 Apr 2018 11:50:07 +0000 (21:50 +1000)
commit7aad0826bce230e89c357b654b3e64710bff9669
treedd37b085b94c193e288bdc4a1e223dbcc71b6ee7
parent66bc9ee9ab97bb7e0a2c5f86729a7b28f1c472ba
powerpc: Fix oops due to bad access of lppaca on bare metal

Commit 6bbfd536ce80 ("powerpc/64s: Do not allocate lppaca if we are
not virtualized") removed allocation of lppaca on bare metal
platforms. But with CONFIG_PPC_SPLPAR enabled, we still access the
lppaca on bare metal in some code paths.

Fix this but adding runtime checks for SPLPAR (shared processor LPAR).

Fixes: 6bbfd536ce80 ("powerpc/64s: Do not allocate lppaca if we are not virtualized")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/lppaca.h
arch/powerpc/include/asm/spinlock.h
arch/powerpc/kernel/time.c