diff options
author | Jes Sorensen <jes@sgi.com> | 2006-02-28 09:42:23 -0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-02-28 09:42:23 -0800 |
commit | d2b176ed878d4d5fcc0bd35656dfd373f3702af9 (patch) | |
tree | f5febd7d77fc374ddef9cbe549732bcb3b125c8b /kernel/sysctl.c | |
parent | c8c1635faa7c97329111ce32b927d37306521822 (diff) | |
download | linux-d2b176ed878d4d5fcc0bd35656dfd373f3702af9.tar.gz linux-d2b176ed878d4d5fcc0bd35656dfd373f3702af9.tar.bz2 linux-d2b176ed878d4d5fcc0bd35656dfd373f3702af9.zip |
[IA64] sysctl option to silence unaligned trap warnings
Allow sysadmin to disable all warnings about userland apps
making unaligned accesses by using:
# echo 1 > /proc/sys/kernel/ignore-unaligned-usertrap
Rather than having to use prctl on a process by process basis.
Default behaivour leaves the warnings enabled.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c05a2b7125e1..acf6c1550f27 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -124,6 +124,10 @@ extern int sysctl_hz_timer; extern int acct_parm[]; #endif +#ifdef CONFIG_IA64 +extern int no_unaligned_warning; +#endif + static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, ctl_table *, void **); static int proc_doutsstring(ctl_table *table, int write, struct file *filp, @@ -666,6 +670,16 @@ static ctl_table kern_table[] = { .proc_handler = &proc_dointvec, }, #endif +#ifdef CONFIG_IA64 + { + .ctl_name = KERN_IA64_UNALIGNED, + .procname = "ignore-unaligned-usertrap", + .data = &no_unaligned_warning, + .maxlen = sizeof (int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, +#endif { .ctl_name = 0 } }; |