ia64/xen-unstable

changeset 12502:ca9b569ffb63

[OPROFILE] Add support for core and core2 chips.

Tested on Woodcrest processors. Requires Oprofile 0.9.2.

Signed-off-by: Andrew Theurer <habanero@us.ibm.com>
author kfraser@localhost.localdomain
date Fri Nov 17 10:05:12 2006 +0000 (2006-11-17)
parents 7f7aeaa0cba6
children d19b8542865b
files xen/arch/x86/oprofile/nmi_int.c
line diff
     1.1 --- a/xen/arch/x86/oprofile/nmi_int.c	Fri Nov 17 10:02:54 2006 +0000
     1.2 +++ b/xen/arch/x86/oprofile/nmi_int.c	Fri Nov 17 10:05:12 2006 +0000
     1.3 @@ -305,22 +305,24 @@ static int __init ppro_init(char *cpu_ty
     1.4  {
     1.5  	__u8 cpu_model = current_cpu_data.x86_model;
     1.6  
     1.7 -	if (cpu_model > 0xd) {
     1.8 +	if (cpu_model > 15) {
     1.9  		printk("xenoprof: Initialization failed. "
    1.10  		       "Intel processor model %d for P6 class family is not "
    1.11  		       "supported\n", cpu_model);
    1.12  		return 0;
    1.13  	}
    1.14 -
    1.15 -	if (cpu_model == 9) {
    1.16 +	else if (cpu_model == 15)
    1.17 +		strncpy (cpu_type, "i386/core_2", XENOPROF_CPU_TYPE_SIZE - 1);
    1.18 +	else if (cpu_model == 14)
    1.19 +		strncpy (cpu_type, "i386/core", XENOPROF_CPU_TYPE_SIZE - 1);
    1.20 +	else if (cpu_model == 9)
    1.21  		strncpy (cpu_type, "i386/p6_mobile", XENOPROF_CPU_TYPE_SIZE - 1);
    1.22 -	} else if (cpu_model > 5) {
    1.23 +	else if (cpu_model > 5)
    1.24  		strncpy (cpu_type, "i386/piii", XENOPROF_CPU_TYPE_SIZE - 1);
    1.25 -	} else if (cpu_model > 2) {
    1.26 +	else if (cpu_model > 2)
    1.27  		strncpy (cpu_type, "i386/pii", XENOPROF_CPU_TYPE_SIZE - 1);
    1.28 -	} else {
    1.29 +	else
    1.30  		strncpy (cpu_type, "i386/ppro", XENOPROF_CPU_TYPE_SIZE - 1);
    1.31 -	}
    1.32  
    1.33  	model = &op_ppro_spec;
    1.34  	return 1;