Lines Matching refs:CPU

27  * Architecture-independent CPU control functions.
131 * Maximum possible CPU id. This can never be >= NCPU since NCPU is
132 * used to size arrays that are indexed by CPU id.
147 * CPU that we're trying to offline. Protected by cpu_lock.
388 * Set affinity for a specified CPU.
395 * by thread_affinity_set and CPU->cpu_id will be the target CPU.
407 cpu_id = CPU->cpu_id;
432 * Make sure we're running on the right CPU.
455 * clear the CPU affinity for the current thread, or set it to the user's
478 * Make sure the thread is running on the bound CPU.
536 cp = CPU;
679 ASSERT(t->t_weakbound_cpu == CPU ||
681 CPU_ON_INTR(CPU) || t->t_flag & T_INTR_THREAD ||
684 if (CPU_ON_INTR(CPU) || (t->t_flag & T_INTR_THREAD) ||
717 CPU->cpu_kprunrun = 1;
755 * the run queue of a CPU that has just gone off line. We do this by
756 * creating a thread with the highest possible prio for each CPU and
798 * and CPU's were powered off. (could also be used for
799 * hotplugging CPU's).
840 * Allocate a pause thread for a CPU.
872 * Free a pause thread for a CPU.
889 t->t_cpu = CPU; /* disp gets upset if last cpu is quiesced. */
920 * Create initial CPU pause thread.
922 cpu_pause_alloc(CPU);
926 * Start the threads used to pause another CPU.
945 * Skip CPU if it is quiesced or not yet started.
953 * Start this CPU's pause thread.
978 * executed while CPUs are paused. Since a CPU may be paused
979 * while a thread scheduling on that CPU is holding an adaptive
1008 * This is so that it won't be necessary to rechoose a CPU
1011 if (CPU == off_cp)
1014 cpu_id = CPU->cpu_id;
1046 cpi->cp_spl = splhigh(); /* block dispatcher on this CPU */
1076 * associated CPU structure.
1092 * The following functions should be used to check CPU states in the kernel.
1094 * in CPU states should *not* use cpu_get_state() and various P_ONLINE/etc
1099 * Determine whether the CPU is online and handling interrupts.
1109 * Determine whether the CPU is offline (this includes spare and faulted).
1119 * Determine whether the CPU is powered off.
1129 * Determine whether the CPU is handling interrupts.
1139 * Determine whether the CPU is active (scheduling threads).
1186 * Bring the indicated CPU online.
1195 * This code must put the new CPU on the active list before
1240 * Take the indicated CPU offline.
1264 * clear these flags and update CPU state.
1281 * Don't offline last online CPU in partition
1286 * Unbind all soft-bound threads bound to our CPU and hard bound threads
1293 * We shouldn't be bound to this CPU ourselves.
1299 * Tell interested parties that this CPU is going offline.
1305 * Tell the PG subsystem that the CPU is leaving the partition
1310 * Take the CPU out of interrupt participation so we won't find
1312 * shut off interrupts on the CPU, don't quiesce it, but don't
1338 * Check for kernel threads (strong or weak) bound to that CPU.
1364 * to any CPU, because the clock_thread is needed to
1395 * needed for this machine architecture to offline a CPU.
1401 * If that all worked, take the CPU offline and decrement
1431 * Remove the CPU from the list of active CPUs.
1438 * the last CPU they run on is the one being offlined now.
1454 * Taking last CPU in lpl offline
1457 * threads are in this CPU's lgroup but have
1473 * Update CPU last ran on if it was this CPU
1486 * CPU with a different lpl, so remove the lgroup from
1505 * Rehome threads with same lpl as this CPU when this
1506 * is the last CPU in the lpl.
1516 * Update CPU last ran on if it was this CPU
1555 * CPU, bring it back online.
1561 * If we failed, but managed to offline callouts on this CPU,
1568 * If we failed, tell the PG subsystem that the CPU is back
1573 * If we failed, we need to notify everyone that this CPU is back on.
1585 * Mark the indicated CPU as faulted, taking it offline.
1613 * Mark the indicated CPU as a spare, taking it offline.
1642 * Take the indicated CPU from poweroff to offline.
1660 * Take the indicated CPU from any inactive state to powered off.
1681 * Initialize the Sequential CPU id lookup table
1689 tbl[0] = CPU;
1695 * Initialize the CPU lists for the first CPU.
1730 * Insert a CPU into the list of available CPUs.
1785 * allocate a pause thread for this CPU.
1791 * link them into a list of just that CPU.
1793 * pause_cpus() when called from the startup thread in a new CPU.
1824 * Tear down the CPU's physical ID cache, and update any
1881 * Add a CPU to the list of active CPUs.
1921 * Add a CPU to the list of active CPUs.
1922 * This is called from machine-dependent layers when a new CPU is started.
1941 * Remove a CPU from the list of active CPUs.
1985 * Routine used to setup a newly inserted CPU in preparation for starting
2022 * Routine used to cleanup a CPU that has been powered off. This will
2064 * NOTE: CPU callbacks should not block. They are called with cpu_lock held.
2118 * Call any state change hooks for this CPU, ignore any errors.
2135 * Call any state change hooks for this CPU, undo it if error found.
2163 * Export information about this CPU via the kstat mechanism.
2357 * Create and install kstats for the boot CPU.
2524 * Bind a thread to a CPU as requested.
2642 * Set home to lgroup with most affinity containing CPU
2658 * Make the thread switch to the bound CPU.
2661 * to the right CPU, since it may be on a
2685 * Either on the bound CPU's disp queue now,
2828 * Unbind threads bound to specified CPU.
2831 * CPU. Otherwise unbind all soft-bound user threads.
3010 * Indicate the current CPU's clock freqency (in Hz).
3011 * The calling context must be such that CPU references are safe.
3018 old_clk = CPU->cpu_curr_clock;
3019 CPU->cpu_curr_clock = new_clk;
3024 DTRACE_PROBE3(cpu__change__speed, processorid_t, CPU->cpu_id,
3038 * Update the pi_state of this CPU. This function provides the CPU status for
3051 * Return offline/online/other status for the indicated CPU. Use only for
3108 * Export this CPU's statistics (cpu_stat_t and cpu_stats_t) as raw and named
3109 * kstats, respectively. This is done when a CPU is initialized or placed
3187 * Read CPU mstate, but compare with the last values we
3338 * Read CPU mstate, but compare with the last values we