]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 14 Jun 2017 03:01:25 +0000 (13:01 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 16 Jun 2017 06:10:37 +0000 (16:10 +1000)
commit5318aee0f15a98c38283e3dd5d281dbc49c3ebd7
tree1a1ad5f230c808cb910b998f0715338cc7dd8fc2
parent3fd573e213a91fc6ae536195e9d6f65b738de219
powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path

When trapped on WARN_ON(), report_bug() is expected to return
BUG_TRAP_TYPE_WARN so the caller will increment NIP by 4 and continue.
The __builtin_constant_p() path of the PPC's WARN_ON()
calls (indirectly) __WARN_FLAGS() which has BUGFLAG_WARNING set,
however the other branch does not which makes report_bug() report a
bug rather than a warning.

Fixes: cb3eded8effb ("debug: Avoid setting BUGFLAG_WARNING twice")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/bug.h