patch-2.2.18 linux/arch/i386/kernel/process.c
Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/i386/kernel/mtrr.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Sat Nov 4 11:47:44 2000
- Orig file:
v2.2.17/arch/i386/kernel/process.c
- Orig date:
Fri Apr 21 12:45:45 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
@@ -31,6 +31,7 @@
#include <linux/smp.h>
#include <linux/reboot.h>
#include <linux/init.h>
+#include <linux/mc146818rtc.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -253,8 +254,10 @@
*/
void machine_real_restart(unsigned char *code, int length)
{
+ unsigned long flags;
+
cli();
-
+
/* Write zero to CMOS register number 0x0f, which the BIOS POST
routine will recognize as telling it to do a proper reboot. (Well
that's what this book in front of me says -- it may only apply to
@@ -264,8 +267,9 @@
`outb_p' is needed instead of just `outb'. Use it to be on the
safe side. */
- outb_p (0x8f, 0x70);
- outb_p (0x00, 0x71);
+ spin_lock_irqsave(&rtc_lock, flags);
+ CMOS_WRITE(0x00, 0x8f);
+ spin_unlock_irqrestore(&rtc_lock, flags);
/* Remap the kernel at virtual address zero, as well as offset zero
from the kernel segment. This assumes the kernel segment starts at
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)