From: Valdis.Kletnieks on
On Thu, 21 Jan 2010 23:26:27 +0100, Andi Kleen said:
> 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?
>
> Signed-off-by: Andi Kleen <ak(a)linux.intel.com>
>
> ---
> arch/x86/oprofile/nmi_int.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: linux/arch/x86/oprofile/nmi_int.c
> ===================================================================
> --- linux.orig/arch/x86/oprofile/nmi_int.c
> +++ 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";


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?

From: Andi Kleen on
>
> I'll bite - why a hex constant rather than the decimal values nearby?

Why not?

>
> 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
--
ak(a)linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: John Villalovos on
On Thu, Jan 21, 2010 at 5:26 PM, Andi Kleen <andi(a)firstfloor.org> wrote:
> 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?
>
> Signed-off-by: Andi Kleen <ak(a)linux.intel.com>
>
> ---
>  arch/x86/oprofile/nmi_int.c |    1 +
>  1 file changed, 1 insertion(+)
>
> Index: linux/arch/x86/oprofile/nmi_int.c
> ===================================================================
> --- linux.orig/arch/x86/oprofile/nmi_int.c
> +++ 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";

How about: this instead?

Signed-off-by: John L. Villalovos <john.l.villalovos(a)intel.com>

diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index cb88b1a..edc074c 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Robert Richter on
On 21.01.10 23:26:27, Andi Kleen wrote:
> 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

--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter(a)amd.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andi Kleen on
> Patch applied to oprofile/urgent. I will try to merge it for .33.

Thanks.

>
> 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

--
ak(a)linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/