Deleted Added
full compact
kern_shutdown.c (137329) kern_shutdown.c (137375)
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 137329 2004-11-07 06:58:45Z njl $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 137375 2004-11-08 04:52:26Z marcel $");
39
40#include "opt_kdb.h"
41#include "opt_mac.h"
42#include "opt_panic.h"
43#include "opt_show_busybufs.h"
44#include "opt_sched.h"
45
46#include <sys/param.h>

--- 193 unchanged lines hidden (view full) ---

240/*
241 * Shutdown the system cleanly to prepare for reboot, halt, or power off.
242 */
243static void
244boot(int howto)
245{
246 static int first_buf_printf = 1;
247
39
40#include "opt_kdb.h"
41#include "opt_mac.h"
42#include "opt_panic.h"
43#include "opt_show_busybufs.h"
44#include "opt_sched.h"
45
46#include <sys/param.h>

--- 193 unchanged lines hidden (view full) ---

240/*
241 * Shutdown the system cleanly to prepare for reboot, halt, or power off.
242 */
243static void
244boot(int howto)
245{
246 static int first_buf_printf = 1;
247
248#if defined(SMP) && (defined(__i386__) || defined(__amd64__))
248#if defined(SMP)
249 /*
250 * Bind us to CPU 0 so that all shutdown code runs there. Some
251 * systems don't shutdown properly (i.e., ACPI power off) if we
252 * run on another processor.
253 */
254 mtx_lock_spin(&sched_lock);
255 sched_bind(curthread, 0);
256 mtx_unlock_spin(&sched_lock);

--- 379 unchanged lines hidden ---
249 /*
250 * Bind us to CPU 0 so that all shutdown code runs there. Some
251 * systems don't shutdown properly (i.e., ACPI power off) if we
252 * run on another processor.
253 */
254 mtx_lock_spin(&sched_lock);
255 sched_bind(curthread, 0);
256 mtx_unlock_spin(&sched_lock);

--- 379 unchanged lines hidden ---