Re: blink driver power saving
- From: Bernhard Walle <bwalle@xxxxxxx>
- Date: Mon, 2 Jul 2007 14:56:18 +0200
* Andi Kleen <ak@xxxxxxx> [2007-07-02 14:39]:
Another option would be for it not use panic_blink. Do your kexec
kernels have atkbd support enabled? You could write an new "blink"
input handler that would latch to keyboards supporting leds and blink
by sending EV_LED events.
Yes that would be probably a better implementation. Also hook something
for USB keyboards. iirc Bernhard Walle (cc'ed) was looking at that.
The problem is that most distributions use USB as module (in initrd,
or later). If you're able to load modules, you're also able to run a
userspace programs that blinks. That's the way I implemented it in
SUSE now. In my tests it takes about < 5 seconds from the sysrq-c to
the time the first blink. That's ok IMO.
And if a person compiles his kernel manually, he doesn't need keyboard
LED blinking for kdump because he can look at the HDD LED to see what
happens (or serial console). ... :)
I don't know if it's worth to apply a patch that uses the keyboard
interface in the kernel, because there are several small changes
necessary (see patch, that's what my thought was).
Thanks,
Bernhard
---
drivers/char/keyboard.c | 7 +++++++
include/linux/keyboard.h | 7 +++++++
2 files changed, 14 insertions(+)
Index: linux-2.6.21.1/drivers/char/keyboard.c
===================================================================
--- linux-2.6.21.1.orig/drivers/char/keyboard.c
+++ linux-2.6.21.1/drivers/char/keyboard.c
@@ -956,6 +956,13 @@ void setledstate(struct kbd_struct *kbd,
set_leds();
}
+void setledstate_fgconsole(unsigned int led)
+{
+ struct kbd_struct *kbd = kbd_table + fg_console;
+ setledstate(kbd, led);
+}
+EXPORT_SYMBOL_GPL(setledstate_fgconsole);
+
static inline unsigned char getleds(void)
{
struct kbd_struct *kbd = kbd_table + fg_console;
Index: linux-2.6.21.1/include/linux/keyboard.h
===================================================================
--- linux-2.6.21.1.orig/include/linux/keyboard.h
+++ linux-2.6.21.1/include/linux/keyboard.h
@@ -441,4 +441,11 @@ extern unsigned short plain_map[NR_KEYS]
#define NR_BRL 9
#define MAX_DIACR 256
+
+
+
+#ifdef __KERNEL__
+void setledstate_fgconsole(unsigned int led);
+#endif
+
#endif
- References:
- Re: blink driver power saving
- From: Indan Zupancic
- Re: blink driver power saving
- From: Andi Kleen
- Re: blink driver power saving
- From: Dmitry Torokhov
- Re: blink driver power saving
- From: Andi Kleen
- Re: blink driver power saving
- Prev by Date: Porting Linux Kernel To New Type Of CPU and Hardware
- Next by Date: Re: [patch] CFS scheduler, -v18
- Previous by thread: Re: blink driver power saving
- Next by thread: Re: blink driver power saving
- Index(es):
Relevant Pages
|
Loading