summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
commitf1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch)
tree562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /arch/i386
parent00f11569ac8ca73cbcdef8822de1583e79aee571 (diff)
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/config.in18
-rw-r--r--arch/i386/defconfig14
-rw-r--r--arch/i386/kernel/apm.c3
-rw-r--r--arch/i386/kernel/microcode.c2
-rw-r--r--arch/i386/kernel/mtrr.c3
-rw-r--r--arch/i386/kernel/smp.c13
-rw-r--r--arch/i386/kernel/visws_apic.c2
7 files changed, 33 insertions, 22 deletions
diff --git a/arch/i386/config.in b/arch/i386/config.in
index 6557d822d..d9fcd91db 100644
--- a/arch/i386/config.in
+++ b/arch/i386/config.in
@@ -16,6 +16,15 @@ bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
endmenu
mainmenu_option next_comment
+comment 'Loadable module support'
+bool 'Enable loadable module support' CONFIG_MODULES
+if [ "$CONFIG_MODULES" = "y" ]; then
+ bool ' Set version information on all module symbols' CONFIG_MODVERSIONS
+ bool ' Kernel module loader' CONFIG_KMOD
+fi
+endmenu
+
+mainmenu_option next_comment
comment 'Processor type and features'
choice 'Processor family' \
"386 CONFIG_M386 \
@@ -146,15 +155,6 @@ fi
endmenu
mainmenu_option next_comment
-comment 'Loadable module support'
-bool 'Enable loadable module support' CONFIG_MODULES
-if [ "$CONFIG_MODULES" = "y" ]; then
- bool ' Set version information on all module symbols' CONFIG_MODVERSIONS
- bool ' Kernel module loader' CONFIG_KMOD
-fi
-endmenu
-
-mainmenu_option next_comment
comment 'General setup'
bool 'Networking support' CONFIG_NET
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 35444fef3..507ea5469 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -12,6 +12,13 @@ CONFIG_UID16=y
# CONFIG_EXPERIMENTAL is not set
#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_KMOD is not set
+
+#
# Processor type and features
#
# CONFIG_M386 is not set
@@ -48,13 +55,6 @@ CONFIG_SMP=y
CONFIG_HAVE_DEC_LOCK=y
#
-# Loadable module support
-#
-CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
-# CONFIG_KMOD is not set
-
-#
# General setup
#
CONFIG_NET=y
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index a915181a9..bd7c62bdf 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -181,6 +181,7 @@
#include <linux/sched.h>
#include <linux/pm.h>
#include <linux/kernel.h>
+#include <linux/smp_lock.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@ -1268,6 +1269,7 @@ static int do_release(struct inode * inode, struct file * filp)
if (check_apm_user(as, "release"))
return 0;
filp->private_data = NULL;
+ lock_kernel();
if (as->standbys_pending > 0) {
standbys_pending -= as->standbys_pending;
if (standbys_pending <= 0)
@@ -1292,6 +1294,7 @@ static int do_release(struct inode * inode, struct file * filp)
else
as1->next = as->next;
}
+ unlock_kernel();
kfree_s(as, sizeof(*as));
return 0;
}
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index c693b2dc2..0519aee0c 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -147,7 +147,9 @@ static int microcode_open(struct inode *inode, struct file *file)
static int microcode_release(struct inode *inode, struct file *file)
{
+ lock_kernel();
clear_bit(MICROCODE_IS_OPEN, &microcode_status);
+ unlock_kernel();
return 0;
}
diff --git a/arch/i386/kernel/mtrr.c b/arch/i386/kernel/mtrr.c
index c0a158694..05b57c93a 100644
--- a/arch/i386/kernel/mtrr.c
+++ b/arch/i386/kernel/mtrr.c
@@ -251,6 +251,7 @@
#include <asm/mtrr.h>
#include <linux/init.h>
#include <linux/smp.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -1532,6 +1533,7 @@ static int mtrr_close (struct inode *ino, struct file *file)
unsigned int *fcount = file->private_data;
if (fcount == NULL) return 0;
+ lock_kernel();
max = get_num_var_ranges ();
for (i = 0; i < max; ++i)
{
@@ -1541,6 +1543,7 @@ static int mtrr_close (struct inode *ino, struct file *file)
--fcount[i];
}
}
+ unlock_kernel();
kfree (fcount);
file->private_data = NULL;
return 0;
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index e08418fe0..b11b629fe 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -392,6 +392,8 @@ void smp_send_reschedule(int cpu)
* Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
*/
+static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+
static volatile struct call_data_struct {
void (*func) (void *info);
void *info;
@@ -422,9 +424,8 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
{
struct call_data_struct data;
int ret, cpus = smp_num_cpus-1;
- static spinlock_t lock = SPIN_LOCK_UNLOCKED;
- if(cpus == 0)
+ if (!cpus)
return 0;
data.func = func;
@@ -434,21 +435,21 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&lock);
+ spin_lock_bh(&call_lock);
call_data = &data;
/* Send a message to all other CPUs and wait for them to respond */
send_IPI_allbutself(CALL_FUNCTION_VECTOR);
/* Wait for response */
- /* FIXME: lock-up detection, backtrace on lock-up */
- while(atomic_read(&data.started) != cpus)
+ while (atomic_read(&data.started) != cpus)
barrier();
ret = 0;
if (wait)
while (atomic_read(&data.finished) != cpus)
barrier();
- spin_unlock_bh(&lock);
+ spin_unlock_bh(&call_lock);
+
return 0;
}
diff --git a/arch/i386/kernel/visws_apic.c b/arch/i386/kernel/visws_apic.c
index 288f83e8f..017b8eb58 100644
--- a/arch/i386/kernel/visws_apic.c
+++ b/arch/i386/kernel/visws_apic.c
@@ -91,6 +91,8 @@ static void disable_cobalt_irq(unsigned int irq);
static void startup_cobalt_irq(unsigned int irq);
#define shutdown_cobalt_irq disable_cobalt_irq
+static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;
+
static struct hw_interrupt_type cobalt_irq_type = {
"Cobalt-APIC",
startup_cobalt_irq,