diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-04-05 11:23:36 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-04-05 11:23:36 +0000 |
commit | 4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch) | |
tree | cddb50a81d7d1a628cc400519162080c6d87868e /kernel | |
parent | 36ea5120664550fae6d31f1c6f695e4f8975cb06 (diff) |
o Merge with Linux 2.1.91.
o First round of bugfixes for the SC/MC CPUs.
o FPU context switch fixes.
o Lazy context switches.
o Faster syscalls.
o Removed dead code.
o Shitloads of other things I forgot ...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kmod.c | 16 | ||||
-rw-r--r-- | kernel/sched.c | 25 | ||||
-rw-r--r-- | kernel/sysctl.c | 4 |
3 files changed, 26 insertions, 19 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index a0f58d485..379c27695 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -9,24 +9,22 @@ #include <linux/types.h> #include <linux/unistd.h> -static inline _syscall1(int,delete_module,const char *,name_user) - /* kmod_unload_delay and modprobe_path are set via /proc/sys. */ int kmod_unload_delay = 60; char modprobe_path[256] = "/sbin/modprobe"; -char module_name[64] = ""; -char * argv[] = { "modprobe", "-k", NULL, NULL, }; -char * envp[] = { "HOME=/", "TERM=linux", NULL, }; +static char module_name[64] = ""; +static char * argv[] = { "modprobe", "-k", module_name, NULL, }; +static char * envp[] = { "HOME=/", "TERM=linux", NULL, }; /* kmod_queue synchronizes the kmod thread and the rest of the system kmod_unload_timer is what we use to unload modules after kmod_unload_delay seconds */ -struct wait_queue * kmod_queue = NULL; -struct timer_list kmod_unload_timer; +static struct wait_queue * kmod_queue = NULL; +static struct timer_list kmod_unload_timer; /* kmod_thread is the thread that does most of the work. kmod_unload and @@ -74,7 +72,6 @@ int kmod_thread(void * data) Call modprobe with module_name. If execve returns, print out an error. */ - argv[2] = module_name; execve(modprobe_path, argv, envp); printk("kmod: failed to load module %s\n", module_name); @@ -136,7 +133,8 @@ int request_module(const char * name) the module into module_name. Once that is done, wake up kmod_thread. */ - strcpy(module_name, name); + strncpy(module_name, name, sizeof(module_name)); + module_name[sizeof(module_name)-1] = '\0'; wake_up(&kmod_queue); /* diff --git a/kernel/sched.c b/kernel/sched.c index a86cb0413..8d8576808 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -333,20 +333,27 @@ void add_timer(struct timer_list *timer) static inline int detach_timer(struct timer_list *timer) { - int ret = 0; - struct timer_list *next, *prev; - next = timer->next; - prev = timer->prev; - if (next) { - next->prev = prev; - } + struct timer_list *prev = timer->prev; if (prev) { - ret = 1; + struct timer_list *next = timer->next; prev->next = next; + if (next) + next->prev = prev; + return 1; } - return ret; + return 0; } +void mod_timer(struct timer_list *timer, unsigned long expires) +{ + unsigned long flags; + + spin_lock_irqsave(&timerlist_lock, flags); + timer->expires = expires; + detach_timer(timer); + internal_add_timer(timer); + spin_unlock_irqrestore(&timerlist_lock, flags); +} int del_timer(struct timer_list * timer) { diff --git a/kernel/sysctl.c b/kernel/sysctl.c index e6864541f..47bb36171 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -191,7 +191,7 @@ static ctl_table vm_table[] = { {VM_SWAPCTL, "swapctl", &swap_control, sizeof(swap_control_t), 0600, NULL, &proc_dointvec}, {VM_SWAPOUT, "swapout_interval", - &swapout_interval, sizeof(int), 0600, NULL, &proc_dointvec_jiffies}, + &swapout_interval, sizeof(int), 0600, NULL, &proc_dointvec}, {VM_FREEPG, "freepages", &freepages, sizeof(freepages_t), 0600, NULL, &proc_dointvec}, {VM_BDFLUSH, "bdflush", &bdf_prm, 9*sizeof(int), 0600, NULL, @@ -201,6 +201,8 @@ static ctl_table vm_table[] = { sizeof(sysctl_overcommit_memory), 0644, NULL, &proc_dointvec}, {VM_BUFFERMEM, "buffermem", &buffer_mem, sizeof(buffer_mem_t), 0600, NULL, &proc_dointvec}, + {VM_PAGECACHE, "pagecache", + &page_cache, sizeof(buffer_mem_t), 0600, NULL, &proc_dointvec}, {0} }; |