Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1005565rdb; Wed, 24 Jan 2024 01:41:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQwQxXQ5HhSteWWVv7r3Zn+P9xjKoVo/vGqZSGS65MAMlJirPPV3CMUPA5pHwc7hsWLhwI X-Received: by 2002:ac8:7dd3:0:b0:42a:42fc:d445 with SMTP id c19-20020ac87dd3000000b0042a42fcd445mr2346690qte.26.1706089277085; Wed, 24 Jan 2024 01:41:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706089277; cv=pass; d=google.com; s=arc-20160816; b=WOfIff51F3jmld3bL17hwOq5y+TGqHH5jcVqzmw/0NlSh8OVYll7FFuk8bnOUfyfZI fuZzuYlGaZy12ONIPJZTDbpiG/4WffYwqbV2g+4WrfIGdbfehf6s8ibk75KG2iB7IGRS FJ7m6OBnszw/Sa705da5Af58OL3w6/dCvhw1K5dsCLqQ7Dgnkc50qljEa1FwWGhCPoDm w3vsy/fMEBJjlY2D+dzVaRglUOSNiF3ph3smSwoLCFeTfmE93PXJ9uYvxQiSo2C0/IXM QSh4TJgy1833X4NJNr71Rffp8LZxfxCIA9vEDx0VRbaFhFIO4qFQgHxHWBv4L/S4yRb1 V9ZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=0nH0pQ4/QHTXj++AgwYVxeag8yUhRFREwHBgcGA8cBw=; fh=9r9dEnw/3HBXWR7ip5o6X+YCKdU88ZZ1yWf67g3Wh14=; b=Khz4MpYU7BYnaP4DingWEuMlj9zF3VNqSR3ZcObTEGiAWQl0IVN067g0/Q9S3B/IAK SJ7k65efr78CqHDt2OcBltrigq9TNl6mXfp/JgVYRezSkeXbDyD0K5gpju3vQl375n45 5H+Ls5xuNyeEz0oqLj8lWgU+n5nFOzigajTGY+34gvzC9EMN4fw8lMNDvaIUbbjIUTNG Ugb7eP8VI2CmJE/o0+w4ON8yCisbURBxzQm6l9L6HRZcd8TaABTJGb8aooH9AZ65ONrF OIHz5hUUPaSguoE2FIKCElu94eODrSNJMYkj4y+UmE41qAq9qgBnK/lNK2AN+vQx7BD4 LNhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lki1T9jI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-36731-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f3-20020a05622a1a0300b0042a4a23643bsi4364391qtb.794.2024.01.24.01.41.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 01:41:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36731-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lki1T9jI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-36731-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B95E71C27636 for ; Wed, 24 Jan 2024 09:41:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE73F1802E; Wed, 24 Jan 2024 09:40:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lki1T9jI"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+JGNhcrN" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75303182A0; Wed, 24 Jan 2024 09:40:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706089253; cv=none; b=cBlXDQRtKiSakfqEPu0oQrP2xpyMfVN+o22VNh/PvD2Z2F2HnMmYGEPW+HYR7UV1OPsZSFMgb2bgzvYzN5mFb+YEqfDR73CDGkHHixXvXhpX5uAOgwREb9YsiADK27tEoK6xZH4mFSOVEg8ppfm/5A8X8IMTDt0qcOn9Hrz+U3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706089253; c=relaxed/simple; bh=0nH0pQ4/QHTXj++AgwYVxeag8yUhRFREwHBgcGA8cBw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ZeQlJklhcnX4W3A+cU/W2YUWUDwOkcWyNtJj1WernfF0XwTYrEwc6JODZRPMJ/3LdB/BwURPiN1Tf9J4QSykboW/as6ztPsE+Czg95joC+sz6uxvTT3NpeI596D23f+V3lztYL5yUlcf6avjkVTnvl6yUlYKHdtUpsol7zhu3ek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lki1T9jI; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+JGNhcrN; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706089250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0nH0pQ4/QHTXj++AgwYVxeag8yUhRFREwHBgcGA8cBw=; b=lki1T9jIapSpv1XcMoYs3pllb6OtT1rHBHnpzlIQuQ+Xa4Gemj/s2yGOF2y4WIM85Knx6P dkpjzMZFzfjbsd+LG6txcIUbddnV8ZWPaSDkB7j4p6RhD1yVb6rlrcblOxieTsN/h1r85R MbSIfTw0VsgJjAkLYOla246osciOB0rXGjskCKS+h6zo0UWHHAtiDIDvT3k9iF33xOkxc+ HHChZ+H1STSS5SdJ+6tyuD8YReAktfq1ioH/VP7z8bex42ZNb9q/N16A8CiyO513B9Edga LiOmDoE8uHoJYEhSf8JBJXidMlwU7gmyF1Ifolbdmigxe51nMcumd1lah0GeoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706089250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0nH0pQ4/QHTXj++AgwYVxeag8yUhRFREwHBgcGA8cBw=; b=+JGNhcrNgARPXqwwMYnChO8weeZBRHkXpUbj3CwVm90koLnrqm+IiBWC/VOt1/kjtIFSHF 3UiJXlq4wlemS9DA== To: Junxiao Chang , bigeasy@linutronix.de, tglx@linutronix.de, rostedt@goodmis.org, linux-kernel@vger.kernel.org Cc: hao3.li@intel.com, lili.li@intel.com, jianfeng.gao@intel.com, linux-rt-users@vger.kernel.org Subject: Re: [PATCH 0/2] nbcon locking issue with v6.6.10-rt18 kernel In-Reply-To: <20240123054033.183114-1-junxiao.chang@intel.com> References: <20240123054033.183114-1-junxiao.chang@intel.com> Date: Wed, 24 Jan 2024 10:46:44 +0106 Message-ID: <87o7db9ihv.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On 2024-01-23, Junxiao Chang wrote: > There are two serial port devices in one Intel ADL hardware, one is > 8250 lpss, another is 8250 dw. Multiple uart devices are enumerated as > ttyS0, ttyS4, ttyS5,... With 6.6.10 rt18 kernel, booting hangs in > nbcon_release if console is enabled by appending > "console=ttySx,115200n8" to kernel command line. According to nbcon > author John's suggestion, lock flag is moved from console structure to > uart_port. Another patch is to add uart_is_nbcon checking in > nbcon_release. Isn't the real issue that the console pointer is copied to device that are not consoles? I am wondering why that is. Is it possible to dynamically switch the console index during runtime? If not, I think a proper fix would be to only assign @cons if it actually registered as a console. This would also simplify the uart_console() macro. It is critical that a struct console is not shared by multiple devices. I do not like the idea (or see the point) of having non-console devices store a struct console pointer that is registered with another device. I will take a closer look at that. John