Module Name: src Committed By: cherry Date: Tue Dec 4 19:27:22 UTC 2018
Modified Files: src/sys/arch/x86/x86: cpu.c intr.c Log Message: Hypothetically speaking, if one were to want to compile a 'no options MULTIPROCESSOR' kernel, these files may trip up the build. Fix them by moving around the #defines as originally intended. No Functional Changes. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.136 -r1.137 src/sys/arch/x86/x86/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.163 src/sys/arch/x86/x86/cpu.c:1.164 --- src/sys/arch/x86/x86/cpu.c:1.163 Tue Dec 4 19:22:42 2018 +++ src/sys/arch/x86/x86/cpu.c Tue Dec 4 19:27:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.163 2018/12/04 19:22:42 cherry Exp $ */ +/* $NetBSD: cpu.c,v 1.164 2018/12/04 19:27:22 cherry Exp $ */ /* * Copyright (c) 2000-2012 NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.163 2018/12/04 19:22:42 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.164 2018/12/04 19:27:22 cherry Exp $"); #include "opt_ddb.h" #include "opt_mpbios.h" /* for MPDEBUG */ @@ -188,10 +188,10 @@ struct cpu_info *cpu_starting; void cpu_hatch(void *); static void cpu_boot_secondary(struct cpu_info *ci); static void cpu_start_secondary(struct cpu_info *ci); -#endif #if NLAPIC > 0 static void cpu_copy_trampoline(paddr_t); #endif +#endif /* MULTIPROCESSOR */ /* * Runs once per boot once multiprocessor goo has been detected and @@ -987,6 +987,7 @@ cpu_debug_dump(void) } #endif +#ifdef MULTIPROCESSOR #if NLAPIC > 0 static void cpu_copy_trampoline(paddr_t pdir_pa) @@ -1028,7 +1029,6 @@ cpu_copy_trampoline(paddr_t pdir_pa) } #endif -#ifdef MULTIPROCESSOR int mp_cpu_start(struct cpu_info *ci, paddr_t target) { Index: src/sys/arch/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.136 src/sys/arch/x86/x86/intr.c:1.137 --- src/sys/arch/x86/x86/intr.c:1.136 Sun Dec 2 08:19:44 2018 +++ src/sys/arch/x86/x86/intr.c Tue Dec 4 19:27:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.136 2018/12/02 08:19:44 cherry Exp $ */ +/* $NetBSD: intr.c,v 1.137 2018/12/04 19:27:22 cherry Exp $ */ /* * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.136 2018/12/02 08:19:44 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.137 2018/12/04 19:27:22 cherry Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -1493,7 +1493,9 @@ void cpu_intr_init(struct cpu_info *ci) { #if !defined(XEN) +#if (NLAPIC > 0) || defined(MULTIPROCESSOR) || defined(__HAVE_PREEMPTION) struct intrsource *isp; +#endif #if NLAPIC > 0 static int first = 1; #if defined(MULTIPROCESSOR)