patch-2.3.34 linux/arch/i386/kernel/smp.c
Next file: linux/arch/i386/kernel/vm86.c
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Wed Dec 15 08:57:57 1999
- Orig file:
v2.3.33/linux/arch/i386/kernel/smp.c
- Orig date:
Wed Dec 8 14:11:25 1999
diff -u --recursive --new-file v2.3.33/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
@@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/mm.h>
+#include <linux/spinlock.h>
#include <linux/kernel_stat.h>
#include <linux/smp_lock.h>
#include <linux/irq.h>
@@ -638,11 +639,18 @@
*/
static unsigned int __init get_8254_timer_count(void)
{
+ extern rwlock_t xtime_lock;
+ unsigned long flags;
+
unsigned int count;
+ write_lock_irqsave(&xtime_lock, flags);
+
outb_p(0x00, 0x43);
count = inb_p(0x40);
count |= inb_p(0x40) << 8;
+
+ write_unlock_irqrestore(&xtime_lock, flags);
return count;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)