Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp84597rdb; Sun, 17 Dec 2023 22:49:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhfvFaT5LP3CWPnpUKa5/7HVgGSQgCS4z+NZlocRGcsC5IsVlYQuyrH6l1AbgFfZErznto X-Received: by 2002:a17:906:c2d2:b0:a23:6462:4d60 with SMTP id ch18-20020a170906c2d200b00a2364624d60mr73015ejb.9.1702882170167; Sun, 17 Dec 2023 22:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702882170; cv=none; d=google.com; s=arc-20160816; b=r1s4+ajxRa76mDLUARcoiiHZ3Ww37RYJCQ5Nh5txbNP5BiSX4kaon8RasD21y8Dg3f K9LSYfRA4uRZnEXmFpf6OoiQzJLDNHdSLbt2DHE/lwnndBdsBlXxFhsA5W/cLL1d6S2L 3EzNYp1M/8o1HW+FWfcaFHfcENVsK4LZYEm+C6B28qMpKUgFFOwE1+/I9XXVJPs0bF+u 4cQDMM3FyibuTl3bPVX9vwqR9aR4FS+UCXry+1kkUAj0PT4VN2m60DHfzbhlfW+2q8Re KRt4wo3pnMr6xWk3tKwcxsvv6E/DRFnF/zKD0iIjUTTOPsvT9v+SICihzd66vv3OCbtH wOIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gIRzJDVQ/dPitdE6fmHWIhrhRZwWpCfX7sgm2WFZFAo=; fh=zXMHlSRyhZgSiSOYiHZv+WPFjyASzXDy5hFhdXImaMQ=; b=epUOO5mrHN4MO91/T7I8IjIBhGGoXa73wfyO80K7fV9DEJBgIVWJIwpJjT6pIuSP8d 1pLZvgs4VJr9RYP6zgr7+J0iZ9ecM7Pwptd6BRTj3KdtCO7AlqXU0jnVZvms+kctaGOq BG3ZKoZQ6r+lxbs3dqL3Bf0Tzl+eQiHpG8GhtI8P6ZiCdPPbg3Df/DJJoTvGQt/H5M9A pVrlYhP9bhzi55RvUZzBEmf+sAac9yGskfwQmnIbB/yNEeKhsDxDB+jBptnofX/a3yGK uud69yFzBs7f0OfF63BLkVIlQjLFTVzNI3ZHfEscukJ0wAD/8S8QUMHChSSyd7K8EDQm oUUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atomide.com header.s=25mailst header.b=Oz3efwNp; spf=pass (google.com: domain of linux-kernel+bounces-3059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3059-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ks10-20020a170906f84a00b00a23136ac0a0si3305535ejb.883.2023.12.17.22.49.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 22:49:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@atomide.com header.s=25mailst header.b=Oz3efwNp; spf=pass (google.com: domain of linux-kernel+bounces-3059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3059-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id E471B1F22ABD for ; Mon, 18 Dec 2023 06:49:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B3957475; Mon, 18 Dec 2023 06:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="Oz3efwNp" X-Original-To: linux-kernel@vger.kernel.org Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) (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 DE6736FD6; Mon, 18 Dec 2023 06:49:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=atomide.com Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 094486034F; Mon, 18 Dec 2023 06:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1702881550; bh=GLn3ZdId44kKuoXDyTPyXwA7XHwYr/rDf/W6Y2K7uH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Oz3efwNpCCA2yRrD/l/kGm7l3o8CjWsdxkkWABTbImDluEBBjnV5tkkGORMYkhSfX EVYHCRASKXoo1zFtCzMrowtfc3KRA1VeRBq6WaFwGHqdqQKG6VQqSOQkYMTSacaj8E tGLqBor/xOnkbA73lM9p5CvhcSJXQMu8cW/gsI0pUKv0d9bYBnTeejmyODz0k/25Qu +VVHfeeo8osQ7l5gNt8f8rIktOcSApZ0pKFAawDKgY/7BcE7pAEDiwMyOlyBJ/l1gC YP8hTEYGdM1oOGazWLAzFN0nK+tcaauota9MQ4JWxOgMDOO4dX4zQp/SEW/0G+MOd5 4L8mzZJPEfB1g== Date: Mon, 18 Dec 2023 08:38:37 +0200 From: Tony Lindgren To: Greg Kroah-Hartman , Jiri Slaby , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky Cc: "David S . Miller" , Andy Shevchenko , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v4 0/4] Add support for DEVNAME:0.0 style hardware based addressing Message-ID: <20231218063837.GS5166@atomide.com> References: <20231205073255.20562-1-tony@atomide.com> <20231205074557.GM5169@atomide.com> <20231208082832.GV5169@atomide.com> 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: <20231208082832.GV5169@atomide.com> * Tony Lindgren [231208 10:29]: > * Tony Lindgren [700101 02:00]: > > * Tony Lindgren [700101 02:00]: > > > We also prepare the serial core to handle the ttyS related quirks done > > > in console_setup() to prepare things for eventually dropping the parsing > > > from console_setup(). This can only happen after further changes to > > > register_console(). > > > > Petr FYI, so for dropping the console_setup() parsing, below is a hack > > patch to see what goes wrong in register_console() if you have some ideas > > on how to handle this. > > > > We end up with the console device backed up seria8250 instead of ttyS0, > > and earlycon won't get properly disabled. And of course other consoles > > beyond ttyS need to be also considered. > > Hmm so the following extra patch seems to fix the issues based on light > testing. But is it safe to assume that if CON_PRINTBUFFER is set we can > disable the bootconsole? OK so no need for the CON_PRINTBUFFER change, it's wrong. I found a few bugs causing this issue and a lot of other confusion while testing: - In console_setup(), a DEVNAME:0.0 style console can get added with the IO address turned into a ttyS console with some crazy index :) So we need to bail out early on consoles with ':' in the name. - The brl_opts can be empty or NULL, but we need to pass NULL to __add_preferred_console() to get CON_CONSDEV flag set for DEVNAME:0.0 console. Otherwise the preferred_console won't get set and the boot console won't get disabled. - The console_set_on_cmdline flag needs to be set if console_setup() does not call __add_preferred_console() for DEVNAME:0.0 style console as otherwise try_enable_default_console() may get called before the console handling driver has added the preferred console. I think with these the remaining issues are sorted out :) I'll post a v5 set with as RFC as it's getting close to the merge window. Regards, Tony