diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-07-31 14:29:58 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-08 16:07:26 +1000 |
commit | 62aadce2eeedb461c07f12ead92e6f8de97cedd0 (patch) | |
tree | 7c4d5a1c88a007f3f6927072688e7abf7f569565 /core/utils.c | |
parent | a93bf9ff8c90b2d2c6fbb5b15bfbc0215750c138 (diff) | |
download | skiboot-62aadce2eeedb461c07f12ead92e6f8de97cedd0.zip skiboot-62aadce2eeedb461c07f12ead92e6f8de97cedd0.tar.gz skiboot-62aadce2eeedb461c07f12ead92e6f8de97cedd0.tar.bz2 |
Use PR_EMERG priority in assert() codepath
Moving assert_fail() out of libc and into core/utils.c so that we can
sanely call prlog(PR_EMERG).
We shorten it from three fputs calls down to one prlog() call.
This may increase the number of cycles and stack usage for when we
hit an assert, which may not be desirable.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core/utils.c')
-rw-r--r-- | core/utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/utils.c b/core/utils.c index 11e9d85..71f3842 100644 --- a/core/utils.c +++ b/core/utils.c @@ -19,6 +19,12 @@ #include <fsp.h> #include <processor.h> +void assert_fail(const char *msg) +{ + prlog(PR_EMERG, "Assert fail: %s\n", msg); + abort(); +} + void abort(void) { static bool in_abort = false; |