Skip to content

Commit db2ab47

Browse files
committed
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cpu updates from Ingo Molnar: "Misc changes: - Fix nr_cpus= boot option interaction bug with logical package management - Clean up UMIP detection messages - Add WBNOINVD instruction detection - Remove the unused get_scattered_cpuid_leaf() function" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/topology: Use total_cpus for max logical packages calculation x86/umip: Make the UMIP activated message generic x86/umip: Print UMIP line only once x86/cpufeatures: Add WBNOINVD feature definition x86/cpufeatures: Remove get_scattered_cpuid_leaf()
2 parents 312a466 + aa02ef0 commit db2ab47

File tree

4 files changed

+2
-29
lines changed

4 files changed

+2
-29
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static __always_inline void setup_umip(struct cpuinfo_x86 *c)
353353

354354
cr4_set_bits(X86_CR4_UMIP);
355355

356-
pr_info("x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature\n");
356+
pr_info_once("x86/cpu: User Mode Instruction Prevention (UMIP) activated\n");
357357

358358
return;
359359

arch/x86/kernel/cpu/cpu.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ extern void get_cpu_cap(struct cpuinfo_x86 *c);
4949
extern void get_cpu_address_sizes(struct cpuinfo_x86 *c);
5050
extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c);
5151
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);
5552
extern void init_intel_cacheinfo(struct cpuinfo_x86 *c);
5653
extern void init_amd_cacheinfo(struct cpuinfo_x86 *c);
5754
extern void init_hygon_cacheinfo(struct cpuinfo_x86 *c);

arch/x86/kernel/cpu/scattered.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,3 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)
6262
set_cpu_cap(c, cb->feature);
6363
}
6464
}
65-
66-
u32 get_scattered_cpuid_leaf(unsigned int level, unsigned int sub_leaf,
67-
enum cpuid_regs_idx reg)
68-
{
69-
const struct cpuid_bit *cb;
70-
u32 cpuid_val = 0;
71-
72-
for (cb = cpuid_bits; cb->feature; cb++) {
73-
74-
if (level > cb->level)
75-
continue;
76-
77-
if (level < cb->level)
78-
break;
79-
80-
if (reg == cb->reg && sub_leaf == cb->sub_leaf) {
81-
if (cpu_has(&boot_cpu_data, cb->feature))
82-
cpuid_val |= BIT(cb->bit);
83-
}
84-
}
85-
86-
return cpuid_val;
87-
}
88-
EXPORT_SYMBOL_GPL(get_scattered_cpuid_leaf);

arch/x86/kernel/smpboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ void __init calculate_max_logical_packages(void)
13471347
* extrapolate the boot cpu's data to all packages.
13481348
*/
13491349
ncpus = cpu_data(0).booted_cores * topology_max_smt_threads();
1350-
__max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus);
1350+
__max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
13511351
pr_info("Max logical packages: %u\n", __max_logical_packages);
13521352
}
13531353

0 commit comments

Comments
 (0)