aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-20 18:39:53 +0000
committerBill Nottingham <notting@redhat.com>2005-04-20 18:39:53 +0000
commit99804a7408d556484cd967d002db17a7b9009e8f (patch)
tree763e28f346981ae4694e619e2974041d6aa1c1bd /src
parent360849d6116d6bfb72874a814e6ad344f39f40fc (diff)
downloadinitscripts-99804a7408d556484cd967d002db17a7b9009e8f.tar
initscripts-99804a7408d556484cd967d002db17a7b9009e8f.tar.gz
initscripts-99804a7408d556484cd967d002db17a7b9009e8f.tar.bz2
initscripts-99804a7408d556484cd967d002db17a7b9009e8f.tar.xz
initscripts-99804a7408d556484cd967d002db17a7b9009e8f.zip
check for number of siblings on AMD processors as well (#155331)
Diffstat (limited to 'src')
-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 e115b57f..9584579e 100644
--- a/src/redhat-support-check.c
+++ b/src/redhat-support-check.c
@@ -75,6 +75,14 @@ unsigned int get_num_cpus() {
return ncpus / nsibs;
}
}
+ 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;
+ }
#endif
return ncpus;
}