Skip to contentSkip to conversation

x86/smpboot: Use printk_once() rather than opencoding it

PATCH In review Andrew Cooper 2 participants 2 messages Jan 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/smpboot: Use printk_once() rather than opencoding it

Shrink the text to be less verbose.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/smpboot.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
xen/arch/x86/smpboot.c +5 -8
index a7e7013097..7e29704080 100644
@@ -1291,14 +1291,11 @@ int cpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm)
     /* Physically added CPUs do not have synchronised TSC. */
     if ( boot_cpu_has(X86_FEATURE_TSC_RELIABLE) )
     {
-        static bool once_only;
-
-        if ( !test_and_set_bool(once_only) )
-            printk(XENLOG_WARNING
-                   " ** New physical CPU %u may have skewed TSC and hence "
-                   "break assumed cross-CPU TSC coherency.\n"
-                   " ** Consider using boot parameter \"tsc=skewed\" "
-                   "which forces TSC emulation where appropriate.\n", cpu);
+        printk_once(
+            XENLOG_WARNING
+            "New CPU %u may have skewed TSC and break cross-CPU TSC coherency\n"
+            "Consider using \"tsc=skewed\" to force emulation where appropriate\n",
+            cpu);
         cpumask_set_cpu(cpu, &tsc_sync_cpu_mask);
     }
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel