]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7322/1: Print BUG instead of undefined instruction on BUG_ON()
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 7 Feb 2012 18:42:33 +0000 (19:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Feb 2012 16:25:37 +0000 (16:25 +0000)
commit741e9ad5ee18eeb1cf05e2cca8dad890df72021e
tree8ab19a3fe66c67f20174ecf8732e9c09607b46f1
parent6b4e2e322b2233b33ad3ea8d14038efa3d30dbf5
ARM: 7322/1: Print BUG instead of undefined instruction on BUG_ON()

The ARM kernel uses undefined instructions to implement
BUG/BUG_ON(). This leads to problems where people don't read one
line above the Oops message and see the "kernel BUG at ..."
message and so they wrongly assume the kernel has hit an
undefined instruction.

Instead of printing:

 Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP

print

 Internal error: Oops - BUG: 0 [#1] PREEMPT SMP

This should prevent people from thinking the BUG_ON was an
undefined instruction when it was actually intentional.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/traps.c