1 /** 2 * @file cpu_type.c 3 * CPU determination 4 * 5 * @remark Copyright 2002 OProfile authors 6 * @remark Read the file COPYING 7 * 8 * @author John Levon 9 * @author Philippe Elie 10 * @author Will Cohen 11 */ 12 13 #include "oprofile.h" 14 15 EXPORT_NO_SYMBOLS; 16 get_cpu_type(void)17__init op_cpu get_cpu_type(void) 18 { 19 __u8 family = local_cpu_data->family; 20 21 /* FIXME: There should be a bit more checking here. */ 22 switch (family) { 23 /* Itanium */ 24 case 0x07: 25 return CPU_IA64_1; 26 break; 27 /* Itanium 2 */ 28 case 0x1f: 29 return CPU_IA64_2; 30 break; 31 } 32 /* Go for the basic generic IA64 */ 33 return CPU_IA64; 34 } 35