summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-08 18:54:49 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-08 18:54:49 +0000
commit5514f4babeeb3af00ee0c325e3cda7a562cc3d65 (patch)
treeedd733879cab73e41324a99ca5da7bc154c4196d /kernel
parent6a9366db547e958e8c9bf8e1c13bcea6cb2bf393 (diff)
Merge with Linux 2.4.0-test6-pre4.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c13
-rw-r--r--kernel/kmod.c1
-rw-r--r--kernel/ksyms.c3
-rw-r--r--kernel/sched.c2
-rw-r--r--kernel/softirq.c15
-rw-r--r--kernel/user.c1
6 files changed, 23 insertions, 12 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 993ba31f3..3e95fe878 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -26,17 +26,20 @@ void release(struct task_struct * p)
{
if (p != current) {
#ifdef CONFIG_SMP
- int has_cpu;
-
/*
* Wait to make sure the process isn't on the
* runqueue (active on some other CPU still)
*/
- do {
+ for (;;) {
spin_lock_irq(&runqueue_lock);
- has_cpu = p->has_cpu;
+ if (!p->has_cpu)
+ break;
spin_unlock_irq(&runqueue_lock);
- } while (has_cpu);
+ do {
+ barrier();
+ } while (p->has_cpu);
+ }
+ spin_unlock_irq(&runqueue_lock);
#endif
atomic_dec(&p->user->processes);
free_uid(p->user);
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 8fc459453..348210c3b 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -112,6 +112,7 @@ int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
struct user_struct *user = current->user;
current->user = INIT_USER;
atomic_inc(&current->user->__count);
+ atomic_dec(&user->processes);
free_uid(user);
}
diff --git a/kernel/ksyms.c b/kernel/ksyms.c
index 241855d8e..bcc6d2e31 100644
--- a/kernel/ksyms.c
+++ b/kernel/ksyms.c
@@ -353,6 +353,9 @@ EXPORT_SYMBOL(add_timer);
EXPORT_SYMBOL(del_timer);
EXPORT_SYMBOL(request_irq);
EXPORT_SYMBOL(free_irq);
+#if !defined(CONFIG_ARCH_S390)
+EXPORT_SYMBOL(irq_stat); /* No separate irq_stat for s390, it is part of PSA */
+#endif
/* waitqueue handling */
EXPORT_SYMBOL(add_wait_queue);
diff --git a/kernel/sched.c b/kernel/sched.c
index 6d99e08ab..688b30c7b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -506,7 +506,7 @@ tq_scheduler_back:
release_kernel_lock(prev, this_cpu);
/* Do "administrative" work here while we don't hold any locks */
- if (softirq_state[this_cpu].active & softirq_state[this_cpu].mask)
+ if (softirq_active(this_cpu) & softirq_mask(this_cpu))
goto handle_softirq;
handle_softirq_back:
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 19e068c65..8c5410315 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -38,8 +38,11 @@
- Bottom halves: globally serialized, grr...
*/
+/* No separate irq_stat for s390, it is part of PSA */
+#if !defined(CONFIG_ARCH_S390)
+irq_cpustat_t irq_stat[NR_CPUS];
+#endif /* CONFIG_ARCH_S390 */
-struct softirq_state softirq_state[NR_CPUS];
static struct softirq_action softirq_vec[32];
asmlinkage void do_softirq()
@@ -53,15 +56,15 @@ asmlinkage void do_softirq()
local_bh_disable();
local_irq_disable();
- mask = softirq_state[cpu].mask;
- active = softirq_state[cpu].active & mask;
+ mask = softirq_mask(cpu);
+ active = softirq_active(cpu) & mask;
if (active) {
struct softirq_action *h;
restart:
/* Reset active bitmask before enabling irqs */
- softirq_state[cpu].active &= ~active;
+ softirq_active(cpu) &= ~active;
local_irq_enable();
@@ -77,7 +80,7 @@ restart:
local_irq_disable();
- active = softirq_state[cpu].active;
+ active = softirq_active(cpu);
if ((active &= mask) != 0)
goto retry;
}
@@ -107,7 +110,7 @@ void open_softirq(int nr, void (*action)(struct softirq_action*), void *data)
softirq_vec[nr].action = action;
for (i=0; i<NR_CPUS; i++)
- softirq_state[i].mask |= (1<<nr);
+ softirq_mask(i) |= (1<<nr);
spin_unlock_irqrestore(&softirq_mask_lock, flags);
}
diff --git a/kernel/user.c b/kernel/user.c
index d9f96da0a..daae4dff4 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -8,6 +8,7 @@
* able to have per-user limits for system resources.
*/
+#include <linux/config.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/slab.h>