public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	cooloney@gmail.com, rpurdie@rpsys.net, j.anaszewski@samsung.com,
	linux-leds@vger.kernel.org
Subject: Re: CPU LED trigger: add hooks to generic code so that it works on x86
Date: Wed, 27 May 2015 09:47:57 +0200	[thread overview]
Message-ID: <20150527074757.GB1254@amd> (raw)
In-Reply-To: <20150527074343.GI19282@twins.programming.kicks-ass.net>

On Wed 2015-05-27 09:43:43, Peter Zijlstra wrote:
> On Wed, May 27, 2015 at 08:57:12AM +0200, Pavel Machek wrote:
> > 
> > CPU LED trigger hooks are currently hidden in arm-specific code, which
> > means that this trigger only works on arm. Add it to the generic
> > code, so that it works on x86, too.
> 
> And why do we want to go and slow down the idle loop for everyone?

If the trigger is not configured, this is not slowing down anyone.

If the trigger is configured, well, then the user requested the
functionality. So we are not slowing down _everyone_, just the people
that want the blinking.

								Pavel

include/linux/leds.h:

#ifdef CONFIG_LEDS_TRIGGER_CPU
extern void ledtrig_cpu(enum cpu_led_event evt);
#else
static inline void ledtrig_cpu(enum cpu_led_event evt)
{
	return;
	}
#endif
	

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2015-05-27  7:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27  6:57 CPU LED trigger: add hooks to generic code so that it works on x86 Pavel Machek
2015-05-27  7:43 ` Peter Zijlstra
2015-05-27  7:47   ` Pavel Machek [this message]
2015-05-27  8:08     ` Peter Zijlstra
2015-05-27  8:47       ` Pavel Machek
2015-05-27 12:17         ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150527074757.GB1254@amd \
    --to=pavel@ucw.cz \
    --cc=cooloney@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox