Source-Changes-HG archive

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

[src/bjh21-hydra]: src/sys/arch/acorn32/acorn32 Actually throw newly-booted C...



details:   https://anonhg.NetBSD.org/src/rev/5910bf677796
branches:  bjh21-hydra
changeset: 538364:5910bf677796
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sat Oct 19 16:19:43 2002 +0000

description:
Actually throw newly-booted CPUs into cpu_switch() to see if they can do
anything.  They don't seem to (well, one ends up running the pagedaemon,
allegedly), but I don't get a crash.

diffstat:

 sys/arch/acorn32/acorn32/hydra.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (39 lines):

diff -r da441e31ee17 -r 5910bf677796 sys/arch/acorn32/acorn32/hydra.c
--- a/sys/arch/acorn32/acorn32/hydra.c  Sat Oct 19 15:13:23 2002 +0000
+++ b/sys/arch/acorn32/acorn32/hydra.c  Sat Oct 19 16:19:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hydra.c,v 1.13 2002/10/13 12:24:57 bjh21 Exp $ */
+/*     $NetBSD: hydra.c,v 1.13.4.1 2002/10/19 16:19:43 bjh21 Exp $     */
 
 /*-
  * Copyright (c) 2002 Ben Harris
@@ -29,7 +29,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: hydra.c,v 1.13 2002/10/13 12:24:57 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hydra.c,v 1.13.4.1 2002/10/19 16:19:43 bjh21 Exp $");
 
 #include <sys/device.h>
 #include <sys/systm.h>
@@ -359,14 +359,15 @@
        bus_space_tag_t iot = sc->sc_iot;
        bus_space_handle_t ioh = sc->sc_ioh;
        cpuid_t cpunum = cpu_number();
+       int s;
 
        cpu_setup(boot_args);
        cpu_attach(curcpu()->ci_dev);
-       for (;;) { 
-               bus_space_write_1(iot, ioh,
-                   HYDRA_HALT_SET, 1 << (cpunum & 3));
-               printf("%s: I am needed?\n", curcpu()->ci_dev->dv_xname);
-       }
+       bus_space_write_1(iot, ioh,
+           HYDRA_HALT_SET, 1 << (cpunum & 3));
+       printf("%s: I am needed?\n", curcpu()->ci_dev->dv_xname);
+       SCHED_LOCK(s);
+       cpu_switch(NULL, NULL);
 }
 
 #ifdef MULTIPROCESSOR



Home | Main Index | Thread Index | Old Index