diff options
author | Bill Nottingham <notting@redhat.com> | 2005-06-09 18:24:08 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-06-09 18:24:08 +0000 |
commit | e7ee034ac38a6b6044797279bf9ab98f5ace4246 (patch) | |
tree | 2614d5309e0415d3d35d9f40004f83e33982cc5f /src | |
parent | bb81b2f970e9b388d58a56d5b6aee95e90567fcf (diff) | |
download | initscripts-e7ee034ac38a6b6044797279bf9ab98f5ace4246.tar initscripts-e7ee034ac38a6b6044797279bf9ab98f5ace4246.tar.gz initscripts-e7ee034ac38a6b6044797279bf9ab98f5ace4246.tar.bz2 initscripts-e7ee034ac38a6b6044797279bf9ab98f5ace4246.tar.xz initscripts-e7ee034ac38a6b6044797279bf9ab98f5ace4246.zip |
add redhat-support-check AMD64 number-of-siblings fix to CVS
Diffstat (limited to 'src')
-rw-r--r-- | src/redhat-support-check.c | 8 |
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; } |