Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/alpha Make sure that the cpu_info points at t...



details:   https://anonhg.NetBSD.org/src/rev/7ded4d9df66c
branches:  trunk
changeset: 499376:7ded4d9df66c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Nov 18 17:45:31 2000 +0000

description:
Make sure that the cpu_info points at the correct softc on
single-processor kernels running on multi-processor systems.

diffstat:

 sys/arch/alpha/alpha/cpu.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 90c92953de74 -r 7ded4d9df66c sys/arch/alpha/alpha/cpu.c
--- a/sys/arch/alpha/alpha/cpu.c        Sat Nov 18 16:21:37 2000 +0000
+++ b/sys/arch/alpha/alpha/cpu.c        Sat Nov 18 17:45:31 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.56 2000/11/17 22:47:30 thorpej Exp $ */
+/* $NetBSD: cpu.c,v 1.57 2000/11/18 17:45:31 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.56 2000/11/17 22:47:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.57 2000/11/18 17:45:31 thorpej Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -370,9 +370,12 @@
                ci->ci_flags |= CPUF_PRIMARY;
                atomic_setbits_ulong(&cpus_running, (1UL << ma->ma_slot));
        }
-#endif /* MULTIPROCESSOR */
 
        ci->ci_softc = sc;
+#else /* ! MULTIPROCESSOR */
+       if (ma->ma_slot == hwrpb->rpb_primary_cpu_id)
+               ci->ci_softc = sc;
+#endif /* MULTIPROCESSOR */
 
        evcnt_attach_dynamic(&sc->sc_evcnt_clock, EVCNT_TYPE_INTR,
            NULL, sc->sc_dev.dv_xname, "clock");



Home | Main Index | Thread Index | Old Index