Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3144834rwd; Fri, 2 Jun 2023 23:03:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4PEUSC5t1J28IyBG0BLmNDOvYFXqGKqc7P488F4KhGDy5A3wlrQwdcMiBOBM6IwzPIHkZe X-Received: by 2002:a05:620a:3956:b0:75b:23a0:decf with SMTP id qs22-20020a05620a395600b0075b23a0decfmr17668954qkn.77.1685772216430; Fri, 02 Jun 2023 23:03:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685772216; cv=none; d=google.com; s=arc-20160816; b=FbfqBIrUyqqWSz1n01riCilsMfqnJ+c4J31y2DGAfwsjDGBmBxbp8AfRktLmoinafm Z0SairdPg73Kehs4/A97weuQPk4+dkA+NASRHXGdLT6QZhzwdUAc4xY0wpGaf4LmoBkn zxf/F9W54HxaIeyBOLnDHV6aDTPuowXYQHYpoxayL/pLUCAdtYhjHbbNnA5K77bJ29Um lb5m2Nh6kosrZcB7B0BbesN9Jhp+IeRP6Lphcjub+5dN/qqa0G8yVqvfCuIpG7wc5CJ1 6PjaOSogWpE0bEiycUcj72Muv57vXVWfoKhzh2YccGMpYJxU+sKEaUQzKmuwf/3BN9NV 5O2w== 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=UoxGu0NCJs5N9p740cfbgOA3PpP0r3rx9MYHFuvSeq8=; b=OQYWBAvNhmyCwVIAZnW43BAbgoxWRw9hPdtgQL338CPivHLlcGDoxGDqnyM8AfBMKE h5gXGCOyLW5MWzS3qPxK38JhQVtyfLexZCt7aLyE5rrep9OWkhjQmj6naIxkQMWJ+zuP ACEMCj8jnzAWkTQcc4C/xy6nnrVFg7QgFnWWq9NU3MwzyrhIozipppiiCAS7J9Bh1Qku ZgDUA6YoG3+LG4ECwZ5JDJspn5EAmjAPN2GyyyAIUYIypSGzVEJtQdgW45Y0ouInAOam bGryYsJcYd3DkYPHkDsXc2Ces9iyRUdlvq3hH8IXm5c9CHCxkz7iKgGzfpubIh62HiP+ incg== 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 g22-20020a633756000000b00527b90936b8si2119960pgn.38.2023.06.02.23.03.11; Fri, 02 Jun 2023 23:03:36 -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 S231444AbjFCFln (ORCPT + 99 others); Sat, 3 Jun 2023 01:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjFCFlm (ORCPT ); Sat, 3 Jun 2023 01:41:42 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D4C2E52; Fri, 2 Jun 2023 22:41:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 9E7208111; Sat, 3 Jun 2023 05:41:40 +0000 (UTC) Date: Sat, 3 Jun 2023 08:41:39 +0300 From: Tony Lindgren To: John Ogness Cc: Chen-Yu Tsai , Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado , AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org Subject: Re: [PATCH v12 1/1] serial: core: Start managing serial controllers to enable runtime PM Message-ID: <20230603054139.GR14287@atomide.com> References: <20230525113034.46880-1-tony@atomide.com> <20230602083335.GA181647@google.com> <87a5xii33r.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a5xii33r.fsf@jogness.linutronix.de> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi, * John Ogness [230602 10:13]: > Unfortunately next-20230601 also brought in a series that added > spinlocking to the 8250 driver. That may be the issue here instead. I think you're off the hook here with the spinlocking changes :) My guess right now is that 8250_mtk does not want runtime PM resume called on probe for some reason, and assumes it won't happen until until in mtk8250_do_pm()? Looking at the probe, the driver does pm_runtime_enable(), but then calls mtk8250_runtime_resume() directly. Not sure what the intention here is. Maybe adding pm_runtime_set_active() in probe might provide more clues. When we add the new serial_ctrl and serial_port devices, their runtime PM functions propagate to the parent 8250_mtk device. And then something goes wrong, well this is my guess on what's going on.. To me it seems the 8250_mtk should just do pm_runtime_resume_and_get() instead of mtk8250_runtime_resume(), then do pm_runtime_put() at the end of the probe? I don't think 8250_mtk needs to do register access before and after the serial port registration, but if it does, then adding custom read/write functions can be done that do not rely on initialized port like serial_out(). Looking at the kernelci.org test boot results for Linux next [0], seems this issue is somehow 8250_mtk specific. I don't think the rk3399 boot issue is serial port related. Regards, Tony [0] https://linux.kernelci.org/test/job/next/branch/master/kernel/next-20230602/plan/baseline/