linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Kelsey Skunberg <skunberg.kelsey@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH v2 01/11] PCI: Move #define PCI_PM_* lines to drivers/pci/pci.h
Date: Mon, 29 Jul 2019 16:44:05 -0500	[thread overview]
Message-ID: <20190729214405.GG203187@google.com> (raw)
In-Reply-To: <20190724233848.73327-2-skunberg.kelsey@gmail.com>

[+to Rafael, author of commits mentioned below]

On Wed, Jul 24, 2019 at 05:38:38PM -0600, Kelsey Skunberg wrote:
> The #define PCI_PM_* lines are only used within drivers/pci/ and they do
> not need to be seen by the rest of the kernel. Move #define PCI_* to
> drivers/pci/pci.h
> 
> Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>
> ---
>  drivers/pci/pci.h   | 5 +++++
>  include/linux/pci.h | 5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> index 1be03a97cb92..708413632429 100644
> --- a/drivers/pci/pci.h
> +++ b/drivers/pci/pci.h
> @@ -39,6 +39,11 @@ int pci_probe_reset_function(struct pci_dev *dev);
>  int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
>  int pci_bus_error_reset(struct pci_dev *dev);
>  
> +#define PCI_PM_D2_DELAY         200
> +#define PCI_PM_D3_WAIT          10
> +#define PCI_PM_D3COLD_WAIT      100
> +#define PCI_PM_BUS_WAIT         50

Unrelated to *this* patch, but while reviewing, I noticed this a few
lines below:

  static inline void pci_wakeup_event(struct pci_dev *dev)
  {
    /* Wait 100 ms before the system can be put into a sleep state. */
    pm_wakeup_event(&dev->dev, 100);
  }

I'm curious about what this 100ms is and whether it's related to
something in the PCIe spec.  E.g., is this another way of writing
PCI_PM_D3COLD_WAIT?

This constant was added to drivers/pci/pci.c as PCI_WAKEUP_COOLDOWN by
c125e96f0444 ("PM: Make it possible to avoid races between wakeup and
system sleep") and then moved to drivers/pci/pci.h and the name
removed by b6e335aeeb11 ("PCI/PM: Use pm_wakeup_event() directly for
reporting wakeup events").

>  /**
>   * struct pci_platform_pm_ops - Firmware PM callbacks
>   *
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 9e700d9f9f28..238449460210 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -145,11 +145,6 @@ static inline const char *pci_power_name(pci_power_t state)
>  	return pci_power_names[1 + (__force int) state];
>  }
>  
> -#define PCI_PM_D2_DELAY		200
> -#define PCI_PM_D3_WAIT		10
> -#define PCI_PM_D3COLD_WAIT	100
> -#define PCI_PM_BUS_WAIT		50
> -
>  /**
>   * typedef pci_channel_state_t
>   *
> -- 
> 2.20.1
> 
> _______________________________________________
> Linux-kernel-mentees mailing list
> Linux-kernel-mentees@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2019-07-29 21:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 22:23 [PATCH 00/11] PCI: Move symbols to drivers/pci/pci.h Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 01/11] PCI: Move #define PCI_PM_* lines " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 02/11] PCI: Move PME declarations " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 03/11] PCI: Move *_host_bridge_device() declarations to drivers/pci.pci.h Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 04/11] PCI: Move PCI Virtual Channel declarations to drivers/pci/pci.h Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 05/11] PCI: Move pci_hotplug_*_size " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 06/11] PCI: Move pci_bus_* " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 07/11] PCI: Move pcie_update_link_speed() " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 08/11] PCI: Move pci_ats_init() " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 09/11] PCI: Move ECRC declarations " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 10/11] PCI: Move PTM declaration " Kelsey Skunberg
2019-07-11 22:23 ` [PATCH 11/11] PCI: Move pci_*_node() declarations " Kelsey Skunberg
2019-07-23 23:07 ` [PATCH 00/11] PCI: Move symbols " Bjorn Helgaas
2019-07-23 23:24   ` Kelsey Skunberg
2019-07-24 23:38 ` [PATCH v2 00/11] Hide PCI symbols that don't need to be global Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 01/11] PCI: Move #define PCI_PM_* lines to drivers/pci/pci.h Kelsey Skunberg
2019-07-29 21:44     ` Bjorn Helgaas [this message]
2019-07-24 23:38   ` [PATCH v2 02/11] PCI: Move PME declarations " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 03/11] PCI: Move *_host_bridge_device() declarations to drivers/pci.pci.h Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 04/11] PCI: Move PCI Virtual Channel declarations to drivers/pci/pci.h Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 05/11] PCI: Move pci_hotplug_*_size " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 06/11] PCI: Move pci_bus_* " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 07/11] PCI: Move pcie_update_link_speed() " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 08/11] PCI: Move pci_ats_init() " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 09/11] PCI: Move ECRC declarations " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 10/11] PCI: Move PTM declaration " Kelsey Skunberg
2019-07-24 23:38   ` [PATCH v2 11/11] PCI: Move pci_*_node() declarations " Kelsey Skunberg
2019-07-30 13:47   ` [Linux-kernel-mentees] [PATCH v2 00/11] Hide PCI symbols that don't need to be global Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729214405.GG203187@google.com \
    --to=helgaas@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=skunberg.kelsey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).