Release 4.15 kernel/power/poweroff.c
/*
* poweroff.c - sysrq handler to gracefully power down machine.
*
* This file is released under the GPL v2
*/
#include <linux/kernel.h>
#include <linux/sysrq.h>
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/workqueue.h>
#include <linux/reboot.h>
#include <linux/cpumask.h>
/*
* When the user hits Sys-Rq o to power down the machine this is the
* callback we use.
*/
static void do_poweroff(struct work_struct *dummy)
{
kernel_power_off();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 11 | 78.57% | 1 | 33.33% |
David Howells | 2 | 14.29% | 1 | 33.33% |
Eric W. Biedermann | 1 | 7.14% | 1 | 33.33% |
Total | 14 | 100.00% | 3 | 100.00% |
static DECLARE_WORK(poweroff_work, do_poweroff);
static void handle_poweroff(int key)
{
/* run sysrq poweroff on boot cpu */
schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Patrick Mochel | 10 | 47.62% | 1 | 25.00% |
Rui Zhang | 5 | 23.81% | 1 | 25.00% |
Andrew Morton | 4 | 19.05% | 1 | 25.00% |
Rusty Russell | 2 | 9.52% | 1 | 25.00% |
Total | 21 | 100.00% | 4 | 100.00% |
static struct sysrq_key_op sysrq_poweroff_op = {
.handler = handle_poweroff,
.help_msg = "poweroff(o)",
.action_msg = "Power Off",
.enable_mask = SYSRQ_ENABLE_BOOT,
};
static int __init pm_sysrq_init(void)
{
register_sysrq_key('o', &sysrq_poweroff_op);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Patrick Mochel | 19 | 95.00% | 1 | 50.00% |
Jan Beulich | 1 | 5.00% | 1 | 50.00% |
Total | 20 | 100.00% | 2 | 100.00% |
subsys_initcall(pm_sysrq_init);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Patrick Mochel | 66 | 55.93% | 1 | 10.00% |
Andrew Morton | 27 | 22.88% | 1 | 10.00% |
Rui Zhang | 8 | 6.78% | 1 | 10.00% |
Jan Kara | 6 | 5.08% | 1 | 10.00% |
Eric W. Biedermann | 4 | 3.39% | 1 | 10.00% |
David Howells | 2 | 1.69% | 1 | 10.00% |
Rusty Russell | 2 | 1.69% | 1 | 10.00% |
Jan Beulich | 1 | 0.85% | 1 | 10.00% |
Olaf Hering | 1 | 0.85% | 1 | 10.00% |
Jovi Zhangwei | 1 | 0.85% | 1 | 10.00% |
Total | 118 | 100.00% | 10 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.