Received: by 10.223.185.116 with SMTP id b49csp4871173wrg; Wed, 7 Mar 2018 02:26:53 -0800 (PST) X-Google-Smtp-Source: AG47ELv1NqL29sslEKP6lTV412tjB9R+Kb3B4/eo3aru039b0rtzu4Mr9RjA5PicVwcqx5X94R69 X-Received: by 10.99.164.81 with SMTP id c17mr17854402pgp.114.1520418413246; Wed, 07 Mar 2018 02:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520418413; cv=none; d=google.com; s=arc-20160816; b=Olxhrg24Hg+ZxT+FWBF34Wwpk4VbJloXF/0relQBcVPUButzaxuHz0AoRnMTGctZAa xp1vYrehfsFQf0yT2eu4gZCHIllC2aotF9m8xdD2PmSbsKBWKGSkw2FeKFTfL0MqJOEk 1Jf4Yqr0mgRYcItxgpDg78jHdYD4HYbmcZNLfBIw5la0NYgd5ugzxJlp2tPFx3nWgEV6 AwAVkNUhR6xzp/lSdkZSM8hBHdcFqFnP+gutOmhPoTaiBmp5WTzknJ6wOUbzL3/4s62N wK+3BuJ6ah3MjkvnEvrUlW1HYT+StatpuDP+oqBvKE0ZL27BuSjRHvxppDVBka+m5c9C mFcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=1bugpsh2hZcaaseyj6DBBdhyI5Wv726LNDaeQerfeGc=; b=GfFRQJLg57k9o1SfnDUxBug0cbVVoRGtjl4RBjMLLZdrXrvlF8vUG1ZEYbS3Ux4by1 iMqUhXBK6CFcV3CaSBK/dYwRSobdOrjE5R9LJnJfL84w3D/Ew1tadFz0BcBKOXl4f1pF L9nPLHUP+zcLI/o+TH3qi8z6edhXfVqUPArwdg1A+ZW4yIgE5GK3KDK5rtkkb17H5/xI 2T3XVLijRv4ol5B7kD27kKcsugYM9RhckKq3QXbcDxUEGO0nZFxsnaQP4PNE9ZKG8ryj N7poLW+bVYeSfGfy6C2oAzPuiHZmF+PMqbxDsfKSj5wmzMYq5zRVkEsYSYUH0Hwf/yKe CCWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si13625853pfg.221.2018.03.07.02.26.38; Wed, 07 Mar 2018 02:26:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754358AbeCGKXr (ORCPT + 99 others); Wed, 7 Mar 2018 05:23:47 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:57263 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754325AbeCGKXn (ORCPT ); Wed, 7 Mar 2018 05:23:43 -0500 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 0639af1dacb0c0ad; Wed, 7 Mar 2018 11:23:40 +0100 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Keith Busch , Sinan Kaya , Lukas Wunner Subject: Re: [PATCH v1 1/9] PCI/PM: Move pcie_clear_root_pme_status() to core Date: Wed, 07 Mar 2018 11:24:24 +0100 Message-ID: <10009696.o2NQuGtdHo@aspire.rjw.lan> In-Reply-To: <152040320934.240786.9241781859071768363.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152040297576.240786.1532465558381209070.stgit@bhelgaas-glaptop.roam.corp.google.com> <152040320934.240786.9241781859071768363.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, March 7, 2018 7:13:29 AM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Move pcie_clear_root_pme_status() from the port driver to the PCI core so > it will be available even when the port driver isn't present. No > functional change intended. > > Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki > --- > drivers/pci/pci.c | 9 +++++++++ > drivers/pci/pci.h | 1 + > drivers/pci/pcie/portdrv.h | 2 -- > drivers/pci/pcie/portdrv_pci.c | 9 --------- > 4 files changed, 10 insertions(+), 11 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index f6a4dd10d9b0..120e3393fc35 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -1683,6 +1683,15 @@ int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) > } > EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state); > > +/** > + * pcie_clear_root_pme_status - Clear root port PME interrupt status. > + * @dev: PCIe root port or event collector. > + */ > +void pcie_clear_root_pme_status(struct pci_dev *dev) > +{ > + pcie_capability_set_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME); > +} > + > /** > * pci_check_pme_status - Check if given device has generated PME. > * @dev: Device to check. > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index fcd81911b127..813ca2c895d8 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -71,6 +71,7 @@ void pci_update_current_state(struct pci_dev *dev, pci_power_t state); > void pci_power_up(struct pci_dev *dev); > void pci_disable_enabled_device(struct pci_dev *dev); > int pci_finish_runtime_suspend(struct pci_dev *dev); > +void pcie_clear_root_pme_status(struct pci_dev *dev); > int __pci_pme_wakeup(struct pci_dev *dev, void *ign); > void pci_pme_restore(struct pci_dev *dev); > bool pci_dev_keep_suspended(struct pci_dev *dev); > diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h > index a854bc569117..a4fc44d52206 100644 > --- a/drivers/pci/pcie/portdrv.h > +++ b/drivers/pci/pcie/portdrv.h > @@ -34,8 +34,6 @@ void pcie_port_bus_unregister(void); > > struct pci_dev; > > -void pcie_clear_root_pme_status(struct pci_dev *dev); > - > #ifdef CONFIG_HOTPLUG_PCI_PCIE > extern bool pciehp_msi_disabled; > > diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c > index fb1c1bb87316..4413dd85e923 100644 > --- a/drivers/pci/pcie/portdrv_pci.c > +++ b/drivers/pci/pcie/portdrv_pci.c > @@ -50,15 +50,6 @@ __setup("pcie_ports=", pcie_port_setup); > > /* global data */ > > -/** > - * pcie_clear_root_pme_status - Clear root port PME interrupt status. > - * @dev: PCIe root port or event collector. > - */ > -void pcie_clear_root_pme_status(struct pci_dev *dev) > -{ > - pcie_capability_set_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME); > -} > - > static int pcie_portdrv_restore_config(struct pci_dev *dev) > { > int retval; > >