Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Hypothetically speaking, if one were to wan...



details:   https://anonhg.NetBSD.org/src/rev/faf0d906da0d
branches:  trunk
changeset: 995058:faf0d906da0d
user:      cherry <cherry%NetBSD.org@localhost>
date:      Tue Dec 04 19:27:22 2018 +0000

description:
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.

diffstat:

 sys/arch/x86/x86/cpu.c  |  8 ++++----
 sys/arch/x86/x86/intr.c |  6 ++++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (74 lines):

diff -r f119be552338 -r faf0d906da0d sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Tue Dec 04 19:22:42 2018 +0000
+++ b/sys/arch/x86/x86/cpu.c    Tue Dec 04 19:27:22 2018 +0000
@@ -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 @@
 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 @@
 }
 #endif
 
+#ifdef MULTIPROCESSOR
 #if NLAPIC > 0
 static void
 cpu_copy_trampoline(paddr_t pdir_pa)
@@ -1028,7 +1029,6 @@
 }
 #endif
 
-#ifdef MULTIPROCESSOR
 int
 mp_cpu_start(struct cpu_info *ci, paddr_t target)
 {
diff -r f119be552338 -r faf0d906da0d sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Tue Dec 04 19:22:42 2018 +0000
+++ b/sys/arch/x86/x86/intr.c   Tue Dec 04 19:27:22 2018 +0000
@@ -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 @@
 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)



Home | Main Index | Thread Index | Old Index