diff options
author | David Krause <david@cvs.openbsd.org> | 2004-07-08 04:23:05 +0000 |
---|---|---|
committer | David Krause <david@cvs.openbsd.org> | 2004-07-08 04:23:05 +0000 |
commit | 15107a6ef9d22e33dc18c38a4cd73e4fdd0fa33e (patch) | |
tree | ec5d8d88a6a6c403b0caa30c9dd23029d7737323 | |
parent | ab7e2b8d201911e4d84f04b6f9bd3bc53e11423f (diff) |
enclose some MP-only things in #ifdef MULTIPROCESSOR
ok deraadt@ niklas@; testing by pvalchev@
-rw-r--r-- | sys/arch/amd64/amd64/cpu.c | 7 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/gdt.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index f415bcc5d31..ba3a20c5838 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.5 2004/06/25 11:03:27 art Exp $ */ +/* $OpenBSD: cpu.c,v 1.6 2004/07/08 04:23:04 david Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -118,10 +118,12 @@ struct cpu_softc { struct cpu_info *sc_info; /* pointer to CPU info */ }; +#ifdef MULTIPROCESSOR int mp_cpu_start(struct cpu_info *); void mp_cpu_start_cleanup(struct cpu_info *); struct cpu_functions mp_cpu_funcs = { mp_cpu_start, NULL, mp_cpu_start_cleanup }; +#endif /* MULTIPROCESSOR */ struct cfattach cpu_ca = { sizeof(struct cpu_softc), cpu_match, cpu_attach @@ -608,8 +610,6 @@ cpu_copy_trampoline() mp_pdirpa = kmp->pm_pdirpa; } -#endif - int mp_cpu_start(struct cpu_info *ci) @@ -677,6 +677,7 @@ mp_cpu_start_cleanup(struct cpu_info *ci) outb(IO_RTC, NVRAM_RESET); outb(IO_RTC+1, NVRAM_RESET_RST); } +#endif /* MULTIPROCESSOR */ typedef void (vector)(void); extern vector Xsyscall, Xsyscall32; diff --git a/sys/arch/amd64/amd64/gdt.c b/sys/arch/amd64/amd64/gdt.c index ded8e4a421e..19900d362c0 100644 --- a/sys/arch/amd64/amd64/gdt.c +++ b/sys/arch/amd64/amd64/gdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt.c,v 1.4 2004/06/25 11:03:27 art Exp $ */ +/* $OpenBSD: gdt.c,v 1.5 2004/07/08 04:23:04 david Exp $ */ /* $NetBSD: gdt.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /*- @@ -172,6 +172,7 @@ gdt_init() gdt_init_cpu(ci); } +#ifdef MULTIPROCESSOR /* * Allocate shadow GDT for a slave cpu. */ @@ -185,6 +186,7 @@ gdt_alloc_cpu(struct cpu_info *ci) memcpy(ci->ci_gdt, gdtstore, DYNSEL_START + gdt_dyncount * sizeof(struct sys_segment_descriptor)); } +#endif /* MULTIPROCESSOR */ /* diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 6d9e0be645a..ffa00f0b985 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.27 2004/07/03 20:36:04 kettenis Exp $ */ +/* $OpenBSD: machdep.c,v 1.28 2004/07/08 04:23:04 david Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -543,6 +543,7 @@ x86_64_proc0_tss_ldt_init(void) * Set up TSS and LDT for a new PCB. */ +#ifdef MULTIPROCESSOR void x86_64_init_pcb_tss_ldt(ci) struct cpu_info *ci; @@ -562,6 +563,7 @@ x86_64_init_pcb_tss_ldt(ci) ci->ci_idle_tss_sel = tss_alloc(pcb); } +#endif /* MULTIPROCESSOR */ bios_diskinfo_t * bios_getdiskinfo(dev) |