From 9fc95bebe783341aaf0e285ca2e216035378943c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 22 Oct 2013 15:30:05 +0100 Subject: [PATCH] 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 --- src/sna/sna_threads.c | 4 ++-- 1 file 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; } }