Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp254629rdh; Tue, 13 Feb 2024 16:23:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU2KGG6ZErtT6YowHrVwvLCUtpjGObF/rLuX60M6jvCw0MtgNgx+ElpuG1aUaDkzMnqbyQVmRG25XWu5QmVqSd6QJVEhtOTmtS+/u1XIw== X-Google-Smtp-Source: AGHT+IGGS+ZY9jlJQ7oYUayC5JBKU3xEwK49MqeFzZT+mCVH1TRsbXMNmhhd2sm5IPdhBLuuVLeC X-Received: by 2002:a62:ac0a:0:b0:6e0:71bd:3322 with SMTP id v10-20020a62ac0a000000b006e071bd3322mr1076595pfe.10.1707870185849; Tue, 13 Feb 2024 16:23:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707870185; cv=pass; d=google.com; s=arc-20160816; b=L1qb9hQxnRmZxF6NZleVe29Knj9ykCqHuAZ5yLqGkiGE2otqShpEsi0/K/QnYnOSPu FTFPpKq3ODJQ2jx8hOoLbTFwDoXU/92ZwWGUmg1FceAe9tnu1TOidCkSQ/MHRBwNDGAg k29pfEo866pKU6DYbRJ5jckJLlp31g3S8HTTYBv7XCY67pwRQ5n3B9cnU2m61Oai1GgF aqrHRwm/IgFEGWmlPcYtKVV9BWj6gbjrOkldfne+Yieps1WhzJJjqh36rYMkevWF8BmY dRo690/KoHUSCEh+3MZZxAkDbqnw3CbTwez8eTyb9LwZN0LHSEvL2bkQ/VuOuT7/P8W0 LDlw== ARC-Message-Signature: i=2; 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=gd7PL4pju18jwKXgI1NQsRQGjQa9F3GWPLPPcdHJJl4=; fh=isss3qIlHT+OKBmszlRbRHECzSQsaeAvt7haxvgcQBk=; b=C1wHGhuSgpmqnk3Jb0UJ7tUx6QzY1TWbN8l6dLYpYcLq/alGZ/uqqyXS3ZHGU2CL5a gRYhzlby34pv4t5CCVFpvhQtN3igIQafzA97DZMGxyLjabhHTchmpkm8NN1ZfevHNak2 U4x5m7hRZHY4DVTaDRtCH7UXhAhLNgri1xa7fKlErBcUWNTMXL4BOw/z5sMN/YKpByoc 1d0d7Vzrc5j6DCmskxp01q9TI+FOAEC7tGWT5+J+rAe8oOGZPMAP5Sts/A/uzDoiF8vh kx/2AwhR8WmA+j845RQmlo61ZH+g3eEtYSA3+LjsjPkcrELr2C7olF/gzV1g1LNmb3C7 VCUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="R/5GHkPC"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64585-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUldfDXApa9Op2xL9GjOq/YVOlJXXcmWHLspcUit7v7Jn22JYIzt+Wu0cOeNg7QFvLMNxS+9OWG9WB3klbvqAECTQRuuhDMXbbLkNlyDw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i123-20020a62c181000000b006e07c7c4eadsi7479973pfg.129.2024.02.13.16.23.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 16:23:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64585-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="R/5GHkPC"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64585-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 91D0DB29B0E for ; Wed, 14 Feb 2024 00:00:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8024464A8E; Tue, 13 Feb 2024 23:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R/5GHkPC" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A10B369D2D; Tue, 13 Feb 2024 23:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707868692; cv=none; b=SwJ/FLW+nndpmdHPmuXXeOULZ7g6xdtcG+fyOUqhydAR1mQq9RDQEVb8zuDipBt1DKzYgViL3x1NfOtUcV0B/trOhO0o7/3LCTNb0LSRHVG6qxRH/+T/PmUk+18DoanTcHSXDrfMhXwoXq9f2dEK0WYFKn2wTrUL2EU26T0XSrY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707868692; c=relaxed/simple; bh=gNqNSc2uf6gFYuN9ZBm4KIxHP1qZmB6TQVFDZVxZC3Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZAhicaOyGWgUVxD+4gAQiq3iwLwcCOS860rUNFaIijPUnUXUii9INA/7Whz+3XUcrw/CMGv/7pSIvuUhvGgHFXPqRcdjhej/L9x1J4UVGTVdh4OCgKSfro0tBr6GUc4e0W6P16n56m/3GNp2jfuucVFMmEa1aGKGAa8q5DiQ64g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R/5GHkPC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC8C4C433C7; Tue, 13 Feb 2024 23:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707868692; bh=gNqNSc2uf6gFYuN9ZBm4KIxHP1qZmB6TQVFDZVxZC3Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R/5GHkPCttL6z0RfSJrW5H17w2Bo+fpdUaCfIdqb0Xb9UV3PHHBzIS0DGbiuehz0X qU5PRq7oQgJv0z6E5VDh5FvGXTh+azQCwx3AjSxOrKXixZ3qvnQvNRhH0Urv+0OsZz M7pFG1lWRbCO9iGA3hj4yk+Rzygz9cTHb2eSf8zcR2C6TcFUE8MY2tLO+VQmjwAjd0 o2OYchSxIT6d0dYH63S8J6ncIYRzp1atQ6prUPAXz9n5BECMJLlyPuhOWzhR9mUjRx RDmk61rwMx/RZP5Gn3UgpuKnmeCkB0WVoYT3wzgmmb9DrMv+S4MF1gok0he/CQ4cr6 5P8BwM+z+SpfA== Received: by mercury (Postfix, from userid 1000) id 55B4D1061C38; Wed, 14 Feb 2024 00:58:09 +0100 (CET) Date: Wed, 14 Feb 2024 00:58:09 +0100 From: Sebastian Reichel To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , "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 v6 4/6] serial: core: Add support for DEVNAME:0.0 style naming for kernel console Message-ID: References: <20240213084545.40617-1-tony@atomide.com> <20240213084545.40617-5-tony@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: <20240213084545.40617-5-tony@atomide.com> Hi, On Tue, Feb 13, 2024 at 10:45:11AM +0200, Tony Lindgren wrote: > We can now add hardware based addressing for serial ports. Starting with > commit 84a9582fd203 ("serial: core: Start managing serial controllers to > enable runtime PM"), and all the related fixes to this commit, the serial > core now knows to which serial port controller the ports are connected. > > The serial ports can be addressed with DEVNAME:0.0 style naming. The names > are something like 00:04:0.0 for a serial port on qemu, and something like > 2800000.serial:0.0 on platform device using systems like ARM64 for example. > > The DEVNAME is the unique serial port hardware controller device name, AKA > the name for port->dev. The 0.0 are the serial core controller id and port > id. > > Typically 0.0 are used for each controller and port instance unless the > serial port hardware controller has multiple controllers or ports. > > Using DEVNAME:0.0 style naming actually solves two long term issues for > addressing the serial ports: > > 1. According to Andy Shevchenko, using DEVNAME:0.0 style naming fixes an > issue where depending on the BIOS settings, the kernel serial port ttyS > instance number may change if HSUART is enabled > > 2. Device tree using architectures no longer necessarily need to specify > aliases to find a specific serial port, and we can just allocate the > ttyS instance numbers dynamically in whatever probe order > > To do this, let's match the hardware addressing style console name to > the character device name used, and add a preferred console using the > character device name. > > Note that when using console=DEVNAME:0.0 style kernel command line, the > 8250 serial console gets enabled later compared to using console=ttyS > naming for ISA ports. This is because the serial port DEVNAME to character > device mapping is not known until the serial driver probe time. If used > together with earlycon, this issue is avoided. > > Signed-off-by: Tony Lindgren > --- I would expect an update to the console= section in [0] somewhere in this series. [0] Documentation/admin-guide/kernel-parameters.txt Greetings, -- Sebastian