Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp935896rwd; Thu, 1 Jun 2023 08:21:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5OFYm10aBEaXGBMpmPusiea7bylt/Ll1Hu1QDHY2KbM4phs3p2BwxeO0pwk2YsNtr4Ooac X-Received: by 2002:a17:903:2292:b0:1b0:61b9:bd7a with SMTP id b18-20020a170903229200b001b061b9bd7amr6794661plh.62.1685632917795; Thu, 01 Jun 2023 08:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685632917; cv=none; d=google.com; s=arc-20160816; b=LkYXEizlEnIOBS6o3HRM/fpJC9Pujut9yIKIAGLY7zr9nBi2qasWdu4+xf7swySWFM czSIiYEvXs5GLZUFO4UY54PoZu2niMwEi8+iZVWRmdb7ix+VhAvoKNxL2mhr9juicPQA 0XUiD1+mN4+AV43d0HlPi3t5s0eL8Bf3HK2tyIeNJPvLNJYxKI99MeT3zBAdwcpavxuj NHk2d2oowNKG9qSr97edqtaC9YTnRNqPAGmsmdw1mLng71B189BY77KLc3ZgmJ8r3q7p rLqT+svNR96DDka1ciMeOXiG8OwbBExKI9vKp/JC3nCKyhTDjreBDxTA/vB6LHMNa4yY 2hAw== 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=lHxyApElQjEFhV1ZNm9E21zEJXhrziA2yNQraO0xozg=; b=NuJluWp0D2189ffM+jg2XCtoUMw79EX1qR7HtU5NmMd3LyfzGFuKV0udBM1Lt8zkfZ yp75E0vtPU0c+BQ7Yqn2y+Fc3hCrrEcrjDUEdFpA2GvAgKF1ag7abT6xu1iaK2xdZ3Tq TcdR1NxTWPi77jUg5zxiq5HcFDmcpGhFRq8iCMODx0yogV5JWLmJzsGkfInXX9G4tD7E qFZ6Jb/z+ymFN0nNXRy5/Jft81iGSUPjrf/kc8Worvr3b7iAIF4kv8nfTSJTEE9tXZUU F03pPUYUJo5C1YQM2jiONXQKEQ22LibiQ1G5I9M0Va30OO6cb9pAB+ZuOxqCynkw6Wsy oWYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a170902e5d100b001a9b9c32ab7si2979297plf.624.2023.06.01.08.21.42; Thu, 01 Jun 2023 08:21:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233845AbjFAPPn (ORCPT + 99 others); Thu, 1 Jun 2023 11:15:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233675AbjFAPPm (ORCPT ); Thu, 1 Jun 2023 11:15:42 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AD00C12C; Thu, 1 Jun 2023 08:15:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1142B80F1; Thu, 1 Jun 2023 15:07:08 +0000 (UTC) Date: Thu, 1 Jun 2023 18:07:06 +0300 From: Tony Lindgren To: Greg Kroah-Hartman Cc: Jiri Slaby , Andy Shevchenko , Andy Shevchenko , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, Marek Szyprowski , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: core: Fix probing serial_base_bus devices Message-ID: <20230601150706.GD14287@atomide.com> References: <20230601141445.11321-1-tony@atomide.com> <2023060112-onion-disparate-8ce8@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023060112-onion-disparate-8ce8@gregkh> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Greg Kroah-Hartman [230601 14:21]: > On Thu, Jun 01, 2023 at 05:14:44PM +0300, Tony Lindgren wrote: > > If a physical serial port device driver uses arch_initcall() we fail to > > probe the serial_base_bus devices and the serial port tx fails. This is > > because as serial_base_bus uses module_initcall(). > > > > Let's fix the issue by changing serial_base_bus to use arch_initcall(). > > This will only work if the linking order is such that this will always > come before the drivers. Is that the case here? I guess based on Makefile. And also if serial drivers are modules as we export uart_add_one_port() from serial_base.ko. But yeah this is pretty fragile potentially. Hmm maybe we could keep module_init() and then also call serial_base_init() on uart_add_one_port() path if not yet initialized? Probably the module_init() should be still there for case when no serial port device drivers are loaded and serial_base is unloaded.. Regards, Tony