Commit 7ec02e3b authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Two topology corner case fixes, and a MAINTAINERS file update for
  mmiotrace maintenance"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/topology: Set x86_max_cores to 1 for CONFIG_SMP=n
  MAINTAINERS: Add mmiotrace entry
  x86/topology: Handle CPUID bogosity gracefully
parents ac244065 8d415ee2
...@@ -11318,6 +11318,20 @@ F: include/trace/ ...@@ -11318,6 +11318,20 @@ F: include/trace/
F: kernel/trace/ F: kernel/trace/
F: tools/testing/selftests/ftrace/ F: tools/testing/selftests/ftrace/
TRACING MMIO ACCESSES (MMIOTRACE)
M: Steven Rostedt <rostedt@goodmis.org>
M: Ingo Molnar <mingo@kernel.org>
R: Karol Herbst <karolherbst@gmail.com>
R: Pekka Paalanen <ppaalanen@gmail.com>
S: Maintained
L: linux-kernel@vger.kernel.org
L: nouveau@lists.freedesktop.org
F: kernel/trace/trace_mmiotrace.c
F: include/linux/mmiotrace.h
F: arch/x86/mm/kmmio.c
F: arch/x86/mm/mmio-mod.c
F: arch/x86/mm/testmmiotrace.c
TRIVIAL PATCHES TRIVIAL PATCHES
M: Jiri Kosina <trivial@kernel.org> M: Jiri Kosina <trivial@kernel.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
......
...@@ -336,7 +336,7 @@ static int intel_num_cpu_cores(struct cpuinfo_x86 *c) ...@@ -336,7 +336,7 @@ static int intel_num_cpu_cores(struct cpuinfo_x86 *c)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
if (c->cpuid_level < 4) if (!IS_ENABLED(CONFIG_SMP) || c->cpuid_level < 4)
return 1; return 1;
/* Intel has a non-standard dependency on %ecx for this CPUID level. */ /* Intel has a non-standard dependency on %ecx for this CPUID level. */
......
...@@ -332,6 +332,11 @@ static void __init smp_init_package_map(void) ...@@ -332,6 +332,11 @@ static void __init smp_init_package_map(void)
* primary cores. * primary cores.
*/ */
ncpus = boot_cpu_data.x86_max_cores; ncpus = boot_cpu_data.x86_max_cores;
if (!ncpus) {
pr_warn("x86_max_cores == zero !?!?");
ncpus = 1;
}
__max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus); __max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment