Messages in this thread | | | Date | Wed, 2 Jun 2010 11:34:46 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] panic: keep blinking in spite of long spin timer mode |
| |
On Fri, 28 May 2010 06:56:45 +0900 TAMUKI Shoichi <tamuki@linet.gr.jp> wrote:
> To keep panic_timeout accuracy when running under a hypervisor, the > current implementation only spins on long time (1 second) calls to > mdelay. That brings a good effect, but we must give up blinking even > if we have a panic_blink. > > This patch keeps blinking in spite of long spin timer mode. > > We now have new kernel parameter (panic_longspin) to enable long spin > timer mode when kernel panics. This is to be used when running under > a hypervisor (default is disable).
The whole panic-blink setup seems rather poorly thought out.
Would it not be better if a call to (*panic_blink)() were to simply set the state of the LED and then return? So callers can do
int state = 0;
for ( ; ; ) { (*panic_blink)(state); state ^= 1; mdelay(MSEC_PER_SEC); }
?
| |