Lines Matching defs:cpu

63  * To avoid grabbing pool_lock() during cpu change operations, we cache
76 * disabled all cpu-related kstats should be exported to all zones.
79 * code to update this list when certain pools- or cpu-related events
105 cpu_t *cpu;
110 * Callback function used to apply a cpu configuration event to a zone.
127 cpu_visibility_configure(sa->cpu, zone);
130 cpu_visibility_unconfigure(sa->cpu, zone);
133 cpu_visibility_online(sa->cpu, zone);
136 cpu_visibility_offline(sa->cpu, zone);
139 cpu_visibility_add(sa->cpu, zone);
142 cpu_visibility_remove(sa->cpu, zone);
151 * Callback function to be executed when a noteworthy cpu event takes
176 sarg.cpu = c;
228 * Can't enable pools if there are existing cpu partitions.
262 * holding pool_lock so no new cpu partitions can
287 cpu_t *cpu;
302 if ((cpu = cpu_get(cpuid)) == NULL)
304 if (cpu->cpu_props != NULL) {
305 (void) nvlist_free(cpu->cpu_props);
306 cpu->cpu_props = NULL;
541 struct cpu *cpu;
553 if ((cpu = cpu_get((processorid_t)ids[id])) == NULL ||
554 cpupart_query_cpu(cpu) != src) {
558 if ((ret = cpupart_attach_cpu(dst, cpu, 1)) != 0)
707 { "cpu.sys_id", DATA_TYPE_UINT64, PP_READ },
708 { "cpu.comment", DATA_TYPE_STRING, PP_RDWR },
709 { "cpu.status", DATA_TYPE_STRING, PP_RDWR },
710 { "cpu.pinned", DATA_TYPE_BYTE,
755 * Handle special case of "cpu.status".
761 cpu_t *cpu;
767 strcmp(nvpair_name(pair), "cpu.status") == 0) {
787 if ((cpu = cpu_get(cpuid)) == NULL)
789 if (cpu->cpu_props == NULL) {
790 (void) nvlist_alloc(&cpu->cpu_props,
792 (void) nvlist_add_string(cpu->cpu_props,
793 "cpu.comment", "");
795 ret = pool_propput_common(cpu->cpu_props, pair, pool_cpu_props);
810 cpu_t *cpu;
816 if ((cpu = cpu_get(cpuid)) == NULL || cpu_is_poweredoff(cpu)) {
819 if (cpu->cpu_props == NULL)
822 ret = pool_proprm_common(cpu->cpu_props, name,
849 cpu_t *cpu;
873 cpu = cpu_list;
875 if (cpu->cpu_part != cpupart) /* not our pset */
880 (void) ea_attach_item(eo_cpu, &cpu->cpu_id,
883 if (cpu->cpu_props == NULL) {
884 (void) nvlist_alloc(&cpu->cpu_props,
886 (void) nvlist_add_string(cpu->cpu_props,
887 "cpu.comment", "");
889 (void) nvlist_dup(cpu->cpu_props, &nvl, KM_SLEEP);
890 (void) nvlist_add_int64(nvl, "cpu.sys_id", cpu->cpu_id);
891 (void) nvlist_add_string(nvl, "cpu.status",
892 (char *)cpu_get_state_str(cpu));
902 } while ((cpu = cpu->cpu_next) != cpu_list);
953 * The only dynamic property currently implemented is "cpu.status".
959 cpu_t *cpu;
964 if ((cpu = cpu_get(cpuid)) == NULL) {
968 if (strcmp(name, "cpu.status") == 0) {
969 ret = nvlist_add_string(nvl, "cpu.status",
970 (char *)cpu_get_state_str(cpu));