summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Planel <nplanel@mandriva.com>2003-02-26 10:51:13 +0000
committerNicolas Planel <nplanel@mandriva.com>2003-02-26 10:51:13 +0000
commit2d5854c65795062a91709aa77fd20b5599859c50 (patch)
tree28f372e566390a0badb3df8da28c2f129cc7704f
parent0c7d9ac551d9cae3c1d976a163b72b2618690dfa (diff)
downloaddrakx-2d5854c65795062a91709aa77fd20b5599859c50.tar
drakx-2d5854c65795062a91709aa77fd20b5599859c50.tar.gz
drakx-2d5854c65795062a91709aa77fd20b5599859c50.tar.bz2
drakx-2d5854c65795062a91709aa77fd20b5599859c50.tar.xz
drakx-2d5854c65795062a91709aa77fd20b5599859c50.zip
Two smp detection for intel arch
-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__