Lines Matching +full:build +full:- +full:legacy

6 #include "qapi/qapi-events-acpi.h"
30 info->slot_type = ACPI_SLOT_TYPE_CPU; in acpi_cpu_device_status()
31 info->slot = g_strdup_printf("%d", idx); in acpi_cpu_device_status()
32 info->source = cdev->ost_event; in acpi_cpu_device_status()
33 info->status = cdev->ost_status; in acpi_cpu_device_status()
34 if (cdev->cpu) { in acpi_cpu_device_status()
35 DeviceState *dev = DEVICE(cdev->cpu); in acpi_cpu_device_status()
36 if (dev->id) { in acpi_cpu_device_status()
37 info->device = g_strdup(dev->id); in acpi_cpu_device_status()
48 for (i = 0; i < cpu_st->dev_count; i++) { in acpi_cpu_ospm_status()
49 QAPI_LIST_APPEND(*tail, acpi_cpu_device_status(i, &cpu_st->devs[i])); in acpi_cpu_ospm_status()
59 if (cpu_st->selector >= cpu_st->dev_count) { in cpu_hotplug_rd()
63 cdev = &cpu_st->devs[cpu_st->selector]; in cpu_hotplug_rd()
66 val |= cdev->cpu ? 1 : 0; in cpu_hotplug_rd()
67 val |= cdev->is_inserting ? 2 : 0; in cpu_hotplug_rd()
68 val |= cdev->is_removing ? 4 : 0; in cpu_hotplug_rd()
69 val |= cdev->fw_remove ? 16 : 0; in cpu_hotplug_rd()
70 trace_cpuhp_acpi_read_flags(cpu_st->selector, val); in cpu_hotplug_rd()
73 switch (cpu_st->command) { in cpu_hotplug_rd()
75 val = cpu_st->selector; in cpu_hotplug_rd()
78 val = cdev->arch_id & 0xFFFFFFFF; in cpu_hotplug_rd()
83 trace_cpuhp_acpi_read_cmd_data(cpu_st->selector, val); in cpu_hotplug_rd()
86 switch (cpu_st->command) { in cpu_hotplug_rd()
91 val = cdev->arch_id >> 32; in cpu_hotplug_rd()
96 trace_cpuhp_acpi_read_cmd_data2(cpu_st->selector, val); in cpu_hotplug_rd()
111 assert(cpu_st->dev_count); in cpu_hotplug_wr()
114 if (cpu_st->selector >= cpu_st->dev_count) { in cpu_hotplug_wr()
115 trace_cpuhp_acpi_invalid_idx_selected(cpu_st->selector); in cpu_hotplug_wr()
122 cpu_st->selector = data; in cpu_hotplug_wr()
123 trace_cpuhp_acpi_write_idx(cpu_st->selector); in cpu_hotplug_wr()
126 cdev = &cpu_st->devs[cpu_st->selector]; in cpu_hotplug_wr()
128 cdev->is_inserting = false; in cpu_hotplug_wr()
129 trace_cpuhp_acpi_clear_inserting_evt(cpu_st->selector); in cpu_hotplug_wr()
131 cdev->is_removing = false; in cpu_hotplug_wr()
132 trace_cpuhp_acpi_clear_remove_evt(cpu_st->selector); in cpu_hotplug_wr()
137 if (!cdev->cpu || cdev->cpu == first_cpu) { in cpu_hotplug_wr()
138 trace_cpuhp_acpi_ejecting_invalid_cpu(cpu_st->selector); in cpu_hotplug_wr()
142 trace_cpuhp_acpi_ejecting_cpu(cpu_st->selector); in cpu_hotplug_wr()
143 dev = DEVICE(cdev->cpu); in cpu_hotplug_wr()
147 cdev->fw_remove = false; in cpu_hotplug_wr()
149 if (!cdev->cpu || cdev->cpu == first_cpu) { in cpu_hotplug_wr()
150 trace_cpuhp_acpi_fw_remove_invalid_cpu(cpu_st->selector); in cpu_hotplug_wr()
153 trace_cpuhp_acpi_fw_remove_cpu(cpu_st->selector); in cpu_hotplug_wr()
154 cdev->fw_remove = true; in cpu_hotplug_wr()
158 trace_cpuhp_acpi_write_cmd(cpu_st->selector, data); in cpu_hotplug_wr()
160 cpu_st->command = data; in cpu_hotplug_wr()
161 if (cpu_st->command == CPHP_GET_NEXT_CPU_WITH_EVENT_CMD) { in cpu_hotplug_wr()
162 uint32_t iter = cpu_st->selector; in cpu_hotplug_wr()
165 cdev = &cpu_st->devs[iter]; in cpu_hotplug_wr()
166 if (cdev->is_inserting || cdev->is_removing || in cpu_hotplug_wr()
167 cdev->fw_remove) { in cpu_hotplug_wr()
168 cpu_st->selector = iter; in cpu_hotplug_wr()
169 trace_cpuhp_acpi_cpu_has_events(cpu_st->selector, in cpu_hotplug_wr()
170 cdev->is_inserting, cdev->is_removing); in cpu_hotplug_wr()
173 iter = iter + 1 < cpu_st->dev_count ? iter + 1 : 0; in cpu_hotplug_wr()
174 } while (iter != cpu_st->selector); in cpu_hotplug_wr()
179 switch (cpu_st->command) { in cpu_hotplug_wr()
181 cdev = &cpu_st->devs[cpu_st->selector]; in cpu_hotplug_wr()
182 cdev->ost_event = data; in cpu_hotplug_wr()
183 trace_cpuhp_acpi_write_ost_ev(cpu_st->selector, cdev->ost_event); in cpu_hotplug_wr()
187 cdev = &cpu_st->devs[cpu_st->selector]; in cpu_hotplug_wr()
188 cdev->ost_status = data; in cpu_hotplug_wr()
189 info = acpi_cpu_device_status(cpu_st->selector, cdev); in cpu_hotplug_wr()
192 trace_cpuhp_acpi_write_ost_status(cpu_st->selector, in cpu_hotplug_wr()
193 cdev->ost_status); in cpu_hotplug_wr()
223 assert(mc->possible_cpu_arch_ids); in cpu_hotplug_hw_init()
224 id_list = mc->possible_cpu_arch_ids(machine); in cpu_hotplug_hw_init()
225 state->dev_count = id_list->len; in cpu_hotplug_hw_init()
226 state->devs = g_new0(typeof(*state->devs), state->dev_count); in cpu_hotplug_hw_init()
227 for (i = 0; i < id_list->len; i++) { in cpu_hotplug_hw_init()
228 state->devs[i].cpu = CPU(id_list->cpus[i].cpu); in cpu_hotplug_hw_init()
229 state->devs[i].arch_id = id_list->cpus[i].arch_id; in cpu_hotplug_hw_init()
231 memory_region_init_io(&state->ctrl_reg, owner, &cpu_hotplug_ops, state, in cpu_hotplug_hw_init()
232 "acpi-cpu-hotplug", ACPI_CPU_HOTPLUG_REG_LEN); in cpu_hotplug_hw_init()
233 memory_region_add_subregion(as, base_addr, &state->ctrl_reg); in cpu_hotplug_hw_init()
239 uint64_t cpu_arch_id = cpu->cc->get_arch_id(cpu); in get_cpu_status()
242 for (i = 0; i < cpu_st->dev_count; i++) { in get_cpu_status()
243 if (cpu_arch_id == cpu_st->devs[i].arch_id) { in get_cpu_status()
244 return &cpu_st->devs[i]; in get_cpu_status()
260 cdev->cpu = CPU(dev); in acpi_cpu_plug_cb()
261 if (dev->hotplugged) { in acpi_cpu_plug_cb()
262 cdev->is_inserting = true; in acpi_cpu_plug_cb()
278 cdev->is_removing = true; in acpi_cpu_unplug_request_cb()
292 cdev->cpu = NULL; in acpi_cpu_unplug_cb()
356 const CPUArchIdList *arch_ids = mc->possible_cpu_arch_ids(machine); in build_cpus_aml()
414 /* switch off legacy CPU hotplug HW and use new one, in build_cpus_aml()
441 for (i = 0; i < arch_ids->len; i++) { in build_cpus_aml()
541 aml_lless(uid, aml_int(arch_ids->len)))); in build_cpus_aml()
650 * exactly at -- and not after -- the last CPU that's currently in build_cpus_aml()
652 * CPU_ADDED_LIST is going to be re-checked. That's OK: we've in build_cpus_aml()
679 /* build Processor object for each processor */ in build_cpus_aml()
680 for (i = 0; i < arch_ids->len; i++) { in build_cpus_aml()
684 int arch_id = arch_ids->cpus[i].arch_id; in build_cpus_aml()
698 /* build _MAT object */ in build_cpus_aml()
701 aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data))); in build_cpus_aml()
704 if (CPU(arch_ids->cpus[i].cpu) != first_cpu) { in build_cpus_aml()
717 /* Linux guests discard SRAT info for non-present CPUs in build_cpus_aml()
719 * be hot-plugged. For simplicity, add it for all CPUs. in build_cpus_aml()
721 if (arch_ids->cpus[i].props.has_node_id) { in build_cpus_aml()
723 aml_int(arch_ids->cpus[i].props.node_id))); in build_cpus_aml()