Use the logical index for now

This commit is contained in:
Rodrigo Arias 2023-02-16 17:04:07 +01:00 committed by Rodrigo Arias Mallo
parent 3cc3d831f5
commit 54cf4d3409

View File

@ -96,8 +96,9 @@ load_cpus(struct loom *loom, JSON_Object *meta)
}
/* Cast from double */
//int index = (int) json_object_get_number(jcpu, "index");
int phyid = (int) json_object_get_number(jcpu, "phyid");
int index = (int) json_object_get_number(jcpu, "index");
/* FIXME: Use phyid instead */
//int phyid = (int) json_object_get_number(jcpu, "phyid");
struct cpu *cpu = calloc(1, sizeof(struct cpu));
if (cpu == NULL) {
@ -105,7 +106,7 @@ load_cpus(struct loom *loom, JSON_Object *meta)
return -1;
}
cpu_init_begin(cpu, phyid, 0);
cpu_init_begin(cpu, index, 0);
if (loom_add_cpu(loom, cpu) != 0) {
err("loom_add_cpu() failed");