powerpc: Don't allow the use of EMIT_BUG_ENTRY with BUGFLAG_WARNING
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Sun, 13 Feb 2022 09:02:41 +0000 (10:02 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 Feb 2022 02:06:43 +0000 (13:06 +1100)
commit38a1756861b8fc2ea9afb93e231194c642a4e261
tree4dc51b17280af054efc3d939b5075682551ae509
parent5a72345e6a78120368fcc841b570331b6c5a50da
powerpc: Don't allow the use of EMIT_BUG_ENTRY with BUGFLAG_WARNING

Warnings in assembly must use EMIT_WARN_ENTRY in order to generate
the necessary entry in exception table.

Check in EMIT_BUG_ENTRY that flags don't include BUGFLAG_WARNING.

This change avoids problems like the one fixed by
commit fd1eaaaaa686 ("powerpc/64s: Use EMIT_WARN_ENTRY for SRR debug
warnings").

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ddcb422102a37eb45f57694c7ef0ec6187964dff.1644742951.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/bug.h