From nobody Mon Feb 9 08:58:05 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1564654487; cv=none; d=zoho.com; s=zohoarc; b=TZviAG/8qyQecBUTsk8h7CwtGvI4gY+UDn3SB4Cy5GpUi6Botq+LsUQwfKjIMsS2GHV8b9HMb/cdUiJY/oE72NmoJATU5JSIGKeq8yyMWMmLd867tIb2c86Za1JkxbS9XgrIZW4KYbPEnq3hwkpm7XulQZKAmUGcvjS39vPuJSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564654487; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vFwIygMXcHUMMVi7Zv/laYZ0uhHUGVNfBt6/tI/475c=; b=Zoc9JHzfEo+kyC68eZbOxlBY4Er4vHNf1vPdAXO4+ubz6QvZWMb7v5EgE2l61wHueBsgd+Iil15kiSpmrIIYle+nPB2ughUhD34wol2skXw1Cyit0Zdxy7Wfaq5I4PPUb/5gQ9SyQ4E1RTKloyX64j3FAEb0HhgRBSTDrMYEJpo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564654487207463.4049030045512; Thu, 1 Aug 2019 03:14:47 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ht85c-00014N-M1; Thu, 01 Aug 2019 10:13:40 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ht85b-00013s-D6 for xen-devel@lists.xenproject.org; Thu, 01 Aug 2019 10:13:39 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 06ac6d27-b445-11e9-8980-bc764e045a96; Thu, 01 Aug 2019 10:13:37 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9185AB602; Thu, 1 Aug 2019 10:13:36 +0000 (UTC) X-Inumbo-ID: 06ac6d27-b445-11e9-8980-bc764e045a96 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Thu, 1 Aug 2019 12:13:30 +0200 Message-Id: <20190801101333.9821-2-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190801101333.9821-1-jgross@suse.com> References: <20190801101333.9821-1-jgross@suse.com> Subject: [Xen-devel] [PATCH v2 1/4] xen: use common output function in debugtrace X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Today dumping the debugtrace buffers is done via sercon_puts(), while direct printing of trace entries (after toggling output to the console) is using serial_puts(). Use sercon_puts() in both cases, as the difference between both is not really making sense. In order to prepare moving debugtrace functionality to an own source file rename sercon_puts() to console_serial_puts() and make it globally visible. Signed-off-by: Juergen Gross --- xen/drivers/char/console.c | 16 ++++++++-------- xen/include/xen/console.h | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index d728e737d1..49fbbed21a 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -346,7 +346,7 @@ void console_giveback(int id) serial_steal_fn =3D NULL; } =20 -static void sercon_puts(const char *s) +void console_serial_puts(const char *s) { if ( serial_steal_fn !=3D NULL ) (*serial_steal_fn)(s); @@ -389,7 +389,7 @@ static void dump_console_ring_key(unsigned char key) } buf[sofar] =3D '\0'; =20 - sercon_puts(buf); + console_serial_puts(buf); video_puts(buf); =20 free_xenheap_pages(buf, order); @@ -548,7 +548,7 @@ static long guest_console_write(XEN_GUEST_HANDLE_PARAM(= char) buffer, int count) /* Use direct console output as it could be interactive */ spin_lock_irq(&console_lock); =20 - sercon_puts(kbuf); + console_serial_puts(kbuf); video_puts(kbuf); =20 #ifdef CONFIG_X86 @@ -669,7 +669,7 @@ static void __putstr(const char *str) { ASSERT(spin_is_locked(&console_lock)); =20 - sercon_puts(str); + console_serial_puts(str); video_puts(str); =20 #ifdef CONFIG_X86 @@ -1182,11 +1182,11 @@ static void debugtrace_dump_worker(void) =20 /* Print oldest portion of the ring. */ ASSERT(debugtrace_buf[debugtrace_bytes - 1] =3D=3D 0); - sercon_puts(&debugtrace_buf[debugtrace_prd]); + console_serial_puts(&debugtrace_buf[debugtrace_prd]); =20 /* Print youngest portion of the ring. */ debugtrace_buf[debugtrace_prd] =3D '\0'; - sercon_puts(&debugtrace_buf[0]); + console_serial_puts(&debugtrace_buf[0]); =20 memset(debugtrace_buf, '\0', debugtrace_bytes); =20 @@ -1267,8 +1267,8 @@ void debugtrace_printk(const char *fmt, ...) if ( debugtrace_send_to_console ) { snprintf(cntbuf, sizeof(cntbuf), "%u ", ++count); - serial_puts(sercon_handle, cntbuf); - serial_puts(sercon_handle, buf); + console_serial_puts(cntbuf); + console_serial_puts(buf); } else { diff --git a/xen/include/xen/console.h b/xen/include/xen/console.h index b4f9463936..041522692f 100644 --- a/xen/include/xen/console.h +++ b/xen/include/xen/console.h @@ -46,6 +46,9 @@ void console_giveback(int id); int console_suspend(void); int console_resume(void); =20 +/* Emit a string via the serial console. */ +void console_serial_puts(const char *s); + extern int8_t opt_console_xen; =20 #endif /* __CONSOLE_H__ */ --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel