Skip to content

Commit

Permalink
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/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()
  • Loading branch information
torvalds committed Dec 27, 2018
2 parents 312a466 + aa02ef0 commit db2ab47
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 29 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions arch/x86/kernel/cpu/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
24 changes: 0 additions & 24 deletions arch/x86/kernel/cpu/scattered.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit db2ab47

Please sign in to comment.