aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-01 05:19:22 +0000
committerlloyd <[email protected]>2008-10-01 05:19:22 +0000
commitbaf45319439d1225c224ec9ab9492683d3722ec6 (patch)
treeff757912629841c507700a7d17a13746e4177ce0
parentadd4bac81557ca3b36d395ced631c8b9a441ad16 (diff)
Search submodels before submodel alises when trying to figure out /proc/cpuinfo
-rwxr-xr-xconfigure.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.pl b/configure.pl
index c26475d0b..17cadccc1 100755
--- a/configure.pl
+++ b/configure.pl
@@ -1979,6 +1979,12 @@ sub guess_cpu_from_this
foreach my $arch (keys %CPU) {
my %info = %{$CPU{$arch}};
+ foreach my $submodel (@{$info{'submodels'}}) {
+ if($cpuinfo =~ /$submodel/) {
+ return $submodel;
+ }
+ }
+
if(defined($info{'submodel_aliases'})) {
my %submodel_aliases = %{$info{'submodel_aliases'}};
@@ -1986,12 +1992,6 @@ sub guess_cpu_from_this
return $sm_alias if($cpuinfo =~ /$sm_alias/);
}
}
-
- foreach my $submodel (@{$info{'submodels'}}) {
- if($cpuinfo =~ /$submodel/) {
- return $submodel;
- }
- }
}
# No match? Try arch names