diff options
author | Yunhong Jiang <yunhong.jiang@intel.com> | 2015-08-04 12:17:53 -0700 |
---|---|---|
committer | Yunhong Jiang <yunhong.jiang@intel.com> | 2015-08-04 15:44:42 -0700 |
commit | 9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 (patch) | |
tree | 1c9cafbcd35f783a87880a10f85d1a060db1a563 /kernel/include/linux/sysrq.h | |
parent | 98260f3884f4a202f9ca5eabed40b1354c489b29 (diff) |
Add the rt linux 4.1.3-rt3 as base
Import the rt linux 4.1.3-rt3 as OPNFV kvm base.
It's from git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt and
the base is:
commit 0917f823c59692d751951bf5ea699a2d1e2f26a2
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Sat Jul 25 12:13:34 2015 +0200
Prepare v4.1.3-rt3
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
We lose all the git history this way and it's not good. We
should apply another opnfv project repo in future.
Change-Id: I87543d81c9df70d99c5001fbdf646b202c19f423
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Diffstat (limited to 'kernel/include/linux/sysrq.h')
-rw-r--r-- | kernel/include/linux/sysrq.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/kernel/include/linux/sysrq.h b/kernel/include/linux/sysrq.h new file mode 100644 index 000000000..387fa7d05 --- /dev/null +++ b/kernel/include/linux/sysrq.h @@ -0,0 +1,75 @@ +/* -*- linux-c -*- + * + * $Id: sysrq.h,v 1.3 1997/07/17 11:54:33 mj Exp $ + * + * Linux Magic System Request Key Hacks + * + * (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz> + * + * (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com> + * overhauled to use key registration + * based upon discusions in irc://irc.openprojects.net/#kernelnewbies + */ + +#ifndef _LINUX_SYSRQ_H +#define _LINUX_SYSRQ_H + +#include <linux/errno.h> +#include <linux/types.h> + +/* Possible values of bitmask for enabling sysrq functions */ +/* 0x0001 is reserved for enable everything */ +#define SYSRQ_ENABLE_LOG 0x0002 +#define SYSRQ_ENABLE_KEYBOARD 0x0004 +#define SYSRQ_ENABLE_DUMP 0x0008 +#define SYSRQ_ENABLE_SYNC 0x0010 +#define SYSRQ_ENABLE_REMOUNT 0x0020 +#define SYSRQ_ENABLE_SIGNAL 0x0040 +#define SYSRQ_ENABLE_BOOT 0x0080 +#define SYSRQ_ENABLE_RTNICE 0x0100 + +struct sysrq_key_op { + void (*handler)(int); + char *help_msg; + char *action_msg; + int enable_mask; +}; + +#ifdef CONFIG_MAGIC_SYSRQ + +/* Generic SysRq interface -- you may call it from any device driver, supplying + * ASCII code of the key, pointer to registers and kbd/tty structs (if they + * are available -- else NULL's). + */ + +void handle_sysrq(int key); +void __handle_sysrq(int key, bool check_mask); +int register_sysrq_key(int key, struct sysrq_key_op *op); +int unregister_sysrq_key(int key, struct sysrq_key_op *op); +struct sysrq_key_op *__sysrq_get_key_op(int key); + +int sysrq_toggle_support(int enable_mask); + +#else + +static inline void handle_sysrq(int key) +{ +} + +static inline void __handle_sysrq(int key, bool check_mask) +{ +} + +static inline int register_sysrq_key(int key, struct sysrq_key_op *op) +{ + return -EINVAL; +} + +static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op) +{ + return -EINVAL; +} + +#endif + +#endif /* _LINUX_SYSRQ_H */ |