summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/c/smp-dmi.c10
-rw-r--r--perl-install/c/smp.c5
2 files changed, 5 insertions, 10 deletions
diff --git a/perl-install/c/smp-dmi.c b/perl-install/c/smp-dmi.c
index 518163c75..672bc2c35 100644
--- a/perl-install/c/smp-dmi.c
+++ b/perl-install/c/smp-dmi.c
@@ -159,8 +159,7 @@ static int dmi_table(int fd, u32 base, int len, int num)
dm=(struct dmi_header *)data;
if((dm->type == 4) && /*"Central Processor"*/(data[5] == 3)) {
- if(/*Processor Manufacturer*/(data[7] != 0) &&
- (strncmp(dmi_processor_family(data[6]),"Unknown",7) != 0) && (data[6] != 0))
+ if(/*Processor Manufacturer*/data[7] != 0)
processor++;
}
@@ -174,11 +173,6 @@ static int dmi_table(int fd, u32 base, int len, int num)
return processor;
}
-int main(int argc, char *argv[])
-{
- return intelDetectSMP();
-}
-
int intelDetectSMP(void) {
unsigned char buf[20];
int fd=open("/dev/mem", O_RDONLY);
@@ -215,5 +209,5 @@ int intelDetectSMP(void) {
}
}
close(fd);
- return processor;
+ return (processor > 1);
}
diff --git a/perl-install/c/smp.c b/perl-install/c/smp.c
index 4e0ed354a..7e25302d1 100644
--- a/perl-install/c/smp.c
+++ b/perl-install/c/smp.c
@@ -244,7 +244,8 @@ readType()
extern int intelDetectSMP(void);
-static int intelDetectSMP_old(void)
+// old detection
+static int intelDetectSMP_mptable(void)
{
vm_offset_t paddr;
int where;
@@ -483,7 +484,7 @@ int detectSMP(void)
return isSMP;
#ifdef __i386__
- return isSMP = intelDetectSMP();
+ return isSMP = intelDetectSMP() || intelDetectSMP_mptable();
#elif __sparc__
return isSMP = sparcDetectSMP();
#elif __alpha__