summaryrefslogtreecommitdiff
blob: 5916271b3a003d03587e90785b2c9110a8978e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Fix AMD Athlon CPU family recognition.
See upstream bug 275 for details:
https://sourceforge.net/p/oprofile/bugs/275/
--- oprofile-1.0.0/libop/op_cpu_type.c.orig	2014-09-12 18:39:47.000000000 +0400
+++ oprofile-1.0.0/libop/op_cpu_type.c	2014-11-30 18:29:00.328342552 +0300
@@ -538,10 +538,13 @@
 	family = cpu_family(eax);
 
 	/* These family does not exist in the past.*/
-	if (family < 0x0f || family == 0x13)
+	if ((family < 0x0f && family != 0x06) || family == 0x13)
 		return ret;
 
 	switch (family) {
+	case 0x6:
+		ret = op_get_cpu_number("i386/athlon");
+		break;
 	case 0x0f:
 		ret = op_get_cpu_number("x86-64/hammer");
 		break;