diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-22 15:30:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-22 16:43:19 +0100 |
commit | 9fc95bebe783341aaf0e285ca2e216035378943c (patch) | |
tree | 0b87c22302551da814a478df2c5c71c4041ddc20 /src/sna/sna_threads.c | |
parent | e3f15cbf39696edae9f716bdcfbb7032ec7d7e3f (diff) |
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>
Diffstat (limited to 'src/sna/sna_threads.c')
-rw-r--r-- | src/sna/sna_threads.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_threads.c b/src/sna/sna_threads.c index 333b7ebd..6627cbda 100644 --- a/src/sna/sna_threads.c +++ b/src/sna/sna_threads.c @@ -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; } } |