Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13985770pxu; Mon, 4 Jan 2021 09:42:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWRJJpAvFy4lhsYkR4GytclDZiRkPCRPiP2zTAJ9xKBtP7NElHmRPmvGcXhC1vuslsZrw/ X-Received: by 2002:a17:906:6448:: with SMTP id l8mr42103860ejn.357.1609782166793; Mon, 04 Jan 2021 09:42:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609782166; cv=none; d=google.com; s=arc-20160816; b=xKfPZOC5XHRmU70KIeAnqso790kMsOsDbjTeMLrdI+u8euH2Zfaym8BZXo2zcwfuGo H+JWS8tXrWA3hA/s3Gs9i9OcrT2w2pK0wShi/HQnxpog4RpVCwEZsvlN2gIOjP/0LiuN VXd1VhqEwutqe+AOVdzd/v8SRjzyXWZ1zDhP8/IeS7qsLnqD8pJa31KrN05wRLtgRkFD 0SGsuULdtIyDGTa42yo8cTKUAYfQ4kSTgnTJqb9l0wyezEKAzhqoZEdAZKeHhKocioNc tVM8YbzJntrF6Bg5j8PkLsBNVWTlB0+kyLMpyywvuLujibsJmLN+VssQa2cwZdC+fO9z MtIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=x05YbcJO+dm0O9mjdP4dQRPClerbx3BlxQUnlm7o/7M=; b=RmlsjqgpuI4m6yT0wN2K1h1uFRB1EW737NMbmEif2DOqNVvN8/TDpwBoybvB3v03cK weOz+lbSpNWZm8/RmT3ReMZOjGJVaBEGP+InpmB4j6zXIh5aDE1wY7j8Xs947heZOW+x 0GwXTG8Af3YIv1P6NDiL3ve2GaHTXYUGIvx1ORHk81kw7BvvOv9Ig/e4OckZzO7zZ0b8 cP4BAEPGBylQIPp8IMTtv8ICOxI7/ESnZzB8yE8awH9LVNFFivS9hKcN5PSSYV75i5cf BBSgH3fcnnNjutlQoBS3Lq5fb32te8Z5Km0SIcYN047zfBeU94wPM3kIuA9oOgaO1ZHc 6Pow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id md2si26086700ejb.699.2021.01.04.09.42.23; Mon, 04 Jan 2021 09:42:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727785AbhADRk1 (ORCPT + 99 others); Mon, 4 Jan 2021 12:40:27 -0500 Received: from bmailout2.hostsharing.net ([83.223.78.240]:34941 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727030AbhADRk1 (ORCPT ); Mon, 4 Jan 2021 12:40:27 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id CB7662800B3CC; Mon, 4 Jan 2021 18:39:44 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id C1A6450D7B; Mon, 4 Jan 2021 18:39:44 +0100 (CET) Date: Mon, 4 Jan 2021 18:39:44 +0100 From: Lukas Wunner To: Heiner Kallweit Cc: "Rafael J. Wysocki" , Bjorn Helgaas , "Rafael J. Wysocki" , Bjorn Helgaas , Mika Westerberg , Kai Heng Feng , "linux-pci@vger.kernel.org" , Linux PM , Linux Kernel Mailing List Subject: Re: Time to re-enable Runtime PM per default for PCI devcies? Message-ID: <20210104173944.GA31187@wunner.de> References: <79940973-b631-90f9-dbc4-9579c6000816@gmail.com> <20201117163817.GA1397220@bjorn-Precision-5520> <9ca0fb46-9e65-31e2-103f-1c98ce8362c7@gmail.com> <20201231040735.GA2075@wunner.de> <4eb10092-e3f9-c9be-2dec-e6de8aeedf97@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4eb10092-e3f9-c9be-2dec-e6de8aeedf97@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 31, 2020 at 10:38:12AM +0100, Heiner Kallweit wrote: > On 31.12.2020 05:07, Lukas Wunner wrote: > > FWIW, if platform_pci_power_manageable() returns true, it can probably > > be assumed that allowing runtime PM by default is okay. So as a first > > step, you may want to call that instead of adding a new callback. > > I don't think that's sufficient. Most likely all the broken old systems > return true for platform_pci_power_manageable(). platform_pci_power_manageable() is not a global flag, but rather a per-device flag whether the platform is capable of power-managing that device. E.g. for the ACPI platform, it indicates that objects such as _PS0 or _PS3 are present in the device's namespace. My point is that if the platform can power-manage a device, then it ought to be safe to enable runtime PM by default for it. If you insist on a "big hammer" approach by turning on runtime PM by default for everything, you risk regressions. You can avoid that by going for a smart approach which enables runtime PM in cases when it's safe. Thanks, Lukas