};
struct cpuinfo_x86 {
- __u8 x86; /* CPU family */
- __u8 x86_vendor; /* CPU vendor */
- __u8 x86_model;
- __u8 x86_mask;
+ uint8_t x86; /* CPU family */
+ uint8_t x86_vendor; /* CPU vendor */
+ uint8_t x86_model;
+ uint8_t x86_mask;
int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */
- __u32 extended_cpuid_level; /* Maximum supported CPUID extended level */
+ uint32_t extended_cpuid_level; /* Maximum supported CPUID extended level */
unsigned int x86_capability[NCAPINTS];
char x86_vendor_id[16];
char x86_model_id[64];
int x86_cache_size; /* in KB - valid for CPUS which support this call */
int x86_cache_alignment; /* In bytes */
- __u32 x86_max_cores; /* cpuid returned max cores value */
- __u32 booted_cores; /* number of cores as seen by OS */
- __u32 x86_num_siblings; /* cpuid logical cpus per chip value */
- __u32 apicid;
- __u32 phys_proc_id; /* package ID of each logical CPU */
- __u32 cpu_core_id; /* core ID of each logical CPU*/
- __u32 compute_unit_id; /* AMD compute unit ID of each logical CPU */
+ uint32_t x86_max_cores; /* cpuid returned max cores value */
+ uint32_t booted_cores; /* number of cores as seen by OS */
+ uint32_t x86_num_siblings; /* cpuid logical cpus per chip value */
+ uint32_t apicid;
+ uint32_t phys_proc_id; /* package ID of each logical CPU */
+ uint32_t cpu_core_id; /* core ID of each logical CPU */
+ uint32_t compute_unit_id; /* AMD compute unit ID of each logical CPU */
unsigned short x86_clflush_size;
} __cacheline_aligned;
static int __init p4_init(char ** cpu_type)
{
- __u8 cpu_model = current_cpu_data.x86_model;
+ unsigned int cpu_model = current_cpu_data.x86_model;
if ((cpu_model > 6) || (cpu_model == 5)) {
printk("xenoprof: Initialization failed. "
- "Intel processor model %d for pentium 4 family is not "
+ "Intel processor model %u for pentium 4 family is not "
"supported\n", cpu_model);
return 0;
}
static int __init ppro_init(char ** cpu_type)
{
- __u8 cpu_model = current_cpu_data.x86_model;
-
if (force_arch_perfmon && cpu_has_arch_perfmon)
return 0;
- switch (cpu_model) {
+ switch (current_cpu_data.x86_model) {
case 14:
*cpu_type = "i386/core";
break;
static int __init cf_check nmi_init(void)
{
- __u8 vendor = current_cpu_data.x86_vendor;
- __u8 family = current_cpu_data.x86;
- __u8 _model = current_cpu_data.x86_model;
+ unsigned int vendor = current_cpu_data.x86_vendor;
+ unsigned int family = current_cpu_data.x86;
if (!cpu_has_apic) {
printk("xenoprof: Initialization failed. No APIC\n");
switch (family) {
default:
printk("xenoprof: Initialization failed. "
- "AMD processor family %d is not "
+ "AMD processor family %u is not "
"supported\n", family);
return -ENODEV;
case 0xf:
}
if (!cpu_type && !arch_perfmon_init(&cpu_type)) {
printk("xenoprof: Initialization failed. "
- "Intel processor family %d model %d "
- "is not supported\n", family, _model);
+ "Intel processor family %u model %d is not supported\n",
+ family, current_cpu_data.x86_model);
return -ENODEV;
}
break;
default:
printk("xenoprof: Initialization failed. "
- "Unsupported processor. Unknown vendor %d\n",
+ "Unsupported processor. Unknown vendor %u\n",
vendor);
return -ENODEV;
}