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:
Chris Wilson 2013-10-22 15:30:05 +01:00
parent e3f15cbf39
commit 9fc95bebe7
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}