1 Mar 2011 01:27
[RFC PATCH] ARM: Use generic BUG() handler
Simon Glass <sjg <at> chromium.org>
2011-03-01 00:27:43 GMT
2011-03-01 00:27:43 GMT
I am looking for comments please on this patch. ARM uses its own BUG() handler which makes its output slightly different from other archtectures. One of the problems is that the ARM implementation doesn't report the function with the BUG() in it, but always reports the PC being in __bug(). The generic implementation doesn't have this problem. Currently we get something like: kernel BUG at fs/proc/breakme.c:35! Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... PC is at __bug+0x20/0x2c With this patch it displays: kernel BUG at fs/proc/breakme.c:35! Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ... PC is at write_breakme+0xd0/0x1b4 This implementation uses an undefined instruction to implement BUG, and sets up a bug table containing the relevant information. Also backtraces were reported slightly differently - so I have added a newline after the backtrace message, a space before the address, and ensured that the message appears even when CONFIG_ARM_UNWIND is defined. These are aimed at consistency between architectures, and may or may not be acceptable for ARM.(Continue reading)
RSS Feed