From: John L. <mov...@us...> - 2001-12-31 14:45:36
|
Update of /cvsroot/oprofile/oprofile/module In directory usw-pr-cvs1:/tmp/cvs-serv29369/module Modified Files: op_init.c op_x86.c oprofile.c Log Message: use enum op_cpu for cpu type Index: op_init.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/op_init.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- op_init.c 2001/10/30 17:32:14 1.1 +++ op_init.c 2001/12/31 14:45:33 1.2 @@ -23,9 +23,9 @@ MODULE_PARM(expected_cpu_type, "i"); MODULE_PARM_DESC(expected_cpu_type, "Allow checking of detected hardware from the user space"); -static int expected_cpu_type = -1; +static op_cpu expected_cpu_type = CPU_NO_GOOD; -extern int cpu_type; +extern op_cpu cpu_type; extern uint op_nr_counters; extern int separate_running_bit; @@ -43,11 +43,12 @@ } /* 0 if PPro, 1 if PII, 2 if PIII, 3 if Athlon */ - if (current_cpu_data.x86_vendor == X86_VENDOR_AMD) + if (current_cpu_data.x86_vendor == X86_VENDOR_AMD) { cpu_type = CPU_ATHLON; - else + } else { cpu_type = (current_cpu_data.x86_model > 5) ? CPU_PIII : (current_cpu_data.x86_model > 2); + } if (cpu_type == CPU_ATHLON) { op_nr_counters = 4; Index: op_x86.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/op_x86.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- op_x86.c 2001/11/06 15:48:35 1.2 +++ op_x86.c 2001/12/31 14:45:33 1.3 @@ -16,7 +16,7 @@ #include "oprofile.h" -extern int cpu_type; +extern op_cpu cpu_type; /* ---------------- NMI handler setup ------------ */ Index: oprofile.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/oprofile.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- oprofile.c 2001/12/31 05:53:47 1.15 +++ oprofile.c 2001/12/31 14:45:33 1.16 @@ -52,7 +52,7 @@ static u32 prof_on __cacheline_aligned; static int op_major; -int cpu_type; +op_cpu cpu_type; static volatile uint oprof_opened __cacheline_aligned; static volatile uint oprof_note_opened __cacheline_aligned; |