resurrect CONFIG_PANIC_HANG option
Subsystems (2)
cover resurrect CONFIG_PANIC_HANG option
[PATCH 1/2] resurrect CONFIG_PANIC_HANG option
[PATCH 2/2] CONFIG_PANIC_HANG: replace #ifdef with IS_ENABLED()
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/2 resurrect CONFIG_PANIC_HANG option
The CONFIG_PANIC_HANG a part of the U-Boot heritage. It is used in the barebox code, but there is no mention of this option in Kconfig files.
Sometimes this option is very helpful, so
let's resurrect it.
Signed-off-by Antony Pavlov <[email protected]>
--- common/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+)
common/Kconfig +11 -0
@@ -256,6 +256,17 @@ config RELOCATABLE allowing it to relocate to the end of the available RAM. This way you have the whole memory in a single piece. +config PANIC_HANG + bool "hang the system in case of a fatal error" + help + This option enables stop of the system in case of a + fatal error, so that you have to reset it manually. + This is probably NOT a good idea for an embedded + system where you want the system to reboot + automatically as fast as possible, but it may be + useful during development since you can try to debug + the conditions that lead to the situation. + config PROMPT string prompt "barebox command prompt"
Signature · 7 lines
1.8.3.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 CONFIG_PANIC_HANG: replace #ifdef with IS_ENABLED()
In reply to Antony PavlovSigned-off-by Antony Pavlov <[email protected]>
--- lib/vsprintf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
lib/vsprintf.c +6 -6
@@ -630,11 +630,11 @@ void __noreturn panic(const char *fmt, ...)led_trigger (LED_TRIGGER_PANIC ,TRIGGER_ENABLE ); -#if defined (CONFIG_PANIC_HANG ) -hang (); -#else -udelay (100000 );/* allow messages to go out */ -reset_cpu (0 ); -#endif +if (IS_ENABLED (CONFIG_PANIC_HANG )) { +hang (); + }else { +udelay (100000 );/* allow messages to go out */ +reset_cpu (0 ); + } }EXPORT_SYMBOL (panic);
Signature · 7 lines
1.8.3.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 2 lines · Antony Pavlov
[PATCH 1/2] resurrect
CONFIG_PANIC_HANGoption
[PATCH 2/2]CONFIG_PANIC_HANG: replace #ifdef withIS_ENABLED()
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox