From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC3EC433DF for ; Thu, 2 Jul 2020 19:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87E94206E2 for ; Thu, 2 Jul 2020 19:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726032AbgGBTf5 (ORCPT ); Thu, 2 Jul 2020 15:35:57 -0400 Received: from muru.com ([72.249.23.125]:60514 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbgGBTf4 (ORCPT ); Thu, 2 Jul 2020 15:35:56 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 049398062; Thu, 2 Jul 2020 19:36:48 +0000 (UTC) Date: Thu, 2 Jul 2020 12:35:53 -0700 From: Tony Lindgren To: Geert Uytterhoeven Cc: Andy Shevchenko , Guenter Roeck , Greg Kroah-Hartman , Jiri Slaby , "open list:SERIAL DRIVERS" , Sebastian Andrzej Siewior , "Lad, Prabhakar" , Linux-Renesas Subject: Re: [PATCH v3 2/6] serial: core: Allow detach and attach serial device for console Message-ID: <20200702193553.GN53169@atomide.com> References: <20200217114016.49856-1-andriy.shevchenko@linux.intel.com> <20200217114016.49856-3-andriy.shevchenko@linux.intel.com> <20200524171032.GA218301@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Hi, * Geert Uytterhoeven [200702 14:50]: > On Sun, May 24, 2020 at 7:11 PM Guenter Roeck wrote: > > any special reason for this change ? It is not really explained in the > > commit description. > > Indeed. Why this change? For a kernel console, we want it to work for important oopses etc without trying to enable DMA or power on regulators for example. And we want to get rid of pm_runtime_irq_safe() usage as that takes a permanent usage count on the parent device. This causes issue where uart can keep an interconnect instance from idling with let's say genpd :) Also, we cannot easily make the serial driver PM runtime generic without removing the pm_runtime_irq_safe() dependency as it would currently wrongly impose the same nasty dependency to all the serial drivers. So when a kernel console is attached, we want to keep it from idling. For PM related testing, just detaching kernel console and configuring it's autosuspend timeout works nicely with dmesg -w. Or actually in that case using pstore console is even better. Andy has a series pending for generic serial PM runtime support, I guess he's going to be posting it as soon as the pending regressions are dealt with. Regards, Tony