diff mbox series

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

Message ID 20200106132614.25583-1-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86/smpboot: Use printk_once() rather than opencoding it | expand

Commit Message

Andrew Cooper Jan. 6, 2020, 1:26 p.m. UTC
Shrink the text to be less verbose.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/smpboot.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comments

Jan Beulich Jan. 6, 2020, 3:18 p.m. UTC | #1
On 06.01.2020 14:26, Andrew Cooper wrote:
> Shrink the text to be less verbose.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index a7e7013097..7e29704080 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -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);
     }