Skip to contentSkip to conversation

Add Xeon 7500 series support to oprofile

PATCH In review Andi Kleen 4 participants 7 messages Jan 21, 2010 – Jan 25, 2010 x86

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Add Xeon 7500 series support to oprofile

Add Xeon 7500 series support to oprofile

Straight forward: it's the same as Core i7, so just detect the model number. No user space changes needed.

Very simple patch, so it could be still merged for .33?

---
 arch/x86/oprofile/nmi_int.c |    1 +
 1 file changed, 1 insertion(+)
arch/x86/oprofile/nmi_int.c +1 -0
Index: linux/arch/x86/oprofile/nmi_int.c
===================================================================
@@ -598,6 +598,7 @@ static int __init ppro_init(char **cpu_t
 	case 15: case 23:
 		*cpu_type = "i386/core_2";
 		break;
+	case 0x2e:
 	case 26:
 		spec = &op_arch_perfmon_spec;
 		*cpu_type = "i386/core_i7";
#1 lore raw
Quoted 18 lines · Andi Kleen

Add Xeon 7500 series support to oprofile

Straight forward: it's the same as Core i7, so just detect the model number. No user space changes needed.

Very simple patch, so it could be still merged for .33?

---
 arch/x86/oprofile/nmi_int.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux/arch/x86/oprofile/nmi_int.c
===================================================================

arch/x86/oprofile/nmi_int.c static int __init ppro_init(char **cpu_t · line 604

Quoted 7 lines
arch/x86/oprofile/nmi_int.c +1 -0
@@ -598,6 +598,7 @@ static int __init ppro_init(char **cpu_t
 	case 15: case 23:
 		*cpu_type = "i386/core_2";
 		break;
+	case 0x2e:
 	case 26:
 		spec = &op_arch_perfmon_spec;
 		*cpu_type = "i386/core_i7";

I'll bite - why a hex constant rather than the decimal values nearby?

Also, should we do something about *cpu_type so it isn't confusing on a 7500 reporting itself as a i7?

author
#2 lore raw
Quoted 2 lines

I'll bite - why a hex constant rather than the decimal values nearby?

Why not?

Quoted 3 lines

Also, should we do something about *cpu_type so it isn't confusing on a 7500 reporting itself as a i7?

No, that wouldn't be compatible to oprofile userland.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.
#3 lore raw
In reply to Andi Kleen
Quoted 18 lines · Andi Kleen

Add Xeon 7500 series support to oprofile

Straight forward: it's the same as Core i7, so just detect the model number. No user space changes needed.

Very simple patch, so it could be still merged for .33?

---
 arch/x86/oprofile/nmi_int.c |    1 +

 1 file changed, 1 insertion(+)

Index: linux/arch/x86/oprofile/nmi_int.c
===================================================================

arch/x86/oprofile/nmi_int.c +0 -0
@@ -598,6 +598,7 @@ static int __init ppro_init(char **cpu_t
Quoted 7 lines

       case 15: case 23:
               *cpu_type = "i386/core_2";
               break;
+       case 0x2e:
       case 26:
               spec = &op_arch_perfmon_spec;
               *cpu_type = "i386/core_i7";

How about: this instead?

arch/x86/oprofile/nmi_int.c +1 -1
index cb88b1a..edc074c 100644
@@ -598,7 +598,7 @@ static int __init ppro_init(char **cpu_type)
 	case 15: case 23:
 		*cpu_type = "i386/core_2";
 		break;
-	case 26:
+	case 26: case 46:
 		spec = &op_arch_perfmon_spec;
 		*cpu_type = "i386/core_i7";
 		break;
#4 lore raw

arch/x86/oprofile/nmi_int.c static int __init ppro_init(char **cpu_type) · line 601

Quoted 10 lines · John Villalovos
arch/x86/oprofile/nmi_int.c +1 -1
index cb88b1a..edc074c 100644
@@ -598,7 +598,7 @@ static int __init ppro_init(char **cpu_type)
 	case 15: case 23:
 		*cpu_type = "i386/core_2";
 		break;
-	case 26:
+	case 26: case 46:

Hex values fit better here since the spec is using bit values too. Instead, the code should be changed to only use hex values for models with extended model bits set.

-Robert

Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
#5 lore raw
In reply to Andi Kleen
Quoted 6 lines · Andi Kleen

Add Xeon 7500 series support to oprofile

Straight forward: it's the same as Core i7, so just detect the model number. No user space changes needed.

Very simple patch, so it could be still merged for .33?

Patch applied to oprofile/urgent. I will try to merge it for .33.

I would like to see a follow on patch that changes all x86_model values to hex that have the extended model bit set. This would make the code more readable since the spec is also using bit values for this.

Thanks.

-Robert

Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
author
#6 lore raw
Quoted 1 line

Patch applied to oprofile/urgent. I will try to merge it for .33.

Thanks.

Quoted 5 lines

I would like to see a follow on patch that changes all x86_model values to hex that have the extended model bit set. This would make the code more readable since the spec is also using bit values for this.

Ok, makes sense. I'll send it later.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.