From patchwork Sat Jan 4 01:58:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Mukhin via B4 Relay X-Patchwork-Id: 13926044 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 A530BC02185 for ; Sat, 4 Jan 2025 01:58:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.864710.1275991 (Exim 4.92) (envelope-from ) id 1tTtQm-0006JW-PI; Sat, 04 Jan 2025 01:58:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 864710.1275991; Sat, 04 Jan 2025 01:58:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tTtQm-0006Hf-7z; Sat, 04 Jan 2025 01:58:24 +0000 Received: by outflank-mailman (input) for mailman id 864710; Sat, 04 Jan 2025 01:58:21 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tTtQj-0005Ax-Q6 for xen-devel@lists.xenproject.org; Sat, 04 Jan 2025 01:58:21 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5dd06576-ca3f-11ef-a0de-8be0dac302b0; Sat, 04 Jan 2025 02:58:18 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1F7205C61A0; Sat, 4 Jan 2025 01:57:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 2F862C4CEDF; Sat, 4 Jan 2025 01:58:15 +0000 (UTC) Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 258D1E7719A; Sat, 4 Jan 2025 01:58:15 +0000 (UTC) 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: 5dd06576-ca3f-11ef-a0de-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735955895; bh=WkgpINAi4NmXbCPyfSBPSjKkxNTDWSdwSg5wm9hn06Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=H9zfqAfx2RSRbi2EMUVSUK5A5YOdctvF9wzXgaRtutupZJbIU2q2d8AbEzvPTLyQ3 xBtuOwtfuHSO9BCbRcpqL13I5m3lIuSKDBhhcvRQ61SFzRTB3A5Z4lGOsmLXX2PyrK A5mHdUnmnJVhFcx9Nw7Zh+ApfuGjWuwrdafH0q3tGQsrtLyCXZKJ+clySk3PJOdmDq jyyCEvxnykvwyU4Ja+BNljO44nCTjVLnUyuduJK2oQLVUyVFZ9Gvbp85ObWGdR3k5t X9XfdkHs1SuM2shblGWjSiiX6XsDLSjifDP6GUwcasEMmBJaNpFdh7ZsH/Kf4mCBeu wDa82EC6J8jlQ== From: Denis Mukhin via B4 Relay Date: Fri, 03 Jan 2025 17:58:14 -0800 Subject: [PATCH v3 08/24] xen/console: rename switch_serial_input() to console_switch_input() MIME-Version: 1.0 Message-Id: <20250103-vuart-ns8250-v3-v1-8-c5d36b31d66c@ford.com> References: <20250103-vuart-ns8250-v3-v1-0-c5d36b31d66c@ford.com> In-Reply-To: <20250103-vuart-ns8250-v3-v1-0-c5d36b31d66c@ford.com> To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Michal Orzel , Andrew Cooper , Anthony PERARD , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Denis Mukhin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1735955892; l=1473; i=dmukhin@ford.com; s=20241125; h=from:subject:message-id; bh=VlrDmVYSUYYEG2sJ1u5nbMuy01Nt/S2plh2q6DJ+BIw=; b=S1s8vEh//WnTsVDQMRNzdQ8IrNEV/vZqF5vI012/k7AeJFUsj7kHlwgXqm6tbP8iH+pQoIZMm eh6s4rBUInzDHPPpwvMdJSQgTovGbPH5QGbGKna4mP/7Vse5daRUn15 X-Developer-Key: i=dmukhin@ford.com; a=ed25519; pk=SsDZ9p39s0fqcpUKQuqKqrbn0rq6EtEAClvpOpzx6+U= X-Endpoint-Received: by B4 Relay for dmukhin@ford.com/20241125 with auth_id=287 X-Original-From: Denis Mukhin Reply-To: dmukhin@ford.com From: Denis Mukhin Updated the name to highlight the physical console input selection logic: existing code does not switch only serial console, it also switches debugging console (debug I/O port and console hypercall). Signed-off-by: Denis Mukhin --- xen/drivers/char/console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 0927c0564a67098c70dab576ebeda3825fadfb61..48866cf47beda39e48a7774277238273566382b1 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -486,7 +486,7 @@ void console_put_domain(struct domain *d) rcu_unlock_domain(d); } -static void switch_serial_input(void) +static void console_switch_input(void) { unsigned int next_rx = console_rx; @@ -577,7 +577,7 @@ static void cf_check serial_rx(char c) /* We eat CTRL- in groups of 3 to switch console input. */ if ( ++switch_code_count == 3 ) { - switch_serial_input(); + console_switch_input(); switch_code_count = 0; } return; @@ -1117,7 +1117,7 @@ void __init console_endboot(void) "toggle host/guest log level adjustment", 0); /* Serial input is directed to DOM0 by default. */ - switch_serial_input(); + console_switch_input(); } int __init console_has(const char *device)