]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: warn on emulation of dcbz instruction in kernel mode
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 16 Sep 2021 14:52:09 +0000 (16:52 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 22 Oct 2021 04:22:05 +0000 (15:22 +1100)
commit490398ac321150adbc59eb001e9ca6b56d08b7d0
tree7a31ec893037699cd60378ea609b25a2af5bd6f5
parent3d291ff8e5c19a2d1eacb8e0d4cdc5f5dfecce71
powerpc: warn on emulation of dcbz instruction in kernel mode

dcbz instruction shouldn't be used on non-cached memory. Using
it on non-cached memory can result in alignment exception and
implies a heavy handling.

Instead of silentely emulating the instruction and resulting in high
performance degradation, warn whenever an alignment exception is
taken in kernel mode due to dcbz, so that the user is made aware that
dcbz instruction has been used unexpectedly by the kernel.

Reported-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/2e3acfe63d289c6fba366e16973c9ab8369e8b75.1631803922.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/align.c