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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 6CB67C43613 for ; Mon, 24 Jun 2019 10:58:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 498C9208E3 for ; Mon, 24 Jun 2019 10:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728847AbfFXK6h (ORCPT ); Mon, 24 Jun 2019 06:58:37 -0400 Received: from mga14.intel.com ([192.55.52.115]:25138 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727730AbfFXK6h (ORCPT ); Mon, 24 Jun 2019 06:58:37 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 03:58:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,411,1557212400"; d="scan'208";a="182613006" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 24 Jun 2019 03:58:33 -0700 Received: by lahna (sSMTP sendmail emulation); Mon, 24 Jun 2019 13:58:32 +0300 Date: Mon, 24 Jun 2019 13:58:32 +0300 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Bjorn Helgaas , Len Brown , Lukas Wunner , Keith Busch , Alex Williamson , Alexandru Gagniuc , ACPI Devel Maling List , Linux PCI Subject: Re: [PATCH v2 1/3] PCI / ACPI: Use cached ACPI device state to get PCI device power state Message-ID: <20190624105832.GE2640@lahna.fi.intel.com> References: <20190618161858.77834-1-mika.westerberg@linux.intel.com> <20190618161858.77834-2-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Fri, Jun 21, 2019 at 01:56:49PM +0200, Rafael J. Wysocki wrote: > On Tue, Jun 18, 2019 at 6:19 PM Mika Westerberg > wrote: > > > > Actually, to start with, you can say that the ACPI power state > returned by acpi_device_get_power() may depend on the configuration of > ACPI power resources in the system which may change at any time after > acpi_device_get_power() has returned, unless the reference counters of > the ACPI power resources in question are set to prevent that from > happening. Thus it is invalid to use acpi_device_get_power() in > acpi_pci_get_power_state() the way it is done now and the value of the > power.state field in the corresponding struct acpi_device object > (which reflects the ACPI power resources reference counting, among > other things) should be used instead. > > Then you can describe the particular issue below as an example. > > IMO that would explain the rationale better here. Thanks! I'll update the changelog accordingly.