mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 04:42:12 +00:00
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()
This commit is contained in:
commit
db2ab474c4
@ -353,7 +353,7 @@ static __always_inline void setup_umip(struct cpuinfo_x86 *c)
|
||||
|
||||
cr4_set_bits(X86_CR4_UMIP);
|
||||
|
||||
pr_info("x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature\n");
|
||||
pr_info_once("x86/cpu: User Mode Instruction Prevention (UMIP) activated\n");
|
||||
|
||||
return;
|
||||
|
||||
|
@ -49,9 +49,6 @@ extern void get_cpu_cap(struct cpuinfo_x86 *c);
|
||||
extern void get_cpu_address_sizes(struct cpuinfo_x86 *c);
|
||||
extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c);
|
||||
extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
|
||||
extern u32 get_scattered_cpuid_leaf(unsigned int level,
|
||||
unsigned int sub_leaf,
|
||||
enum cpuid_regs_idx reg);
|
||||
extern void init_intel_cacheinfo(struct cpuinfo_x86 *c);
|
||||
extern void init_amd_cacheinfo(struct cpuinfo_x86 *c);
|
||||
extern void init_hygon_cacheinfo(struct cpuinfo_x86 *c);
|
||||
|
@ -62,27 +62,3 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)
|
||||
set_cpu_cap(c, cb->feature);
|
||||
}
|
||||
}
|
||||
|
||||
u32 get_scattered_cpuid_leaf(unsigned int level, unsigned int sub_leaf,
|
||||
enum cpuid_regs_idx reg)
|
||||
{
|
||||
const struct cpuid_bit *cb;
|
||||
u32 cpuid_val = 0;
|
||||
|
||||
for (cb = cpuid_bits; cb->feature; cb++) {
|
||||
|
||||
if (level > cb->level)
|
||||
continue;
|
||||
|
||||
if (level < cb->level)
|
||||
break;
|
||||
|
||||
if (reg == cb->reg && sub_leaf == cb->sub_leaf) {
|
||||
if (cpu_has(&boot_cpu_data, cb->feature))
|
||||
cpuid_val |= BIT(cb->bit);
|
||||
}
|
||||
}
|
||||
|
||||
return cpuid_val;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_scattered_cpuid_leaf);
|
||||
|
@ -1347,7 +1347,7 @@ void __init calculate_max_logical_packages(void)
|
||||
* extrapolate the boot cpu's data to all packages.
|
||||
*/
|
||||
ncpus = cpu_data(0).booted_cores * topology_max_smt_threads();
|
||||
__max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus);
|
||||
__max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
|
||||
pr_info("Max logical packages: %u\n", __max_logical_packages);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user