summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>2001-01-12 13:39:50 +0000
committerkato <kato@FreeBSD.org>2001-01-12 13:39:50 +0000
commit0d056e1e4d9ec269225eeb2f773bf3ae48da80ce (patch)
tree74689399fb72a3eccad665c33d6711ef17ebcd7c /sys
parentae11fd4c75e6e102b6f09db5e9ecd2371f550620 (diff)
downloadFreeBSD-src-0d056e1e4d9ec269225eeb2f773bf3ae48da80ce.zip
FreeBSD-src-0d056e1e4d9ec269225eeb2f773bf3ae48da80ce.tar.gz
Merged from sys/i386/i386/machdep.c revisions 1.427 and 1.428.
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/i386/machdep.c16
-rw-r--r--sys/pc98/pc98/machdep.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 9adcb30..26ff15a 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -67,7 +67,6 @@
#include <sys/buf.h>
#include <sys/reboot.h>
#include <sys/callout.h>
-#include <sys/mbuf.h>
#include <sys/msgbuf.h>
#include <sys/sysent.h>
#include <sys/sysctl.h>
@@ -1065,7 +1064,7 @@ setregs(p, entry, stack, ps_strings)
regs->tf_ebx = ps_strings;
/* reset %gs as well */
- if (pcb == curpcb)
+ if (pcb == PCPU_GET(curpcb))
load_gs(_udatasel);
else
pcb->pcb_gs = _udatasel;
@@ -1081,7 +1080,7 @@ setregs(p, entry, stack, ps_strings)
pcb->pcb_dr3 = 0;
pcb->pcb_dr6 = 0;
pcb->pcb_dr7 = 0;
- if (pcb == curpcb) {
+ if (pcb == PCPU_GET(curpcb)) {
/*
* Clear the debug registers on the running
* CPU, otherwise they will end up affecting
@@ -2280,13 +2279,14 @@ init386(first)
initializecpu(); /* Initialize CPU registers */
/* make an initial tss so cpu can get interrupt stack on syscall! */
- common_tss.tss_esp0 = (int) proc0.p_addr + UPAGES*PAGE_SIZE - 16;
- common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
+ PCPU_SET(common_tss.tss_esp0,
+ (int) proc0.p_addr + UPAGES*PAGE_SIZE - 16);
+ PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL));
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
private_tss = 0;
- tss_gdt = &gdt[GPROC0_SEL].sd;
- common_tssd = *tss_gdt;
- common_tss.tss_ioopt = (sizeof common_tss) << 16;
+ PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);
+ PCPU_SET(common_tssd, *PCPU_GET(tss_gdt));
+ PCPU_SET(common_tss.tss_ioopt, (sizeof (struct i386tss)) << 16);
ltr(gsel_tss);
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 9adcb30..26ff15a 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -67,7 +67,6 @@
#include <sys/buf.h>
#include <sys/reboot.h>
#include <sys/callout.h>
-#include <sys/mbuf.h>
#include <sys/msgbuf.h>
#include <sys/sysent.h>
#include <sys/sysctl.h>
@@ -1065,7 +1064,7 @@ setregs(p, entry, stack, ps_strings)
regs->tf_ebx = ps_strings;
/* reset %gs as well */
- if (pcb == curpcb)
+ if (pcb == PCPU_GET(curpcb))
load_gs(_udatasel);
else
pcb->pcb_gs = _udatasel;
@@ -1081,7 +1080,7 @@ setregs(p, entry, stack, ps_strings)
pcb->pcb_dr3 = 0;
pcb->pcb_dr6 = 0;
pcb->pcb_dr7 = 0;
- if (pcb == curpcb) {
+ if (pcb == PCPU_GET(curpcb)) {
/*
* Clear the debug registers on the running
* CPU, otherwise they will end up affecting
@@ -2280,13 +2279,14 @@ init386(first)
initializecpu(); /* Initialize CPU registers */
/* make an initial tss so cpu can get interrupt stack on syscall! */
- common_tss.tss_esp0 = (int) proc0.p_addr + UPAGES*PAGE_SIZE - 16;
- common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
+ PCPU_SET(common_tss.tss_esp0,
+ (int) proc0.p_addr + UPAGES*PAGE_SIZE - 16);
+ PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL));
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
private_tss = 0;
- tss_gdt = &gdt[GPROC0_SEL].sd;
- common_tssd = *tss_gdt;
- common_tss.tss_ioopt = (sizeof common_tss) << 16;
+ PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);
+ PCPU_SET(common_tssd, *PCPU_GET(tss_gdt));
+ PCPU_SET(common_tss.tss_ioopt, (sizeof (struct i386tss)) << 16);
ltr(gsel_tss);
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
OpenPOWER on IntegriCloud