summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
commit4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch)
treecddb50a81d7d1a628cc400519162080c6d87868e /arch/i386
parent36ea5120664550fae6d31f1c6f695e4f8975cb06 (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 'arch/i386')
-rw-r--r--arch/i386/kernel/irq.c6
-rw-r--r--arch/i386/kernel/process.c2
-rw-r--r--arch/i386/lib/locks.S4
3 files changed, 7 insertions, 5 deletions
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
index 4823c1546..95ce9fb14 100644
--- a/arch/i386/kernel/irq.c
+++ b/arch/i386/kernel/irq.c
@@ -205,7 +205,7 @@ BUILD_IRQ(12) BUILD_IRQ(13) BUILD_IRQ(14) BUILD_IRQ(15)
#ifdef __SMP__
/*
- * The IO-APIC (persent only in SMP boards) has 8 more hardware
+ * The IO-APIC (present only in SMP boards) has 8 more hardware
* interrupt pins, for all of them we define an IRQ vector:
*
* raw PCI interrupts 0-3, basically these are the ones used
@@ -1003,7 +1003,7 @@ unsigned long probe_irq_on (void)
for (i=0; i<NR_IRQS; i++)
for (j=0; j<NR_CPUS; j++)
if (kstat.irqs[j][i] != probe_irqs[j][i])
- irqs &= ~(i<<1);
+ irqs &= ~(1UL << i);
return irqs;
}
@@ -1018,7 +1018,7 @@ int probe_irq_off (unsigned long irqs)
sum += kstat.irqs[j][i];
sum -= probe_irqs[j][i];
}
- if (sum && (irqs & (i<<1))) {
+ if (sum && (irqs & (1UL << i))) {
if (irq_found != -1) {
irq_found = -irq_found;
goto out;
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 6f2245790..6ba4e0ff8 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -171,6 +171,8 @@ int cpu_idle(void *unused)
asmlinkage int sys_idle(void)
{
+ if (current->pid != 0)
+ return -EPERM;
cpu_idle(NULL);
return 0;
}
diff --git a/arch/i386/lib/locks.S b/arch/i386/lib/locks.S
index 30a5bc432..67f1caa51 100644
--- a/arch/i386/lib/locks.S
+++ b/arch/i386/lib/locks.S
@@ -16,10 +16,10 @@ ENTRY(__lock_kernel)
jnc 3f
sti
2:
- btl %dl, SYMBOL_NAME(smp_invalidate_needed)
+ btl %edx, SYMBOL_NAME(smp_invalidate_needed)
jnc 0f
lock
- btrl %dl, SYMBOL_NAME(smp_invalidate_needed)
+ btrl %edx, SYMBOL_NAME(smp_invalidate_needed)
jnc 0f
pushl %eax
movl %cr3, %eax