When 0-indexing, maximum index is num_entries - 1. The python xc library had a
sign error where the minus was replaced by a plus, making tools that depended
on it to look for CPUs that did not exist.
Signed-off-by: Petre Eftime <epetre@amazon.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
}
}
- ret_obj = Py_BuildValue("{s:i}", "max_cpu_index", num_cpus + 1);
+ ret_obj = Py_BuildValue("{s:i}", "max_cpu_index", num_cpus - 1);
PyDict_SetItemString(ret_obj, "cpu_to_core", cpu_to_core_obj);
Py_DECREF(cpu_to_core_obj);