From b6a5bf8a9ba36d809ffca957832650a730da148e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 20 Apr 2005 18:49:28 +0000 Subject: tweak --- src/redhat-support-check.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/redhat-support-check.c b/src/redhat-support-check.c index 9584579e..1d41fdb0 100644 --- a/src/redhat-support-check.c +++ b/src/redhat-support-check.c @@ -76,12 +76,12 @@ unsigned int get_num_cpus() { } } if (ebx==0x68747541 && edx==0x69746e65 && ecx==0x444d4163) { - int nsibs; - cpuid(1, &eax, &ebx, &ecx, &edx); - nsibs = (ebx & 0xff0000) >> 16; - if (nsibs == 0) nsibs = 1; - return ncpus / nsibs; + if (edx & (1 << 28)) { /* has HT */ + int nsibs = (ebx & 0xff0000) >> 16; + if (nsibs == 0) nsibs = 1; + return ncpus / nsibs; + } } #endif return ncpus; -- cgit v1.2.1