subr_smp.c (227309) | subr_smp.c (235622) |
---|---|
1/*- 2 * Copyright (c) 2001, John Baldwin <jhb@FreeBSD.org>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30/* 31 * This module holds the global variables and machine independent functions 32 * used for the kernel SMP support. 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001, John Baldwin <jhb@FreeBSD.org>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30/* 31 * This module holds the global variables and machine independent functions 32 * used for the kernel SMP support. 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/kern/subr_smp.c 227309 2011-11-07 15:43:11Z ed $"); | 36__FBSDID("$FreeBSD: head/sys/kern/subr_smp.c 235622 2012-05-18 18:55:58Z iwasaki $"); |
37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/ktr.h> 42#include <sys/proc.h> 43#include <sys/bus.h> 44#include <sys/lock.h> --- 159 unchanged lines hidden (view full) --- 204{ 205#ifdef KTR 206 char cpusetbuf[CPUSETBUFSIZ]; 207#endif 208 static volatile u_int stopping_cpu = NOCPU; 209 int i; 210 211 KASSERT( | 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/ktr.h> 42#include <sys/proc.h> 43#include <sys/bus.h> 44#include <sys/lock.h> --- 159 unchanged lines hidden (view full) --- 204{ 205#ifdef KTR 206 char cpusetbuf[CPUSETBUFSIZ]; 207#endif 208 static volatile u_int stopping_cpu = NOCPU; 209 int i; 210 211 KASSERT( |
212#if defined(__amd64__) | 212#if defined(__amd64__) || defined(__i386__) |
213 type == IPI_STOP || type == IPI_STOP_HARD || type == IPI_SUSPEND, 214#else 215 type == IPI_STOP || type == IPI_STOP_HARD, 216#endif 217 ("%s: invalid stop type", __func__)); 218 219 if (!smp_started) 220 return (0); --- 34 unchanged lines hidden (view full) --- 255 256int 257stop_cpus_hard(cpuset_t map) 258{ 259 260 return (generic_stop_cpus(map, IPI_STOP_HARD)); 261} 262 | 213 type == IPI_STOP || type == IPI_STOP_HARD || type == IPI_SUSPEND, 214#else 215 type == IPI_STOP || type == IPI_STOP_HARD, 216#endif 217 ("%s: invalid stop type", __func__)); 218 219 if (!smp_started) 220 return (0); --- 34 unchanged lines hidden (view full) --- 255 256int 257stop_cpus_hard(cpuset_t map) 258{ 259 260 return (generic_stop_cpus(map, IPI_STOP_HARD)); 261} 262 |
263#if defined(__amd64__) | 263#if defined(__amd64__) || defined(__i386__) |
264int 265suspend_cpus(cpuset_t map) 266{ 267 268 return (generic_stop_cpus(map, IPI_SUSPEND)); 269} 270#endif 271 --- 456 unchanged lines hidden --- | 264int 265suspend_cpus(cpuset_t map) 266{ 267 268 return (generic_stop_cpus(map, IPI_SUSPEND)); 269} 270#endif 271 --- 456 unchanged lines hidden --- |