Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp11023041pxu; Wed, 30 Dec 2020 20:10:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYhexHsOYNCJUhzYdFHfZX0OvROeNH4Y1OfbrAs0+dxRLpfV8I1djPx+xRV695IirdsUEz X-Received: by 2002:a17:906:4d8d:: with SMTP id s13mr3288095eju.305.1609387822776; Wed, 30 Dec 2020 20:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609387822; cv=none; d=google.com; s=arc-20160816; b=VNWrEYQH2xVb5pble7ZNbWKv84h1fIHl+iZcJ4o5CN/74OKfKi3K90Olk+egQB9VQU VpRdNqkgHJ6bQQagUybAGuRMNdkVMNGasSde2pqvSSUkVjOW94QE3aaUgbhhnXwHkdke a/8Wy+Q5olc8brfwKkcEsegdoD5WWVC3uKEZLxQbtpSVB2CKV9WVr9Qv8lJP31WQRVGy mzgA5thJn7LSltXZKHrKkuscDJyccvHItzTglhBt8MNOHR++hotMRfTpEwfZhRAdQ6eT clHGFSm7juoR+GNFaiO+WFTnwjvH/CMkFuOlTHzX027aBOXJrOzBG+titecY5y4c5aTC JVVg== 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=fXDrhoxDakfyLtwIbltkpKsrhj5Ht3Nd5P0CmPf9cTk=; b=PPcCpqhMRFc/3t7ZIKjfyICExz7o2eRm0WfyrVlX09oU1o9iztcmDFlPLKPuvDPnIi 7481xF5bdBs9synSr1CBzsrOkoiqAAVK6az3VqD8yeHG4+nESlZ1RdDvoOJy5qCMMlgF m+t0jRHTGfSN8P5lWlbR6dm1q/SEYLnO95gjFvFDW+5ThO76k1CCDHOysBVdHtBdoXkG g3I+qxgc/00HxCN54Eo4M6XoIzfJU9cZqrB0BXw9/itAz2/TPZufANfQA2Ls/mNISvaZ GBDBaQd4JYFQLoMysHKWlvydHVEsBet+J9cWSXplIHtzLYAgZpqD+BMEnMO8G6OfKMX9 GBYQ== 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 bt25si25230475edb.572.2020.12.30.20.09.52; Wed, 30 Dec 2020 20:10:22 -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 S1726274AbgLaEIS (ORCPT + 99 others); Wed, 30 Dec 2020 23:08:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbgLaEIS (ORCPT ); Wed, 30 Dec 2020 23:08:18 -0500 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [IPv6:2a01:37:3000::53df:4ef0:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C21BDC061573; Wed, 30 Dec 2020 20:07:37 -0800 (PST) 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 D98FB2800B3D7; Thu, 31 Dec 2020 05:07:35 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id CFA4D40DBA; Thu, 31 Dec 2020 05:07:35 +0100 (CET) Date: Thu, 31 Dec 2020 05:07:35 +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: <20201231040735.GA2075@wunner.de> References: <79940973-b631-90f9-dbc4-9579c6000816@gmail.com> <20201117163817.GA1397220@bjorn-Precision-5520> <9ca0fb46-9e65-31e2-103f-1c98ce8362c7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ca0fb46-9e65-31e2-103f-1c98ce8362c7@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 11:56:04PM +0100, Heiner Kallweit wrote: > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -3024,7 +3024,9 @@ void pci_pm_init(struct pci_dev *dev) > u16 status; > u16 pmc; > > - pm_runtime_forbid(&dev->dev); > + if (pci_acpi_forbid_runtime_pm()) > + pm_runtime_forbid(&dev->dev); > + Generic PCI code usually does not call ACPI-specific functions directly, but rather through a pci_platform_pm_ops callback. 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. Thanks, Lukas