Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Don't dump the CPU topology in the uninspiring case...
details: https://anonhg.NetBSD.org/src/rev/fdea26b24fce
branches: trunk
changeset: 939012:fdea26b24fce
user: simonb <simonb%NetBSD.org@localhost>
date: Wed Sep 23 12:05:16 2020 +0000
description:
Don't dump the CPU topology in the uninspiring case of a single CPU.
diffstat:
sys/kern/subr_cpu.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 9d8141354a90 -r fdea26b24fce sys/kern/subr_cpu.c
--- a/sys/kern/subr_cpu.c Wed Sep 23 10:48:12 2020 +0000
+++ b/sys/kern/subr_cpu.c Wed Sep 23 12:05:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_cpu.c,v 1.15 2020/06/11 22:21:05 ad Exp $ */
+/* $NetBSD: subr_cpu.c,v 1.16 2020/09/23 12:05:16 simonb Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019, 2020
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.15 2020/06/11 22:21:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.16 2020/09/23 12:05:16 simonb Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -203,6 +203,9 @@
int i;
CTASSERT(__arraycount(names) >= __arraycount(ci->ci_sibling));
+ if (ncpu == 1) {
+ return;
+ }
for (CPU_INFO_FOREACH(cii, ci)) {
if (cpu_topology_haveslow)
Home |
Main Index |
Thread Index |
Old Index