Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/include Set curcpu() for SMP.



details:   https://anonhg.NetBSD.org/src/rev/f44d426f59a9
branches:  trunk
changeset: 555525:f44d426f59a9
user:      petrov <petrov%NetBSD.org@localhost>
date:      Thu Nov 20 08:04:04 2003 +0000

description:
Set curcpu() for SMP.

diffstat:

 sys/arch/sparc64/include/cpu.h |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r b185e7b5c031 -r f44d426f59a9 sys/arch/sparc64/include/cpu.h
--- a/sys/arch/sparc64/include/cpu.h    Thu Nov 20 07:12:34 2003 +0000
+++ b/sys/arch/sparc64/include/cpu.h    Thu Nov 20 08:04:04 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.38 2003/11/15 05:24:51 petrov Exp $ */
+/*     $NetBSD: cpu.h,v 1.39 2003/11/20 08:04:04 petrov Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -125,10 +125,10 @@
 extern struct cpu_info *cpus;
 extern struct cpu_info cpu_info_store;
 
-#if 1
+#if defined(MULTIPROCESSOR)
+#define        curcpu()        ((struct cpu_info *)CPUINFO_VA)
+#else
 #define        curcpu()        (&cpu_info_store)
-#else
-#define        curcpu()        ((struct cpu_info *)CPUINFO_VA)
 #endif
 
 /*
@@ -150,6 +150,8 @@
 #if defined(MULTIPROCESSOR)
 void   cpu_boot_secondary_processors __P((void));
 #define        CPU_IS_PRIMARY(ci)      (1) /* XXX */
+#else
+#define        CPU_IS_PRIMARY(ci)      (1)
 #endif
 
 /*



Home | Main Index | Thread Index | Old Index