From patchwork Fri Mar 17 19:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 13179417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE858C74A5B for ; Fri, 17 Mar 2023 20:21:14 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.511234.790230 (Exim 4.92) (envelope-from ) id 1pdGZX-0006I8-4f; Fri, 17 Mar 2023 20:21:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 511234.790230; Fri, 17 Mar 2023 20:21:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pdGZX-0006I1-06; Fri, 17 Mar 2023 20:21:07 +0000 Received: by outflank-mailman (input) for mailman id 511234; Fri, 17 Mar 2023 20:21:05 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pdGZV-0005tD-OG for xen-devel@lists.xenproject.org; Fri, 17 Mar 2023 20:21:05 +0000 Received: from mailhost.m5p.com (mailhost.m5p.com [74.104.188.4]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3d3f5b73-c501-11ed-b464-930f4c7d94ae; Fri, 17 Mar 2023 21:21:04 +0100 (CET) Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.16.1/8.15.2) with ESMTPS id 32HKKrE6065914 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 17 Mar 2023 16:20:59 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.16.1/8.15.2/Submit) id 32HKKrcV065913; Fri, 17 Mar 2023 13:20:53 -0700 (PDT) (envelope-from ehem) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3d3f5b73-c501-11ed-b464-930f4c7d94ae Message-Id: In-Reply-To: References: From: Elliott Mitchell To: xen-devel@lists.xenproject.org Cc: Jan Beulich Cc: Andrew Cooper Cc: =?unknown-8bit?b?IlJvZ2VyIFBhdSBNb25uw6kiIDxyb2dlci5wYXVAY2l0cml4LmNv?= =?unknown-8bit?b?bT4=?= Cc: Wei Liu Date: Fri, 17 Mar 2023 12:45:41 -0700 Subject: [PATCH v2 1/2] x86/APIC: include full string with error_interrupt() error messages Rather than adding ", " with each printf(), simply include them in the string initially. Signed-off-by: Elliott Mitchell --- xen/arch/x86/apic.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index f71474d47d..8cfb8cd71c 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1401,14 +1401,14 @@ static void cf_check spurious_interrupt(struct cpu_user_regs *regs) static void cf_check error_interrupt(struct cpu_user_regs *regs) { static const char *const esr_fields[] = { - "Send CS error", - "Receive CS error", - "Send accept error", - "Receive accept error", - "Redirectable IPI", - "Send illegal vector", - "Received illegal vector", - "Illegal register address", + ", Send CS error", + ", Receive CS error", + ", Send accept error", + ", Receive accept error", + ", Redirectable IPI", + ", Send illegal vector", + ", Received illegal vector", + ", Illegal register address", }; unsigned int v, v1; int i; @@ -1423,7 +1423,7 @@ static void cf_check error_interrupt(struct cpu_user_regs *regs) smp_processor_id(), v , v1); for ( i = 7; i >= 0; --i ) if ( v1 & (1 << i) ) - printk(", %s", esr_fields[i]); + printk("%s", esr_fields[i]); printk("\n"); }