linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: linux-pci@vger.kernel.org, timur@codeaurora.org
Cc: Sinan Kaya <okaya@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, mayurkumar.patel@intel.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 0/3] PCI/ASPM: reconfigure ASPM following hotplug for POLICY_DEFAULT
Date: Mon, 13 Mar 2017 16:48:02 -0400	[thread overview]
Message-ID: <1489438085-2055-1-git-send-email-okaya@codeaurora.org> (raw)

y
(POLICY_DEFAULT), current code is querying the enable/disable
states from ASPM registers to determine the policy.

For example, a BIOS could set the power saving state to performance
and clear all ASPM control registers. A balanced ASPM policy could
enable L0s and disable L1. A power conscious BIOS could enable both
L0s and L1 to trade off latency and performance vs. power.

After hotplug removal, pcie_aspm_exit_link_state() function clears
the ASPM registers. An insertion following hotplug removal reads
incorrect policy as ASPM disabled even though ASPM was enabled
during boot.

This is caused by the fact that same function is used for reconfiguring
ASPM regardless of the of the power on state.

------------------------
Changes from v3 (https://lkml.org/lkml/2017/3/8/670)
------------------------
- call pcie_aspm_init_link_state() for every device, maybe from
pci_init_capabilities()

- for bridges, have pcie_aspm_init_link_state() allocate a
link_state, regardless of whether it currently has any children,
and save the ASPM settings done by firmware

- for endpoints, have pcie_aspm_init_link_state() do the actual ASPM
setup of the link as it currently does

- for endpoints, change pcie_aspm_exit_link_state() so it cleans up
the device's own state and disables ASPM if necessary, but doesn't
remove the parent's link_state

- for bridges, change pcie_aspm_exit_link_state() so it frees the
bridge's own link_state

Sinan Kaya (3):
  PCI/ASPM: divide ASPM capability init into pre and post init
  PCI/ASPM: move part of ASPM initialization to pci_init_capabilities
  PCI/ASPM: move link_state cleanup to bridge remove

 drivers/pci/pcie/aspm.c | 175 +++++++++++++++++++++++++++++++++++-------------
 drivers/pci/probe.c     |   3 +
 include/linux/pci.h     |   6 ++
 3 files changed, 136 insertions(+), 48 deletions(-)

-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2017-03-13 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 20:48 Sinan Kaya [this message]
2017-03-13 20:48 ` [PATCH V4 1/3] PCI/ASPM: divide ASPM capability init into pre and post init Sinan Kaya
2017-03-13 20:48 ` [PATCH V4 2/3] PCI/ASPM: move part of ASPM initialization to pci_init_capabilities Sinan Kaya
2017-03-13 20:48 ` [PATCH V4 3/3] PCI/ASPM: move link_state cleanup to bridge remove Sinan Kaya
2017-03-13 21:46 ` [PATCH V4 0/3] PCI/ASPM: reconfigure ASPM following hotplug for POLICY_DEFAULT Bjorn Helgaas
2017-03-13 22:05   ` Sinan Kaya
2017-03-13 23:08     ` Bjorn Helgaas
2017-03-13 23:21       ` Sinan Kaya
2017-03-14 19:21         ` Bjorn Helgaas
2017-03-15 14:33           ` Sinan Kaya
2017-03-20 17:43             ` Sinan Kaya

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=1489438085-2055-1-git-send-email-okaya@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mayurkumar.patel@intel.com \
    --cc=timur@codeaurora.org \
    /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).