--- src/libplpa/plpa_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --quilt old/src/libplpa/plpa_map.c new/src/libplpa/plpa_map.c --- old/src/libplpa/plpa_map.c +++ new/src/libplpa/plpa_map.c @@ -324,7 +324,7 @@ static void load_cache(const char *sysfs } for (i = 0; i <= max_socket_id; ++i) { int count = 0; - for (j = 0; j < PLPA_BITMASK_CPU_MAX; ++j) { + for (j = 0; j <= max_core_id[i]; ++j) { if (PLPA_CPU_ISSET(j, &(cores_on_sockets[i]))) { ++count; } @@ -458,7 +458,7 @@ int PLPA_NAME(map_to_processor_id)(int s /* Check for some invalid entries */ if (socket < 0 || socket > max_socket_id || - core < 0 || core > max_core_id_overall) { + core < 0 || core > max_core_id[socket]) { return ENOENT; } /* If the mapping returns -1, then this is a non-existent