From: Giacomo Mazzola <gmazz@amazon.de>
To: <kvm@vger.kernel.org>
Cc: Giacomo Mazzola <gmazz@amazon.de>
Subject: [kvm-unit-tests PATCH v2 5/8] x86: replace per-AP bringup prints with a single summary line
Date: Tue, 20 Oct 2026 15:25:22 +0000 [thread overview]
Message-ID: <20261020152525.57694-6-gmazz@amazon.de> (raw)
In-Reply-To: <20261020152525.57694-1-gmazz@amazon.de>
Remove the per-AP "CPU %d online" printf from ap_online() and the
per-CPU "enabling apic" printf from enable_apic(). Replace them
with a single "smp: %d CPUs online" message printed once after all
APs have come up.
On systems with many CPUs, the serial lock contention from per-AP
prints delays bringup long enough to trigger platform watchdogs.
A single summary line provides the same information without O(ncpus)
serial transactions during bringup.
Signed-off-by: Giacomo Mazzola <gmazz@amazon.de>
---
lib/x86/apic.c | 1 -
lib/x86/smp.c | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/x86/apic.c b/lib/x86/apic.c
index c538fb5f..483b26d3 100644
--- a/lib/x86/apic.c
+++ b/lib/x86/apic.c
@@ -237,7 +237,6 @@ void set_irq_line(unsigned line, int val)
void enable_apic(void)
{
- printf("enabling apic\n");
xapic_write(APIC_SPIV, 0x1ff);
}
diff --git a/lib/x86/smp.c b/lib/x86/smp.c
index 0cd44cdc..706f071a 100644
--- a/lib/x86/smp.c
+++ b/lib/x86/smp.c
@@ -97,7 +97,6 @@ void ap_online(void)
{
sti();
- printf("setup: CPU %" PRId32 " online\n", apic_id());
atomic_inc(&cpu_online_count);
/* Only the BSP runs the test's main(), APs are given work via IPIs. */
@@ -294,7 +293,8 @@ void bringup_aps(void)
_cpu_count = fwcfg_get_nb_cpus();
- printf("smp: waiting for %d APs\n", _cpu_count - 1);
while (_cpu_count != atomic_read(&cpu_online_count))
cpu_relax();
+
+ printf("smp: %d CPUs online\n", _cpu_count);
}
--
2.47.3
next prev parent reply other threads:[~2026-10-20 15:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 15:25 [kvm-unit-tests PATCH v2 0/8] x86: fixes for running KUT as EFI on non-QEMU KVM hosts Giacomo Mazzola
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 1/8] x86: efi: use PER_CPU_SIZE for per-CPU stack allocation Giacomo Mazzola
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 2/8] x86: fix EFI memory allocator to clamp regions to 4 GiB Giacomo Mazzola
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 3/8] x86: skip PMU init when no PMU is advertised Giacomo Mazzola
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 4/8] x86: fix ISR thunk to use absolute indirect jump Giacomo Mazzola
2026-10-20 15:25 ` Giacomo Mazzola [this message]
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 6/8] x86: add timeout-based SMP bringup when fw_cfg is unavailable Giacomo Mazzola
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 7/8] efi: fix load_options_size conversion to character count Giacomo Mazzola
2026-10-20 15:25 ` [kvm-unit-tests PATCH v2 8/8] lib: parse KUT_ENV= from command line into environ Giacomo Mazzola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261020152525.57694-6-gmazz@amazon.de \
--to=gmazz@amazon.de \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.