kern_cpu.c (232793) | kern_cpu.c (264984) |
---|---|
1/*- 2 * Copyright (c) 2004-2007 Nate Lawson (SDG) 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004-2007 Nate Lawson (SDG) 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/kern_cpu.c 232793 2012-03-10 18:56:16Z mav $"); | 28__FBSDID("$FreeBSD: head/sys/kern/kern_cpu.c 264984 2014-04-26 20:27:54Z scottl $"); |
29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/cpu.h> 33#include <sys/eventhandler.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/malloc.h> --- 226 unchanged lines hidden (view full) --- 263#ifdef SMP 264 /* 265 * If still booting and secondary CPUs not started yet, don't allow 266 * changing the frequency until they're online. This is because we 267 * can't switch to them using sched_bind() and thus we'd only be 268 * switching the main CPU. XXXTODO: Need to think more about how to 269 * handle having different CPUs at different frequencies. 270 */ | 29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/cpu.h> 33#include <sys/eventhandler.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/malloc.h> --- 226 unchanged lines hidden (view full) --- 263#ifdef SMP 264 /* 265 * If still booting and secondary CPUs not started yet, don't allow 266 * changing the frequency until they're online. This is because we 267 * can't switch to them using sched_bind() and thus we'd only be 268 * switching the main CPU. XXXTODO: Need to think more about how to 269 * handle having different CPUs at different frequencies. 270 */ |
271 if (mp_ncpus > 1 && !smp_active) { | 271 if (mp_ncpus > 1 && !smp_started) { |
272 device_printf(dev, "rejecting change, SMP not started yet\n"); 273 error = ENXIO; 274 goto out; 275 } 276#endif /* SMP */ 277 278 /* 279 * If the requested level has a lower priority, don't allow --- 784 unchanged lines hidden --- | 272 device_printf(dev, "rejecting change, SMP not started yet\n"); 273 error = ENXIO; 274 goto out; 275 } 276#endif /* SMP */ 277 278 /* 279 * If the requested level has a lower priority, don't allow --- 784 unchanged lines hidden --- |