Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3710330rdb; Wed, 13 Sep 2023 23:24:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKZshHpb7QvzS3ovXkbP4DHia0nW2zp5W8VB7R+Lv8KDRlLbizz6y35DJqfHNgIDgDI5uz X-Received: by 2002:a67:e2c2:0:b0:44d:3f58:c42f with SMTP id i2-20020a67e2c2000000b0044d3f58c42fmr4574076vsm.11.1694672677724; Wed, 13 Sep 2023 23:24:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694672677; cv=none; d=google.com; s=arc-20160816; b=nRhYJTqMEo+/rBTrjGkKW/RS/yW6afwzYOKDMgzv//tRn2ocmgyDVKrOjC9Yesmyx4 RMnIps2I0pA0nN/gp2/gYXYM8WGboKRht1ZxpOrDxm2V18K+jHlMcn8R8CF4dFBxzRsB SxPya2yKhKNuHT0gNH6S9ruZ9kodlht3YlddO2vxQigf+GSfWaAwyvHKY0H7O3exxfWN aGeDvrP60Fd5sUmPizJeOfQsIWt7g9ceSw7gJeoYfk0sOKvpLb+LD1Qklo4hm3nwOZNF 0WHOIseAuPKz7ap+C61Ie5ilJu1S2zjgbskaQ+z2dcVV+RM+w8cbQfJCt2p0MioRbY7w HCnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gcMvJksf6N6kQcsYpN9+R+3L939iGAl7dOjju+SvCks=; fh=X7w0aG1MWlc2x8AEk8nu0/RUzD437zSJWrGq/p9tgTo=; b=b1v74xXxRVxGWvr8Q6qbs4i780j9fXztiOV33sQsNzXta+YVAJg3QbO7zv/qmdx+If gjD3FX+13ZdsGZzuL9Jj/UdxJKdFJlGZQm7Hxz+GAz38xUobnC0Ken/09CqcP0TFSqpo JvNnsiTyLgR9pHRFe8uMVut2VsyMv1LEIkTkroV7sEjaleBw1TH+MxAd2rFA34Ssy//z e/5282541UhKJItPDNxdLvwGFaKqFJHGdFr90VPicPn/m/rF5yvDe6m58brXUqmdIgc3 yWREY+b/DF6OOb+kB4aGlzLUtsPLXBoFvisujBSAS+SMcZGbiExlhJtGaig4ivwDeJ80 GaRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b19-20020a630c13000000b00569561773a6si880841pgl.549.2023.09.13.23.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 23:24:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AD53081143DF; Wed, 13 Sep 2023 23:07:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234291AbjINGHe (ORCPT + 99 others); Thu, 14 Sep 2023 02:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232171AbjINGHd (ORCPT ); Thu, 14 Sep 2023 02:07:33 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5B663DF; Wed, 13 Sep 2023 23:07:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id F063B8088; Thu, 14 Sep 2023 06:07:27 +0000 (UTC) Date: Thu, 14 Sep 2023 09:07:26 +0300 From: Tony Lindgren To: Jiri Slaby Cc: Greg Kroah-Hartman , Andy Shevchenko , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v2 2/3] serial: core: Add support for DEVNAME:0.0 style naming for kernel console Message-ID: <20230914060726.GN5285@atomide.com> References: <20230912110350.14482-1-tony@atomide.com> <20230912110350.14482-3-tony@atomide.com> <4c9c637a-9117-4f43-a64f-892fa33958c1@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c9c637a-9117-4f43-a64f-892fa33958c1@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Sep 2023 23:07:32 -0700 (PDT) * Jiri Slaby [230914 05:43]: > On 12. 09. 23, 13:03, Tony Lindgren wrote: > > +/* > > + * The "console=" option is handled by console_setup() in printk. We can't use > > + * early_param() as do_early_param() checks for "console" and "earlycon" options > > + * so console_setup() potentially handles console also early. Use parse_args(). > > So why not concentrate console= handling on one place, ie. in > console_setup()? The below (second time console= handling) occurs quite > illogical to me. Well console_setup() knows nothing about the probing serial port controller device, tries to call __add_preferred_console() based on a few hardcoded device names and some attempted guessing, and is stuffed into printk.c :) I don't think we should pile on more stuff into printk.c for this. If we wanted to do something, let's set up the console list somewhere else, and then just have console_setup() add every console option to that list and leave the rest of console_setup in place to avoid breaking things all over the place. Then we can export some find_named_console() type function for serial core to use. Or do you have some better ideas in mind? Regards, Tony