diff options
-rw-r--r-- | arch/x86/kernel/cpu/cpu.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/scattered.c | 24 |
2 files changed, 0 insertions, 27 deletions
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h index da5446acc241..5eb946b9a9f3 100644 --- a/arch/x86/kernel/cpu/cpu.h +++ b/arch/x86/kernel/cpu/cpu.h | |||
@@ -49,9 +49,6 @@ extern void get_cpu_cap(struct cpuinfo_x86 *c); | |||
49 | extern void get_cpu_address_sizes(struct cpuinfo_x86 *c); | 49 | extern void get_cpu_address_sizes(struct cpuinfo_x86 *c); |
50 | extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c); | 50 | extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c); |
51 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); | 51 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); |
52 | extern u32 get_scattered_cpuid_leaf(unsigned int level, | ||
53 | unsigned int sub_leaf, | ||
54 | enum cpuid_regs_idx reg); | ||
55 | extern void init_intel_cacheinfo(struct cpuinfo_x86 *c); | 52 | extern void init_intel_cacheinfo(struct cpuinfo_x86 *c); |
56 | extern void init_amd_cacheinfo(struct cpuinfo_x86 *c); | 53 | extern void init_amd_cacheinfo(struct cpuinfo_x86 *c); |
57 | extern void init_hygon_cacheinfo(struct cpuinfo_x86 *c); | 54 | extern void init_hygon_cacheinfo(struct cpuinfo_x86 *c); |
diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c index 772c219b6889..0631f5328b7f 100644 --- a/arch/x86/kernel/cpu/scattered.c +++ b/arch/x86/kernel/cpu/scattered.c | |||
@@ -56,27 +56,3 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c) | |||
56 | set_cpu_cap(c, cb->feature); | 56 | set_cpu_cap(c, cb->feature); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | |||
60 | u32 get_scattered_cpuid_leaf(unsigned int level, unsigned int sub_leaf, | ||
61 | enum cpuid_regs_idx reg) | ||
62 | { | ||
63 | const struct cpuid_bit *cb; | ||
64 | u32 cpuid_val = 0; | ||
65 | |||
66 | for (cb = cpuid_bits; cb->feature; cb++) { | ||
67 | |||
68 | if (level > cb->level) | ||
69 | continue; | ||
70 | |||
71 | if (level < cb->level) | ||
72 | break; | ||
73 | |||
74 | if (reg == cb->reg && sub_leaf == cb->sub_leaf) { | ||
75 | if (cpu_has(&boot_cpu_data, cb->feature)) | ||
76 | cpuid_val |= BIT(cb->bit); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | return cpuid_val; | ||
81 | } | ||
82 | EXPORT_SYMBOL_GPL(get_scattered_cpuid_leaf); | ||