subr_smp.c (208165) | subr_smp.c (209059) |
---|---|
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 208165 2010-05-16 19:43:48Z rrs $"); | 36__FBSDID("$FreeBSD: head/sys/kern/subr_smp.c 209059 2010-06-11 18:46:34Z jhb $"); |
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> --- 345 unchanged lines hidden (view full) --- 390 setup_func(arg); 391 if (action_func != NULL) 392 action_func(arg); 393 if (teardown_func != NULL) 394 teardown_func(arg); 395 return; 396 } 397 | 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> --- 345 unchanged lines hidden (view full) --- 390 setup_func(arg); 391 if (action_func != NULL) 392 action_func(arg); 393 if (teardown_func != NULL) 394 teardown_func(arg); 395 return; 396 } 397 |
398 for (i = 0; i <= mp_maxid; i++) 399 if (((1 << i) & map) != 0 && !CPU_ABSENT(i)) | 398 CPU_FOREACH(i) { 399 if (((1 << i) & map) != 0) |
400 ncpus++; | 400 ncpus++; |
401 } |
|
401 if (ncpus == 0) 402 panic("ncpus is 0 with map=0x%x", map); 403 404 /* obtain rendezvous lock */ 405 mtx_lock_spin(&smp_ipi_mtx); 406 407 /* set static function pointers */ 408 smp_rv_ncpus = ncpus; --- 263 unchanged lines hidden --- | 402 if (ncpus == 0) 403 panic("ncpus is 0 with map=0x%x", map); 404 405 /* obtain rendezvous lock */ 406 mtx_lock_spin(&smp_ipi_mtx); 407 408 /* set static function pointers */ 409 smp_rv_ncpus = ncpus; --- 263 unchanged lines hidden --- |