Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp152151lqb; Tue, 4 Jun 2024 07:41:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi7GjWedIkB0MsMMQUHuXKhYRck8aNSIA9MdMVz+Oxv2pc5SEsxCzYIOR+c0dHOVDkrAgWgE14W67JdU8R8cVXLs1JBSbcCY999jZR9w== X-Google-Smtp-Source: AGHT+IE41TKBFX6BGJ1IKqpYdYDMLJ5tpnKTMmMXwPl5zKIkBWHlcF6jvwxxbDlrBkSSdz/rWg3C X-Received: by 2002:a05:6870:d6a9:b0:250:191e:aeb2 with SMTP id 586e51a60fabf-2508c04a931mr12874428fac.56.1717512097717; Tue, 04 Jun 2024 07:41:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717512097; cv=pass; d=google.com; s=arc-20160816; b=Z7J2Ik59ddkNBUs8LqnbO+V+TGc31BwJcCDL5RN9Yaj6Z+vi8x91yZIA+s+1XTOKNP MBCEK0Bkm6jjDYTMdwBzM+WEurNfJ6NlwFkUAOU/l5pEFp8WFtYqx4fmpKsokNEaw46W vH5VsnpSEFowKhG3jjRZ2MDoRX6lEMlnuuHjZWb9uLDguZ6skjQPHnQhWCNl5kMtOUhK hjeJvU1GqPmgAv4TC8csYd5TSakBBLzwDh7pH0Bq/cYi4uAPdy1FCYW4AwvSGIeHroBJ 2BGzIiSizr5IKXUp/7XkSaD5oFPoyiAqWfaPGU/WmHIexHH6QUsaishx1zFiOpfN3fYL XaXg== 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=J+by5Tm/TaZ7nDN998nLS7O//I+AWSoayW2SuZ1M9Yk=; fh=7A8ucPQbAdiRJFFZTvFKh2Lw3AZFjtGs3Drix27pIlQ=; b=Q7M531W6Du5Lfh1veuGI3IZh5yMnStU+niyKEXWntDXiVK48b30mWWWTM1gPwBZBDT KInngFfT+VsNPvF9rZKyjFGmtLhEGHGpJSSF6KuQevcIjeggUvJ/qLoGWn9Yv89o7IGk mFNAwVJgOQYaTjKnWXc0zNAt8rIecpqe9aHmVnDA24kIJnG7UFPew5r1NQIdIJa/kOF1 uz9R22xKrM6w/4uSI5851tP0YA31JICiSaUu/cinOYuaHoYL9tQb7FuXqd6gps91a6E9 iyfQBk4ijnlhliHZRTH1OtRy6FIP9qWAFGvYqyquneit42CvHcgsExcRgCm1beeQ0xho RU0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lDoW2IOo; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-200686-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3542e391asi1921879a12.117.2024.06.04.07.41.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 07:41:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200686-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lDoW2IOo; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-200686-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E28442842C4 for ; Tue, 4 Jun 2024 13:18:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36A231465A4; Tue, 4 Jun 2024 13:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lDoW2IOo" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 E45A6144D2E; Tue, 4 Jun 2024 13:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717507082; cv=none; b=MdVa1+ax1LfQu3ko2jbhAcKJrNXDVS84O7tGuQtlcZxckoojYGdOlj7pnHunM90s4yRM7hcD3T+V7JCYrDFW1jKL2RT5My0mXpv0/Z80hJrAtGo/Zi0D77lNOZpzYtWjSrzuTI/fLSKnX8nNLncbFk4ZMVeYFYc6oQIHvBl0RmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717507082; c=relaxed/simple; bh=lH1YSHW+QRtl0PgeKbxOgI/6+SHrKNvBO9ZLRDA4uzw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t5zHCvnQFcX6GttsljEUCvS1BBob5oOZUW6KFdQLa2wx4REExlLWs5myRCjnw5czRlH5l8a/6vY8txzxz5FVWIzU7oIxyvTpY2o1M336V9cE8hR1c6cTWI6sbpIsNuOEjTXF0C1Mfu8INwHx4rSJE9ekJ16wcmc3vFe67oUVC00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=lDoW2IOo; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717507081; x=1749043081; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lH1YSHW+QRtl0PgeKbxOgI/6+SHrKNvBO9ZLRDA4uzw=; b=lDoW2IOoc+MgLuenK33eRCe/PyOyz/o+KvHkp3MT96+44SVO7j3ZJHh/ 3JaDoNK4z5RFvA/b5TndDC5CBBNVHSBTVQTP9GGuzS9aoBqTaCYgE6J8m 40V+IwuZWmSb87eo2CIrMFF9Ge5+5pJ7ZagJ49DN4FjxuuXAr+FFBfiUb FSMq6aN3PcytviqNtRdiV9X+Dvrg1uVLYN51Kun273XeHMKMVo/LG8WKb QeqxD4YpeJOe4O1LLXzOIfVErn5Kxr4E+k0hM9yHa/XSes2XvDg3jEW6A 6tWcYCeC13p9MvchkwC2lYn/k3SztW2c3VTKEnuIbzujRzC71gXcQxf0v w==; X-CSE-ConnectionGUID: H6GjsBv/Q0mYKrWfFnA3yQ== X-CSE-MsgGUID: zBr33mITRBKwbplH7aMNgg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14275845" X-IronPort-AV: E=Sophos;i="6.08,213,1712646000"; d="scan'208";a="14275845" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 06:18:00 -0700 X-CSE-ConnectionGUID: npG3c61kQDeJTyufGWscDw== X-CSE-MsgGUID: x8TPzEm0SRi7mLbo0hmLQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,213,1712646000"; d="scan'208";a="60426903" Received: from unknown (HELO tlindgre-MOBL1) ([10.245.247.168]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 06:17:54 -0700 Date: Tue, 4 Jun 2024 16:17:47 +0300 From: Tony Lindgren To: Petr Mladek Cc: Tony Lindgren , Greg Kroah-Hartman , Jiri Slaby , Jonathan Corbet , Steven Rostedt , John Ogness , Sergey Senozhatsky , "David S . Miller" , Andy Shevchenko , Dhruva Gole , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Sebastian Reichel , linux-doc@vger.kernel.org Subject: Re: [PATCH v7 1/7] printk: Save console options for add_preferred_console_match() Message-ID: References: <20240327110021.59793-1-tony@atomide.com> <20240327110021.59793-2-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: On Fri, May 31, 2024 at 09:54:42AM +0300, Tony Lindgren wrote: > On Fri, May 24, 2024 at 06:06:21PM +0200, Petr Mladek wrote: > > A solution might be to store "devname" separately in > > struct console_cmdline and allow empty "name". We could > > implement then a function similar to > > add_preferred_console_match() which would try to match > > "devname" and set/update "name", "index" value when matched. > > This sounds nice, the empty name can be used to defer consoles that > are not known early. And on console_setup() we only set the devname > for such cases. Yup reserving a slot for a devname console at console_setup() time in console_commandline[] allows keeping the consoles in the right order again :) > To me it seems we additionally still need to save the kernel command > line position of the console too in struct kernel_cmdline so we can > set the preferred_console for the deferred cases. Then with the command line consoles in the right order, there's no need to save the position separately. And I think then we can also revert commit b73c9cbe4f1f ("printk: Flag register_console() if console is set on command line"). But I need to test the fixes some more before sending out. Regards, Tony