summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2002-03-13 22:46:35 +0000
committerMatt Wilson <msw@redhat.com>2002-03-13 22:46:35 +0000
commit91861d216049c837f4efe9e146276f0812cc0c91 (patch)
tree3d0c890c2978e050de85586911be76dbc177bcce /isys
parent34a8fab786fbb299118bd9c8cfc86c6691fd6066 (diff)
downloadanaconda-91861d216049c837f4efe9e146276f0812cc0c91.tar.gz
anaconda-91861d216049c837f4efe9e146276f0812cc0c91.tar.xz
anaconda-91861d216049c837f4efe9e146276f0812cc0c91.zip
merge from 7.3 branch: return TRUE if the system has hyperthread so that a SMP kernel will be installed. (#59813)
Diffstat (limited to 'isys')
-rw-r--r--isys/smp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/isys/smp.c b/isys/smp.c
index 3aa97997e..7559ea6d4 100644
--- a/isys/smp.c
+++ b/isys/smp.c
@@ -255,6 +255,27 @@ static int intelDetectSMP(void)
mpfps_t mpfps;
int rc = 0;
int ncpus = 0;
+ FILE *f;
+
+ f = fopen("/proc/cpuinfo", "r");
+ if (f) {
+ char buff[1024];
+
+ while (fgets (buff, 1024, f) != NULL) {
+ if (!strncmp (buff, "flags\t\t:", 8)) {
+ if (strstr(buff, " ht ") ||
+ /* buff includes \n, so back up 4 bytes from the end
+ and check there too to catch the end case */
+ !strncmp(buff + strlen(buff) - 4, " ht", 3)) {
+ rc = 1;
+ }
+ break;
+ }
+ }
+ fclose(f);
+ }
+ if (rc)
+ return 1;
/* open physical memory for access to MP structures */
if ( (pfd = open( "/dev/mem", O_RDONLY )) < 0 ) {