Lines Matching refs:cpu

82 typedef struct cpu {
86 struct cpu *cpu_self; /* pointer to itself */
93 struct lgrp_ld *cpu_lpl; /* pointer to this cpu's load */
105 struct cpu *cpu_next; /* next existing CPU */
106 struct cpu *cpu_prev; /* prev existing CPU */
107 struct cpu *cpu_next_onln; /* next online (enabled) CPU */
108 struct cpu *cpu_prev_onln; /* prev online (enabled) CPU */
109 struct cpu *cpu_next_part; /* next CPU in partition */
110 struct cpu *cpu_prev_part; /* prev CPU in partition */
111 struct cpu *cpu_next_lgrp; /* next CPU in latency group */
112 struct cpu *cpu_prev_lgrp; /* prev CPU in latency group */
113 struct cpu *cpu_next_lpl; /* next CPU in lgrp partition */
114 struct cpu *cpu_prev_lpl;
116 struct cpu_pg *cpu_pg; /* cpu's processor groups */
131 pri_t cpu_chosen_level; /* priority at which cpu */
156 struct kstat *cpu_info_kstat; /* kstat for cpu info */
162 ftrace_data_t cpu_ftrace; /* per cpu ftrace data */
176 struct cyc_cpu *cpu_cyclic; /* per cpu cyclic subsystem data */
177 struct squeue_set_s *cpu_squeue_set; /* per cpu squeue set */
187 volatile uint16_t cpu_mstate; /* cpu microstate */
189 volatile hrtime_t cpu_mstate_start; /* cpu microstate start time */
190 volatile hrtime_t cpu_acct[NCMSTATES]; /* cpu microstate data */
192 hrtime_t cpu_waitrq; /* cpu run-queue wait time */
193 struct loadavg_s cpu_loadavg; /* loadavg info for this cpu */
200 * this cpu. Cleared at start of interrupt redistribution.
349 #define CPU_ACTIVE(cpu) (((cpu)->cpu_flags & CPU_OFFLINE) == 0)
428 #define CPUSET_ALL_BUT(set, cpu) cpuset_all_but(&(set), cpu)
429 #define CPUSET_ONLY(set, cpu) cpuset_only(&(set), cpu)
430 #define CPU_IN_SET(set, cpu) BT_TEST((set).cpub, cpu)
431 #define CPUSET_ADD(set, cpu) BT_SET((set).cpub, cpu)
432 #define CPUSET_DEL(set, cpu) BT_CLEAR((set).cpub, cpu)
438 * Sets "cpu" to the id of the found CPU, or CPUSET_NOTINSET if no cpu
441 #define CPUSET_FIND(set, cpu) { \
442 cpu = cpuset_find(&(set)); \
458 * (e.g. attempting to add a cpu to a cpuset that's already there, or
459 * deleting a cpu that's not in the cpuset)
462 #define CPUSET_ATOMIC_DEL(set, cpu) BT_ATOMIC_CLEAR((set).cpub, (cpu))
463 #define CPUSET_ATOMIC_ADD(set, cpu) BT_ATOMIC_SET((set).cpub, (cpu))
465 #define CPUSET_ATOMIC_XADD(set, cpu, result) \
466 BT_ATOMIC_SET_EXCL((set).cpub, cpu, result)
468 #define CPUSET_ATOMIC_XDEL(set, cpu, result) \
469 BT_ATOMIC_CLEAR_EXCL((set).cpub, cpu, result)
500 #define CPUSET(cpu) (1UL << (cpu))
503 #define CPUSET_ALL_BUT(set, cpu) ((void)((set) = ~CPUSET(cpu)))
504 #define CPUSET_ONLY(set, cpu) ((void)((set) = CPUSET(cpu)))
505 #define CPU_IN_SET(set, cpu) ((set) & CPUSET(cpu))
506 #define CPUSET_ADD(set, cpu) ((void)((set) |= CPUSET(cpu)))
507 #define CPUSET_DEL(set, cpu) ((void)((set) &= ~CPUSET(cpu)))
515 #define CPUSET_FIND(set, cpu) { \
516 cpu = (uint_t)(lowbit(set) - 1); \
524 #define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_ulong(&(set), ~CPUSET(cpu))
525 #define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_ulong(&(set), CPUSET(cpu))
527 #define CPUSET_ATOMIC_XADD(set, cpu, result) \
528 { result = atomic_set_long_excl(&(set), (cpu)); }
530 #define CPUSET_ATOMIC_XDEL(set, cpu, result) \
531 { result = atomic_clear_long_excl(&(set), (cpu)); }
545 #define CPU_CPR_IS_OFFLINE(cpu) (((cpu)->cpu_cpr_flags & CPU_CPR_ONLINE) == 0)
546 #define CPU_CPR_IS_ONLINE(cpu) ((cpu)->cpu_cpr_flags & CPU_CPR_ONLINE)
547 #define CPU_SET_CPR_FLAGS(cpu, flag) ((cpu)->cpu_cpr_flags |= flag)
551 extern struct cpu *cpu[]; /* indexed by CPU number */
552 extern struct cpu **cpu_seq; /* indexed by sequential CPU id */
561 extern struct cpu *cpu_inmotion; /* offline or partition move target */
566 extern struct cpu *curcpup(void);
662 int cpu_online(cpu_t *cp); /* take cpu online */
663 int cpu_offline(cpu_t *cp, int flags); /* take cpu offline */
664 int cpu_spare(cpu_t *cp, int flags); /* take cpu to spare */
665 int cpu_faulted(cpu_t *cp, int flags); /* take cpu to faulted */
666 int cpu_poweron(cpu_t *cp); /* take powered-off cpu to offline */
667 int cpu_poweroff(cpu_t *cp); /* take offline cpu to powered-off */
694 * internal per-CPU state as given by the cpu_flags member of the cpu structure,
699 int cpu_get_state(cpu_t *); /* get current cpu state */
700 const char *cpu_get_state_str(cpu_t *); /* get current cpu state as string */
718 extern void init_cpu_mstate(struct cpu *, int);
719 extern void term_cpu_mstate(struct cpu *);
721 extern void get_cpu_mstate(struct cpu *, hrtime_t *);
734 int cpu_disable_intr(struct cpu *cp); /* stop issuing interrupts to cpu */
735 void cpu_enable_intr(struct cpu *cp); /* start issuing interrupts to cpu */
801 * Routines used to register interest in cpu's being added to or removed
821 extern void init_cpu_info(struct cpu *);
822 extern void populate_idstr(struct cpu *);
823 extern void cpu_vm_data_init(struct cpu *);
824 extern void cpu_vm_data_destroy(struct cpu *);