From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D749D3FD957 for ; Tue, 18 Aug 2026 07:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787039514; cv=none; b=vEq0z44TIY1kZQjJorWiBxkNHNEWriO9Jb0EsbLcydizKNm9u7Vt6SK8Au49kGHdArAzLn1gtsxdCrKBKbsmR9Y2Swqd6YlaVwf+PvAWNa7PyHW+kC7lh8sc6kBh5ZYGTgoCrb4+0SkYrmO8omnn/DofUNfdg+gvPSxCab3iuVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787039514; c=relaxed/simple; bh=+TL5RIW1sQcLdmF+sEaMUOxeOhPPrZWABcWxG3wJ7Ww=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ruy/8rPURXATFTgC79Zlz1OXRvbOO7OTq2HEAvq/70Rpnd+4u5dbKZXewojaa6eEINngrPlztl4QoSeiQwsJvUFRWmqDZNGGpPL5sWIq/xS3F766YWyysbkbsrUizqFqXpv5U4RtO/AB6P5v/HsGSzN4sB44xYg4LyqjiTO9Y/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=A5OVMKRN; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="A5OVMKRN" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-49954b88fffso48092625e9.0 for ; Tue, 18 Aug 2026 00:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1787039511; x=1787644311; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ytGWt1YRdjzr+JNfsHCwKEMc0toTnk6HqTBPGuje0Qk=; b=A5OVMKRNR3xo1amzcd6bPhweBWXyhU3+TCk7p8AjVbXW2ZL3UL3Ft6BFOetny3kJW3 xige7m5BAZ9xjk3xaUQOfrUik3KIQ8Md7JWzUUSo7vZUAIGNDZ08HLxAxhBmBy4J3M83 D/Wk7Ed9Bp1x8rQJqDSjt/9pw9b46qSmwkLgOe4WhmVPXZNAtuJJ3lbWGuoJqS5Df8+i A+Nol7l7a5DxUhwYRSuVbmyvIqEPnKq5D1xIKpzxUzDHOfgt5HWLi644X5nYNs5Nb/jB Eu3FR3CgxS/OQYD6xxFDnHMlAJYq0spDvchewJVbbQSEbKVFaJJpNY4fldhPfDkGy0Qm bMrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787039511; x=1787644311; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ytGWt1YRdjzr+JNfsHCwKEMc0toTnk6HqTBPGuje0Qk=; b=nETuxfGNmzKSxiOv/lrqof8WIcclnGt63bC/Pc+I/F+GwJdZZey53+UQHitjUlhjX+ THHXbGyAW1jwACXYrbeBtFOQ5WH1SiaBstuP3Av0rLEZmHCnzWaOGTiDEqkXDMi0rYGn 3nifdOHkWoEnDLO5Qi2XLoDhyLUsE7f0JbROfnk7iv+8idrz4XNkKJZdEwOwMemS5WPj ZQ9AmYy1j4BxHUM5S7ORRZ04QF9cQpFZNXaYjkfsAdat/uhJT1fBctkqrvH0GqtTSOKu FmB+LbclTnCONX21P4l5UxThIQneQd1th+YJYi94xZv76ToO/DuWuepWg/hjA9FHrkjz anwA== X-Forwarded-Encrypted: i=1; AHgh+RoQp9X4kkzFRtArPWGd/NRr8xH+mh/NsDmMQauO4ZGj4kLvJ0bYGmU8puu8ovUgpwi2vDUsoZOdnI0q9DQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxBssOaKqfrvftpPfz2JobR4F0w+xjMpscxr7yFmgN1mkqh+0Zo hCTXpVJgrChXU4FUIZXDrj+SQ2GKG9Q+M8ZRpRnRpLHUp9XO9jJ/sMOUoFguv5QSOJIWo0ZtFmZ nrtp2KVg= X-Gm-Gg: AR+sD11/yMYQOV7RdSHIUpx6d265m9tn9K2zUbgZXB+y8LT6Uayw2cw3pBxCZiDnIzU R+wW9LcMsvK51T6hmVjcWxq76lm4JBOV9M07OpsmiJJJbQiJqEtDQgk/TSJnJTDeJs2beCKEi3L KMEgA2xN3Mwt2eIfDb8xxKPQx/ePrMnaUZw6TKG1RaFCJkA01DCjYnDBL2acchGiNw8tlwj7ZJD zFjzMI7/XPNDQKXbxR8ZUwsNPYFPAUmQMXNwkH/kdrTQo1lO4VQko3ntiCxoimRt5eQBkFVSag0 7vcJKlIAJqS2Wkdntt7M2PPgDa9/EeIsLy0naCK8UT252BvaAKYixl7ZAOwDrlThKpw4tDo4cLr ld1J/xgAT/5BvSm7MbzMNxU3zacdwLevTCpqTqaHMj1gAA/9UcueOjyFceuQFCSDSwLgov4KA5G V/iVL7VyzE38h4214UXfvoQ/KpWGeEghPNgg17z6Xk2I2HkDSDkluKVWboN7JoQA== X-Received: by 2002:a05:600c:628c:b0:499:87f3:a2a3 with SMTP id 5b1f17b1804b1-49987f3a33emr537700105e9.15.1787039511205; Tue, 18 Aug 2026 00:51:51 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482a5b77f41sm9298971f8f.27.2026.08.18.00.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2026 00:51:50 -0700 (PDT) Date: Tue, 18 Aug 2026 09:51:48 +0200 From: Petr Mladek To: Jon Hunter Cc: John Ogness , Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Andy Shevchenko , Hugo Villeneuve , Kees Cook , Stepan Ionichev , Xin Zhao , Osama Abdelkader , Fushuai Wang , Marco Felsch , linux-serial@vger.kernel.org, "linux-tegra@vger.kernel.org" Subject: Re: [PATCH tty v11 1/2] serial: 8250: Switch to nbcon console, take 2 Message-ID: References: <20260729120439.281252-1-john.ogness@linutronix.de> <20260729120439.281252-2-john.ogness@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; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue 2026-08-18 07:25:13, Jon Hunter wrote: > Hi John, > > On 29/07/2026 13:04, John Ogness wrote: > > Implement the necessary callbacks to switch the 8250 console driver > > to perform as an nbcon console. > > > > Add implementations for the nbcon console callbacks: > > > > ->write_atomic() > > ->write_thread() > > ->device_lock() > > ->device_unlock() > > > > and add CON_NBCON to the initial @flags. > > > > All hardware access in the callbacks is within unsafe sections. > > The ->write_atomic() and ->write_thread() callbacks allow safe > > handover/takeover per byte and add a preceding newline if they > > take over from another context mid-line. > > > > For the ->write_atomic() callback, a new irq_work is used to defer > > modem control since it may be called from a context that does not > > allow waking up tasks. During suspend/resume the irq_work is not > > used as this has been shown to cause suspend problems for some > > hardware. Upon resume, any pending modem control is performed. > > > > Note: A new __serial8250_clear_IER() is introduced for direct > > clearing of UART_IER during console writing (which will not be > > holding the port lock for atomic printing or KDB/KGDB). This > > allows restoring a lockdep check to serial8250_clear_IER() in > > a follow-up commit. > > > > Signed-off-by: John Ogness > > I accidently responded to V9, but responding here with the same report for > completeness. > > This change is causing a boot regression for our Tegra20 and Tegra30 > platforms. Reverting this on top of -next fixes the issue. Previously with > V5 I did not see a boot issue only an issue in suspend. So far I have not > had chance to dig any further. Interesting. Another clue, mentioned in the v9 thread [1], is that the boot regression does not happen with v11 when "keep_bootcon" option is used. The "keep_bootcon" option causes that the boot console driver stays registered even when the full featured driver gets registered later. The most important effect is that the printk kthreads can't be used as long as any boot console driver is registered. All drivers need to be called in the legacy loop in this case. There are two reasons for this: 1. Boot console drivers are synchronized only by the legacy console_lock (console_sem). port->lock is available only for the full featured driver. 2. There is no easy way to match boot console and full featured console drivers working on the same HW. So, the regression seems to happen when the printk kthreads start being used. Jon, could you please share the full log when "keep_bootcon" is used? [1] https://lore.kernel.org/all/20260724103654.133654-1-john.ogness@linutronix.de/ Best Regards, Petr