diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
commit | c7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch) | |
tree | 3682407a599b8f9f03fc096298134cafba1c9b2f /kernel/sysctl.c | |
parent | 1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff) |
o Merge with Linux 2.1.116.
o New Newport console code.
o New G364 console code.
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 75 |
1 files changed, 54 insertions, 21 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 0865db07c..95db16576 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -51,9 +51,16 @@ extern int sg_big_buff; #ifdef __sparc__ extern char reboot_command []; #endif +#ifdef __powerpc__ +extern unsigned long htab_reclaim_on, zero_paged_on, powersave_nap; +#endif + +extern int pgt_cache_water[]; static int parse_table(int *, int, void *, size_t *, void *, size_t, ctl_table *, void **); +static int proc_doutsstring(ctl_table *table, int write, struct file *filp, + void *buffer, size_t *lenp); static ctl_table root_table[]; @@ -135,27 +142,15 @@ static ctl_table root_table[] = { static ctl_table kern_table[] = { {KERN_OSTYPE, "ostype", system_utsname.sysname, 64, - 0444, NULL, &proc_dostring, &sysctl_string}, + 0444, NULL, &proc_doutsstring, &sysctl_string}, {KERN_OSRELEASE, "osrelease", system_utsname.release, 64, - 0444, NULL, &proc_dostring, &sysctl_string}, + 0444, NULL, &proc_doutsstring, &sysctl_string}, {KERN_VERSION, "version", system_utsname.version, 64, - 0444, NULL, &proc_dostring, &sysctl_string}, + 0444, NULL, &proc_doutsstring, &sysctl_string}, {KERN_NODENAME, "hostname", system_utsname.nodename, 64, - 0644, NULL, &proc_dostring, &sysctl_string}, + 0644, NULL, &proc_doutsstring, &sysctl_string}, {KERN_DOMAINNAME, "domainname", system_utsname.domainname, 64, - 0644, NULL, &proc_dostring, &sysctl_string}, - {KERN_NRINODE, "inode-nr", &inodes_stat, 2*sizeof(int), - 0444, NULL, &proc_dointvec}, - {KERN_STATINODE, "inode-state", &inodes_stat, 7*sizeof(int), - 0444, NULL, &proc_dointvec}, - {KERN_MAXINODE, "inode-max", &max_inodes, sizeof(int), - 0644, NULL, &proc_dointvec}, - {KERN_NRFILE, "file-nr", &nr_files, 3*sizeof(int), - 0444, NULL, &proc_dointvec}, - {KERN_MAXFILE, "file-max", &max_files, sizeof(int), - 0644, NULL, &proc_dointvec}, - {KERN_DENTRY, "dentry-state", &dentry_stat, 6*sizeof(int), - 0444, NULL, &proc_dointvec}, + 0644, NULL, &proc_doutsstring, &sysctl_string}, {KERN_PANIC, "panic", &panic_timeout, sizeof(int), 0644, NULL, &proc_dointvec}, #ifdef CONFIG_BLK_DEV_INITRD @@ -172,6 +167,14 @@ static ctl_table kern_table[] = { {KERN_SPARC_REBOOT, "reboot-cmd", reboot_command, 256, 0644, NULL, &proc_dostring, &sysctl_string }, #endif +#ifdef __powerpc__ + {KERN_PPC_HTABRECLAIM, "htab-reclaim", &htab_reclaim_on, sizeof(int), + 0644, NULL, &proc_dointvec}, + {KERN_PPC_ZEROPAGED, "zero-paged", &zero_paged_on, sizeof(int), + 0644, NULL, &proc_dointvec}, + {KERN_PPC_POWERSAVE_NAP, "powersave-nap", &powersave_nap, sizeof(int), + 0644, NULL, &proc_dointvec}, +#endif {KERN_CTLALTDEL, "ctrl-alt-del", &C_A_D, sizeof(int), 0644, NULL, &proc_dointvec}, {KERN_PRINTK, "printk", &console_loglevel, 4*sizeof(int), @@ -181,7 +184,7 @@ static ctl_table kern_table[] = { 0644, NULL, &proc_dostring, &sysctl_string }, #endif #ifdef CONFIG_CHR_DEV_SG - {KERN_NRFILE, "sg-big-buff", &sg_big_buff, sizeof (int), + {KERN_SG_BIG_BUFF, "sg-big-buff", &sg_big_buff, sizeof (int), 0444, NULL, &proc_dointvec}, #endif {0} @@ -205,6 +208,8 @@ static ctl_table vm_table[] = { &page_cache, sizeof(buffer_mem_t), 0644, NULL, &proc_dointvec}, {VM_PAGERDAEMON, "kswapd", &pager_daemon, sizeof(pager_daemon_t), 0644, NULL, &proc_dointvec}, + {VM_PGT_CACHE, "pagetable_cache", + &pgt_cache_water, 2*sizeof(int), 0600, NULL, &proc_dointvec}, {0} }; @@ -213,6 +218,22 @@ static ctl_table proc_table[] = { }; static ctl_table fs_table[] = { + {FS_NRINODE, "inode-nr", &inodes_stat, 2*sizeof(int), + 0444, NULL, &proc_dointvec}, + {FS_STATINODE, "inode-state", &inodes_stat, 7*sizeof(int), + 0444, NULL, &proc_dointvec}, + {FS_MAXINODE, "inode-max", &max_inodes, sizeof(int), + 0644, NULL, &proc_dointvec}, + {FS_NRFILE, "file-nr", &nr_files, 3*sizeof(int), + 0444, NULL, &proc_dointvec}, + {FS_MAXFILE, "file-max", &max_files, sizeof(int), + 0644, NULL, &proc_dointvec}, + {FS_NRDQUOT, "dquot-nr", &nr_dquots, 2*sizeof(int), + 0444, NULL, &proc_dointvec}, + {FS_MAXDQUOT, "dquot-max", &max_dquots, sizeof(int), + 0644, NULL, &proc_dointvec}, + {FS_DENTRY, "dentry-state", &dentry_stat, 6*sizeof(int), + 0444, NULL, &proc_dointvec}, {0} }; @@ -616,6 +637,21 @@ int proc_dostring(ctl_table *table, int write, struct file *filp, return 0; } +/* + * Special case of dostring for the UTS structure. This has locks + * to observe. Should this be in kernel/sys.c ???? + */ + +static int proc_doutsstring(ctl_table *table, int write, struct file *filp, + void *buffer, size_t *lenp) +{ + int r; + down(&uts_sem); + r=proc_dostring(table,write,filp,buffer,lenp); + up(&uts_sem); + return r; +} + static int do_proc_dointvec(ctl_table *table, int write, struct file *filp, void *buffer, size_t *lenp, int conv) { @@ -892,9 +928,6 @@ int sysctl_string(ctl_table *table, int *name, int nlen, if (len == table->maxlen) len--; ((char *) table->data)[len] = 0; -#ifdef CONFIG_TRANS_NAMES - translations_dirty = 1; -#endif } return 0; } |