|
22 | 22 | #include <linux/suspend.h> |
23 | 23 | #include <linux/units.h> |
24 | 24 |
|
| 25 | +#include <asm/cpuid.h> |
25 | 26 | #include <asm/cpu_device_id.h> |
26 | 27 | #include <asm/intel-family.h> |
27 | 28 | #include <asm/msr.h> |
@@ -625,8 +626,8 @@ static u32 convert_ltr_scale(u32 val) |
625 | 626 | static int pmc_core_ltr_show(struct seq_file *s, void *unused) |
626 | 627 | { |
627 | 628 | struct pmc_dev *pmcdev = s->private; |
628 | | - u64 decoded_snoop_ltr, decoded_non_snoop_ltr; |
629 | | - u32 ltr_raw_data, scale, val; |
| 629 | + u64 decoded_snoop_ltr, decoded_non_snoop_ltr, val; |
| 630 | + u32 ltr_raw_data, scale; |
630 | 631 | u16 snoop_ltr, nonsnoop_ltr; |
631 | 632 | unsigned int i, index, ltr_index = 0; |
632 | 633 |
|
@@ -935,13 +936,13 @@ static unsigned int pmc_core_get_crystal_freq(void) |
935 | 936 | { |
936 | 937 | unsigned int eax_denominator, ebx_numerator, ecx_hz, edx; |
937 | 938 |
|
938 | | - if (boot_cpu_data.cpuid_level < 0x15) |
| 939 | + if (boot_cpu_data.cpuid_level < CPUID_TSC_LEAF) |
939 | 940 | return 0; |
940 | 941 |
|
941 | 942 | eax_denominator = ebx_numerator = ecx_hz = edx = 0; |
942 | 943 |
|
943 | | - /* CPUID 15H TSC/Crystal ratio, plus optionally Crystal Hz */ |
944 | | - cpuid(0x15, &eax_denominator, &ebx_numerator, &ecx_hz, &edx); |
| 944 | + /* TSC/Crystal ratio, plus optionally Crystal Hz */ |
| 945 | + cpuid(CPUID_TSC_LEAF, &eax_denominator, &ebx_numerator, &ecx_hz, &edx); |
945 | 946 |
|
946 | 947 | if (ebx_numerator == 0 || eax_denominator == 0) |
947 | 948 | return 0; |
|
0 commit comments