lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150527065712.GA4415@amd>
Date:	Wed, 27 May 2015 08:57:12 +0200
From:	Pavel Machek <pavel@....cz>
To:	mingo@...hat.com, peterz@...radead.org,
	linux-kernel@...r.kernel.org, cooloney@...il.com,
	rpurdie@...ys.net, j.anaszewski@...sung.com,
	linux-leds@...r.kernel.org
Subject: CPU LED trigger: add hooks to generic code so that it works on x86


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.

Signed-off-by: Pavel Machek <pavel@....cz>

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index fefcb1f..087acd6 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -8,6 +8,7 @@
 #include <linux/mm.h>
 #include <linux/stackprotector.h>
 #include <linux/suspend.h>
+#include <linux/leds.h>
 
 #include <asm/tlb.h>
 
@@ -232,6 +233,7 @@ static void cpu_idle_loop(void)
 			}
 
 			local_irq_disable();
+			ledtrig_cpu(CPU_LED_IDLE_START);
 			arch_cpu_idle_enter();
 
 			/*
@@ -249,6 +251,7 @@ static void cpu_idle_loop(void)
 				cpuidle_idle_call();
 
 			arch_cpu_idle_exit();
+			ledtrig_cpu(CPU_LED_IDLE_END);
 		}
 
 		/*

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ