aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-20 18:49:28 +0000
committerBill Nottingham <notting@redhat.com>2005-04-20 18:49:28 +0000
commitb6a5bf8a9ba36d809ffca957832650a730da148e (patch)
tree2010a1473fbe3be36d2858a719e100d72fb668c2
parentff3250fce88ccf2942f4dca40dc06534df067b5e (diff)
downloadinitscripts-b6a5bf8a9ba36d809ffca957832650a730da148e.tar
initscripts-b6a5bf8a9ba36d809ffca957832650a730da148e.tar.gz
initscripts-b6a5bf8a9ba36d809ffca957832650a730da148e.tar.bz2
initscripts-b6a5bf8a9ba36d809ffca957832650a730da148e.tar.xz
initscripts-b6a5bf8a9ba36d809ffca957832650a730da148e.zip
tweak
-rw-r--r--src/redhat-support-check.c10
1 files 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;