Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp838483rdh; Thu, 23 Nov 2023 21:57:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/VzeEnCvxxo+rL86m2DTO0j0UFR1m30Wjs0BQi9w5AKZ41fdAgMfO8f63ErYonAaD8QoK X-Received: by 2002:a05:6870:56a0:b0:1eb:192b:e75b with SMTP id p32-20020a05687056a000b001eb192be75bmr2100114oao.40.1700805476492; Thu, 23 Nov 2023 21:57:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700805476; cv=none; d=google.com; s=arc-20160816; b=GDB1MdmjjpMUAYVOVtMEXatlklPMk4MTXX6N0N8UB1glzuJ2E97NE3ekJt/zgDPJmd GqQ0jt5dGWKDdpCeaUwvePD9w5Bgb6GzWDP+ktVvg3JegV0v1CBpI6PsI1/q6zLqG5mR u15TY4vSzGt1+XEE2QsqW6MlVZf5L436y52Qmuj2uCdY7uTaXdDCnsOzdwPtVOE80j4p 09DZbzFqmvx/6+4aLljsnMbuzvMUEYl0bjhMxwaL2dEg4h9byi3unFSEt0COsT8/Y//8 HLtDrKgbjWqhQIGOrEBxJbcNKVExlWbXJegFuuin4ef429rI6TwWZO0JSwgfTboYdYWg HlpA== 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:dkim-signature; bh=1suoi2gyv5PRh6qL31Ds7Nv+kaqwv5TM7ZHK90d5Huk=; fh=zXMHlSRyhZgSiSOYiHZv+WPFjyASzXDy5hFhdXImaMQ=; b=Y/YSlFmUgAjnBV/lKo/JtUcFbmYEIZHrkEMJAe+wELjChWQHz3zCsFOJlPHzmW03Xf 3yUqiZlmVrY20oSgzoWEllGwfwdmfUm0FnyxTULNTr10PX9B6Qte6BMy1K38JVowcw38 3u7M94YP+CwrdSWOI6HRmUPO5RB2DRHHcieSF0QKSTLMDNqBmGVO4UovCVTfdQM7ITg0 gxdRWz7VguWRaSrSRlrUJvRWkhx1X8ZY0rOLXyfkVPer4F+utISAlxWELa9YciQo+kel m+LiFbRE4BUVYaTaTwoMfNzbQ/xCNAApZW4Fv0XkfbggXCEB3RobKBAmb441WIDicvlX gddg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@atomide.com header.s=25mailst header.b=CgmlAdYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id r37-20020a635165000000b005bdd7cadb98si2828845pgl.54.2023.11.23.21.57.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 21:57:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=fail header.i=@atomide.com header.s=25mailst header.b=CgmlAdYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id CC3E68068216; Thu, 23 Nov 2023 21:57:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbjKXF5M (ORCPT + 99 others); Fri, 24 Nov 2023 00:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjKXF5K (ORCPT ); Fri, 24 Nov 2023 00:57:10 -0500 Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24CD6189; Thu, 23 Nov 2023 21:57:17 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 3A38B60B1C; Fri, 24 Nov 2023 05:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1700805436; bh=D+5OJtIXXHhQ4jFCNY71lo60Nt7F5l8pHOuTGGgUjUs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CgmlAdYVqncyCUSzoeA/3qdXsRIFmTqgdm2efS+e3q8k+zjjcNuNJkDR9CkXfZYje dOc2SYOtgA9VDPqZxWhUf4nt2ywLzLPYgEbySct6hYIW4ce3iN7W6EJW0zVTzzEbw8 M7LRhCCant9aj5L3wzZUjanaRiNlc1KCJXJEfzflEj57FOcocmADfNTBRMQFecPbvO ffT3gHtTzJw+++Rx8SIuxr60bkI6nlInfYGpKLoamMDCr7+L08XfSUjYydYK8K043u njjx5bFbgKysdVNWgCocxRudQ7lbrRUFMPo6WNg+kEarkMPNGo27mCgc9tw9A3ZUPA IOnmnkfcdF3xQ== Date: Fri, 24 Nov 2023 07:56:43 +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 v3 3/3] serial: core: Move console character device handling from printk Message-ID: <20231124055643.GH5169@atomide.com> References: <20231121113203.61341-1-tony@atomide.com> <20231121113203.61341-4-tony@atomide.com> <20231122070353.GF5169@atomide.com> <20231122081554.GG5169@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122081554.GG5169@atomide.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 21:57:30 -0800 (PST) * Tony Lindgren [231122 10:16]: > * Tony Lindgren [231122 09:04]: > > * Tony Lindgren [700101 02:00]: > > > - __add_preferred_console(buf, idx, options, brl_options, true); > > > return 1; > > > > Looks like this can't be dropped yet. We need to keep it for the > > brl_options. I'll change it to return early if brl_options is NULL. > > Looks like we can drop the parsing from printk :) In console_setup() > we can call console_opt_save() after _braille_console_setup(), and > then save also the brl_options for the port. I noticed we have more issues remaining trying to drop the console parsing completely from console_setup(). If add_preferred_console() gets called later, register_console() can try to call try_enable_default_console() before we get around to call try_enable_preferred_console(), and that may lead to no serial console. To avoid that, setting console_set_on_cmdline = 1 in console_setup(), and patching register_console() console to check for the flag helps. But looks like that leads to bootconsole not getting disabled and more patching for that is needed.. And of course we'd need to check the other register_console() callers too, not just 8250.. So I think for now, it's best to just drop the 8250 and sparc quirks from console_setup(), that already simplifies things in printk a bit :) And for 8250, we should have serial8250_isa_init_ports() call add_preferred_console_match() to avoid console getting registered later on when the hardware specific driver takes over for x86, m68k, and alpha that define SERIAL_PORT_DFNS. Regards, Tony