summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-06-09 18:31:02 +0000
committerBill Nottingham <notting@redhat.com>2005-06-09 18:31:02 +0000
commit43911b63e6080755a07b3a71580bd8062657e0da (patch)
treefbfe7c4bbf333f81f41ac62f3c90dd49270256d1
parent47a82590b28a8849ddb14b937d142dc7ada27571 (diff)
downloadinitscripts-43911b63e6080755a07b3a71580bd8062657e0da.tar.gz
initscripts-43911b63e6080755a07b3a71580bd8062657e0da.tar.xz
initscripts-43911b63e6080755a07b3a71580bd8062657e0da.zip
add patch for dual-core to this CVS (#155331)
-rw-r--r--src/redhat-support-check.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/redhat-support-check.c b/src/redhat-support-check.c
index 1d41fdb0..93ea9154 100644
--- a/src/redhat-support-check.c
+++ b/src/redhat-support-check.c
@@ -83,6 +83,14 @@ unsigned int get_num_cpus() {
return ncpus / nsibs;
}
}
+ if (ebx==0x68747541 && edx==0x69746e65 && ecx==0x444d4163) {
+ cpuid(1, &eax, &ebx, &ecx, &edx);
+ if (edx & (1 << 28)) { /* has HT */
+ int nsibs = (ebx & 0xff0000) >> 16;
+ if (nsibs == 0) nsibs = 1;
+ return ncpus / nsibs;
+ }
+ }
#endif
return ncpus;
}