From owner-freebsd-hackers Sat Aug 3 14:04:39 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA14993 for hackers-outgoing; Sat, 3 Aug 1996 14:04:39 -0700 (PDT) Received: from clem.systemsix.com (clem.systemsix.com [198.99.86.131]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA14844; Sat, 3 Aug 1996 14:02:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by clem.systemsix.com (8.6.12/8.6.12) with SMTP id PAA14656; Sat, 3 Aug 1996 15:02:40 -0600 Message-Id: <199608032102.PAA14656@clem.systemsix.com> X-Authentication-Warning: clem.systemsix.com: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 From: Steve Passe To: smp@freebsd.org cc: hackers@freebsd.org Subject: halt & sysctl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 03 Aug 1996 15:02:40 -0600 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I have observed that when halting SMP kernels the 'sync' never finishes unless I manually disable the 2nd CPU via: sysctl -w kern.smp_active=0 before issuing the halt command. I have been looking for a way to do the equivalent in machdep.c:boot(): boot(howto) int howto; { #ifdef SMP /** * FIXME: all but the first CPU needs to be disabled here!!! * we want to do equiv. of "sysctl -w kern.smp_active=0" */ int status; int sctl[2]; sctl[0] = CTL_KERN; >>> sctl[1] = ???; status = kernel_sysctl(&proc0, sctl, 2, 0, 0, 0, sizeof( int ), 0); printf( "\nsysctl status: %d\n", status ); #endif /* SMP */ if (!cold && (howto & RB_NOSYNC) == 0 && waittime < 0) { ... } Am I barking up the right tree? Anyone know the proper value for sctl[1]? -- Steve Passe | powered by smp@csn.net | FreeBSD