Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp870925rwd; Thu, 1 Jun 2023 07:36:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6l0VYw54zMiBWHp1MqEQkG9S9JnZ6MKf84wWCxGsETqPAhyJ8Igu5quw4qRcFbnk+LicF0 X-Received: by 2002:a17:90a:c217:b0:256:4b34:8bdf with SMTP id e23-20020a17090ac21700b002564b348bdfmr6497735pjt.39.1685630161497; Thu, 01 Jun 2023 07:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685630161; cv=none; d=google.com; s=arc-20160816; b=TXeXXy2KIq1Gw8JRa8EThayDvNz+b6VckfqiBkA1mcH4wmlOexUWT9+J4LfFsBTMHp Qj5FrMZIZf3EB0JmcldQjaqvC1MP2PXh2V9bAlZhF/YGJLCPopKLItLjFrEbQ08rWu9r lsgdYvUo+vkn287I4Yrrj2ZzJfEljcE+jPLv09ggBl3Jg2BZJlVFY7K9mRPGhZhALGXH U/EfY8Lu9TkRPW85DxWhbiGK9NTzcYhA7m47N+W3EfwpapIH6xPY74gZZwPrOdhJF+k2 g4zZvW7t1JJG24lTxw0g2cAl7t7u56K0Z4cqNRz7rMdqnxEwVozUnkk0nO1bX9Zwk6iP IsMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=aooKOcoG2Dz+6wPhDw6GXnx90ndkQz6rTx2S+M8S+9M=; b=Q6I1djoHr4HQxlvN/rgC9+aIVqezPpS3NIsn7PCcTcKKpJbwIzjGfAAklOlP2nZnmp I4gMLaVOMp33aCzpx3Q+s6iYddLSklJXVEhSSItc6/+s3Ps2UFRrtvVeyeFHxO4ASx3m SNvSIW7IIElbiw7s1VSWrQ/khn++5eaLBBs7WT2+lcFlgVl0/PFdFF+hJFtFVkrNnkx0 2TNxOoAloa3OHxVRG+h/5EvaE8uKeEBwREIOABU1ApSlbkKr7y1YZqpnCkk20G31p8ci Gu8lNF0EQMNFxyxKX7VI+fiDGROiaQUCYCfH03hUeFmuixxnsrf5nmxbOOFWTShKl0jc K99Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ObCCfeT4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d25-20020a637359000000b005347fcb7853si1022699pgn.140.2023.06.01.07.35.49; Thu, 01 Jun 2023 07:36:01 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ObCCfeT4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232167AbjFAORG (ORCPT + 99 others); Thu, 1 Jun 2023 10:17:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233330AbjFAORC (ORCPT ); Thu, 1 Jun 2023 10:17:02 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C38A10C4 for ; Thu, 1 Jun 2023 07:16:32 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230601141618euoutp02b778bd637bd8c01b192256eb7ac1ca89~kjqAO7Fp22679626796euoutp02j for ; Thu, 1 Jun 2023 14:16:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230601141618euoutp02b778bd637bd8c01b192256eb7ac1ca89~kjqAO7Fp22679626796euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1685628978; bh=aooKOcoG2Dz+6wPhDw6GXnx90ndkQz6rTx2S+M8S+9M=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=ObCCfeT4IsjTCibs8aiDjQspa8HrWLZ8NQP3pi/0FMTXNjracwyml/dmFpel7BT0w BrTn8on28ik7Jms+fZ/J0l8rxSWYF6vZap7MzM0tPC4wGcnykc/r8Mm7Qw3hISTwZV EimfzmZX1u27feqwhdGLUAkbP4bGnqHv8t3B8vcI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230601141618eucas1p189c11e679112fb3fcd998e92689066e0~kjp-9bSWB2119821198eucas1p1A; Thu, 1 Jun 2023 14:16:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EB.FF.11320.238A8746; Thu, 1 Jun 2023 15:16:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230601141617eucas1p153a837c55b69a38e0375a169a248bb90~kjp-jFKmw1431214312eucas1p1S; Thu, 1 Jun 2023 14:16:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230601141617eusmtrp1bcea0700833c5d2e72a152d7dc16ab04~kjp-forWC1034710347eusmtrp1B; Thu, 1 Jun 2023 14:16:17 +0000 (GMT) X-AuditID: cbfec7f4-97dff70000022c38-37-6478a832fd2d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 40.85.14344.138A8746; Thu, 1 Jun 2023 15:16:17 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230601141616eusmtip10816804fc5fa2284f5569b447a83b0c4~kjp_rrN9n3227732277eusmtip1l; Thu, 1 Jun 2023 14:16:16 +0000 (GMT) Message-ID: Date: Thu, 1 Jun 2023 16:16:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v12 1/1] serial: core: Start managing serial controllers to enable runtime PM Content-Language: en-US To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Dhruva Gole , =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org From: Marek Szyprowski In-Reply-To: <20230601132012.GB14287@atomide.com> Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFKsWRmVeSWpSXmKPExsWy7djPc7pGKypSDI7P5beYuWw5u0Vv03Qm i2kXJzFbtKz1sGhevJ7NonNHD4vFu7kyFk03elgttl2Zz2hxedccNovZS/pZLM4s7mW32H/F y+L/2Q/sDnwe375OYvFYvOclk8emVZ1sHu/OnWP3mHcy0GP/3DXsHsdvbGfy+LxJLoAjissm JTUnsyy1SN8ugSvj5oZ29oKFQhXPHs5hamBcx9/FyMkhIWAi8fj3dMYuRi4OIYEVjBJ7mz4y QzhfGCW6fi9jgnA+M0ocW3qUrYuRA6xlxgoniPhyRolHEx6xQzgfGSVWrj7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+m KL+0JFUhI7+4xFYp2tDCSM/Q0kLPyMRSz9DYPNbKyFRJ384mJTUnsyy1SN8uQS/j5oZ29oKF QhXPHs5hamBcx9/FyMEhIWAiMWOFUxcjF4eQwFJGif2f57J0MXICxWUkTk5rYIWwhSX+XOti gyh6zyhx5uFfsCJeATuJb9f+MoEMYhFQkXhwwR8iLChxcuYTsBJRgVSJ3i8rGEFsYYFkiRn/ HzGD2MwC4hK3nswHaxUBar370h5kPLPAYhaJ6dc6WSB2dTFJ/DjUBdbMJmAo0fUW5AhODk4g +9v07SwQg8wkurZC1DALyEs0b53NPIFRaBaSO2Yh2TcLScssJC0LGFlWMYqklhbnpucWG+kV J+YWl+al6yXn525iBMbztmM/t+xgXPnqo94hRiYOxkOMEhzMSiK8QmHlKUK8KYmVValF+fFF pTmpxYcYTYFhMZFZSjQ5H5hQ8kriDc0MTA1NzCwNTC3NjJXEeT0LOhKFBNITS1KzU1MLUotg +pg4OKUamHhk7xm7P+oN6gnduuWT1uzy8lLzeOFNN9zD/Z5MUbAIfKO+vFjTfPGbjG8iWf+/ yrutPSjqIj85/0t2ZLTF76WZJ7Y8Xex3ftPROdN8fv54XWwpvCXv4PFvGj6lQh7r1Re5B9RW /pDXqVue0HF0CoNCouQ1q8WBX/aLrZPPnsHzqfb7s4lin0xygqapzHG1lv5sfi1JgKG0tKtR Y91+p4krnnYL5v71LVCxuZlitKEkN04tj5l9W6x83ivpys1Z4aIPnugfPMnQODt+hlMuZ7Lk jYkXK7KeH1y47TufR5vL9sfid36FGx5sW8DF07Fui7cvj/iSwmsGsTV3uCYuurFpz9ef803a LmouFfK3VWIpzkg01GIuKk4EAFQfftJwAwAA X-CMS-MailID: 20230601141617eucas1p153a837c55b69a38e0375a169a248bb90 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230601110030eucas1p2eed547c326a51a6110100fb50799d136 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230601110030eucas1p2eed547c326a51a6110100fb50799d136 References: <20230525113034.46880-1-tony@atomide.com> <88d9edfe-2f39-b15f-f513-463eac6bf473@samsung.com> <20230601111147.GA14287@atomide.com> <20230601132012.GB14287@atomide.com> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,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 On 01.06.2023 15:20, Tony Lindgren wrote: > * Tony Lindgren [230601 11:12]: >> * Marek Szyprowski [230601 11:00]: >>> This patch landed in today's linux next-20230601 as commit 84a9582fd203 >>> ("serial: core: Start managing serial controllers to enable runtime >>> PM"). Unfortunately it breaks booting some of my test boards. This can >>> be easily reproduced with QEMU and ARM64 virt machine. The last message >>> I see in the log is: >>> >>> [    3.084743] Run /sbin/init as init process >> OK thanks for the report. I wonder if this issue is specific to ttyAM >> serial port devices somehow? > Looks like the problem happens with serial port drivers that use > arch_initcall(): > > $ git grep arch_initcall drivers/tty/serial/ > drivers/tty/serial/amba-pl011.c:arch_initcall(pl011_init); > drivers/tty/serial/mps2-uart.c:arch_initcall(mps2_uart_init); > drivers/tty/serial/mvebu-uart.c:arch_initcall(mvebu_uart_init); > drivers/tty/serial/pic32_uart.c:arch_initcall(pic32_uart_init); > drivers/tty/serial/serial_base_bus.c:arch_initcall(serial_base_init); > drivers/tty/serial/xilinx_uartps.c:arch_initcall(cdns_uart_init); > > We have serial_base_bus use module_init() so the serial core controller > and port device associated with the physical serial port are not probed. > > The patch below should fix the problem you're seeing, care to test and > if it works I'll post a proper fix? Right, this fixes my issue. Feel free to add: Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski > Note that if we ever have cases where uart_add_one_port() gets called > even earlier, we should just call serial_base_init() directly when > adding the first port. > > Regards, > > Tony > > 8< ------------------ > diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c > --- a/drivers/tty/serial/serial_base_bus.c > +++ b/drivers/tty/serial/serial_base_bus.c > @@ -186,7 +186,7 @@ static int serial_base_init(void) > > return ret; > } > -module_init(serial_base_init); > +arch_initcall(serial_base_init); > > static void serial_base_exit(void) > { Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland