sna: Ignore overflow in CPU count rather than abort
If there are more processors than we ever expect, good! Just use lots of them, rather than none at all. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
e3f15cbf39
commit
9fc95bebe7
|
|
@ -102,11 +102,11 @@ num_cores(void)
|
|||
int id;
|
||||
if (sscanf(line, "physical id : %d", &id) == 1) {
|
||||
if (id >= 32)
|
||||
return 0;
|
||||
continue;
|
||||
processors |= 1 << id;
|
||||
} else if (sscanf(line, "core id : %d", &id) == 1) {
|
||||
if (id >= 32)
|
||||
return 0;
|
||||
continue;
|
||||
cores |= 1 << id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue