diff options
author | TAMUKI Shoichi <tamuki@linet.gr.jp> | 2010-08-10 21:03:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-11 11:59:22 -0400 |
commit | c7ff0d9c92435e836e13aaa8d0e56d4000424bcc (patch) | |
tree | 96f56d15b5dd96c44fb183ce00152608df50dc5c /arch/arm/mach-s3c2440/mach-gta02.c | |
parent | bebf8cfaea1df1a104b993b995bb385e998a4dc8 (diff) |
panic: keep blinking in spite of long spin timer mode
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 the problem is the keyboard LEDs don't
blink at all on that situation.
This patch changes to call to panic_blink_enter() between every mdelay and
keeps blinking in spite of long spin timer mode.
The time to call to mdelay is now 100ms. Even this change will keep
panic_timeout accuracy enough when running under a hypervisor.
Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-gta02.c')
-rw-r--r-- | arch/arm/mach-s3c2440/mach-gta02.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 9e39faa283b9..deaabe86741d 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
@@ -90,24 +90,17 @@ | |||
90 | static struct pcf50633 *gta02_pcf; | 90 | static struct pcf50633 *gta02_pcf; |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * This gets called every 1ms when we paniced. | 93 | * This gets called frequently when we paniced. |
94 | */ | 94 | */ |
95 | 95 | ||
96 | static long gta02_panic_blink(long count) | 96 | static long gta02_panic_blink(int state) |
97 | { | 97 | { |
98 | long delay = 0; | 98 | long delay = 0; |
99 | static long last_blink; | 99 | char led; |
100 | static char led; | ||
101 | 100 | ||
102 | /* Fast blink: 200ms period. */ | 101 | led = (state) ? 1 : 0; |
103 | if (count - last_blink < 100) | ||
104 | return 0; | ||
105 | |||
106 | led ^= 1; | ||
107 | gpio_direction_output(GTA02_GPIO_AUX_LED, led); | 102 | gpio_direction_output(GTA02_GPIO_AUX_LED, led); |
108 | 103 | ||
109 | last_blink = count; | ||
110 | |||
111 | return delay; | 104 | return delay; |
112 | } | 105 | } |
113 | 106 | ||
@@ -556,7 +549,7 @@ static void gta02_poweroff(void) | |||
556 | 549 | ||
557 | static void __init gta02_machine_init(void) | 550 | static void __init gta02_machine_init(void) |
558 | { | 551 | { |
559 | /* Set the panic callback to make AUX LED blink at ~5Hz. */ | 552 | /* Set the panic callback to turn AUX LED on or off. */ |
560 | panic_blink = gta02_panic_blink; | 553 | panic_blink = gta02_panic_blink; |
561 | 554 | ||
562 | s3c_pm_init(); | 555 | s3c_pm_init(); |