
Dear Andreas,
In message 516D6F71.8090304@gmail.com you wrote:
You say (or at least I understand you so), that I have to hack all these places with some application specific stuff to inform the user of the device that we will stop processing now. Why don't we add an interface to easily change the behavior of hang application specific.
Because hang() is a trivial function that does just what the name says. If you don't want this, then don't use this. If you need additional functionality, then use a function that provides such.
Keep in mind that you don't have to define CONFIG_PANIC_HANG.
Thats true, but in some cases we just want to hang on panic.
Indeed. Normally this is the most useful thing to do.
Also, as done in arch/powerpc/lib/board.c we usually print an error message on the console device, and we can call bootstage_error(), which could initialte such actions.
Ahhh ... I got it. So this is the interface I want! All we need is bootstage_error() in all hang() variants and thats it.
As you have to touch all these places anyway, please rather move hang() out of all architecture specific code and place it in the global lib/.
Best regards,
Wolfgang Denk