lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] x86_64 UV: Use LED to indicate CPU is active
Hi!

> > +/*
> > + * Illuminate "activity" LED when CPU is going "active",
> > + * extinguish when going "idle".
> > + */
> > +static int uv_idle(struct notifier_block *nfb, unsigned long action, void *junk)
> > +{
> > + if (action == IDLE_START)
> > + uv_set_led_bits(0, LED_CPU_ACTIVITY);
> > +
> > + else if (action == IDLE_END)
> > + uv_set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
> > +
> > + return NOTIFY_OK;
> > +}
> > +
> > +static struct notifier_block uv_idle_notifier = {
> > + .notifier_call = uv_idle,
> > +};
> >
> > +/*
> > + * Initialize idle led callback function
> > + */
> > +static __init void uv_init_led_idle_display(void)
> > +{
> > + /* initialize timer for activity monitor */
> > + idle_notifier_register(&uv_idle_notifier);
> > +}
>
> hm, i think this is a bad idea. While putting it into the go-to-idle

Plus this really should not be uv-specific. We already have generic
triggers.

And you should really CC led maintainers!
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-08-13 11:59    [W:0.125 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site