Skip to content

Commit 7ec02e3

Browse files
committed
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
2 parents ac24406 + 8d415ee commit 7ec02e3

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

MAINTAINERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11318,6 +11318,20 @@ F: include/trace/
1131811318
F: kernel/trace/
1131911319
F: tools/testing/selftests/ftrace/
1132011320

11321+
TRACING MMIO ACCESSES (MMIOTRACE)
11322+
M: Steven Rostedt <rostedt@goodmis.org>
11323+
M: Ingo Molnar <mingo@kernel.org>
11324+
R: Karol Herbst <karolherbst@gmail.com>
11325+
R: Pekka Paalanen <ppaalanen@gmail.com>
11326+
S: Maintained
11327+
L: linux-kernel@vger.kernel.org
11328+
L: nouveau@lists.freedesktop.org
11329+
F: kernel/trace/trace_mmiotrace.c
11330+
F: include/linux/mmiotrace.h
11331+
F: arch/x86/mm/kmmio.c
11332+
F: arch/x86/mm/mmio-mod.c
11333+
F: arch/x86/mm/testmmiotrace.c
11334+
1132111335
TRIVIAL PATCHES
1132211336
M: Jiri Kosina <trivial@kernel.org>
1132311337
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git

arch/x86/kernel/cpu/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int intel_num_cpu_cores(struct cpuinfo_x86 *c)
336336
{
337337
unsigned int eax, ebx, ecx, edx;
338338

339-
if (c->cpuid_level < 4)
339+
if (!IS_ENABLED(CONFIG_SMP) || c->cpuid_level < 4)
340340
return 1;
341341

342342
/* Intel has a non-standard dependency on %ecx for this CPUID level. */

arch/x86/kernel/smpboot.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ static void __init smp_init_package_map(void)
332332
* primary cores.
333333
*/
334334
ncpus = boot_cpu_data.x86_max_cores;
335+
if (!ncpus) {
336+
pr_warn("x86_max_cores == zero !?!?");
337+
ncpus = 1;
338+
}
339+
335340
__max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
336341

337342
/*

0 commit comments

Comments
 (0)