From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: [PATCH v1 0/8] EEH Followup Fixes (II)
Date: Fri, 5 Jul 2013 10:57:26 +0800 [thread overview]
Message-ID: <1372993054-25730-1-git-send-email-shangw@linux.vnet.ibm.com> (raw)
The series of patches bases on linux-poerpc-next and intends to resolve
the following problems:
- On pSeries platform, the EEH doesn't work after PHB hotplug
with "drmgr". The root cause is that the EEH resources (
EEH devices, EEH caches) aren't released correctly. For the
problem, we add one hook (pcibios_stop_dev), which is called
on pci_stop_and_remove_device(). In pcibios_stop_dev(), we
release the EEH resources.
- Another issue is that we need put the domain (PE or PHB) into
quite state while doing reset on that domain. However, some
deivces in the domain might not have EEH sensitive drivers, or
even don't have driver. Those deivces can't be put into quite
state and possibly keep issuing PCI-CFG or MMIO request during
resetting the domain. That possibly causes the failure of reset
and eventually failure of EEH recovery. For the issue, we introduces
so-called "partial hotplug". That means, those devices without driver or
without EEH sensitive driver are removed before doing reset, and
plugged (probed) into the system after reset.
- We need traverse EEH devices of one specific PE with safe variant
of list tranverse function. The EEH device might be removed while
doing iteration.
- When doing plug for PCI bus, we need check if we need reassign the
resources for subordinate devices (PCI_REASSIGN_ALL_RSRC) and do that
accordingly.
The patchset is verified on pSeires and PowerNV platforms:
pSeries Platform
-----------------
drmgr -c phb -r -s "PHB 513"
drmgr -c phb -a -s "PHB 513"
errinjct eeh -f 1 -s net/eth2
PowerNV Platform
-----------------
cd /sys/devices/pci0005:00/0005:00:00.0/0005:01:00.0/0005:02:08.0/0005:80:00.0/0005:90:01.0
while true; do od -x config > /dev/null; sleep 1; done
echo 1 > /sys/kernel/debug/powerpc/PCI0005/err_injct
---
arch/powerpc/include/asm/eeh.h | 24 +++++--
arch/powerpc/include/asm/pci-bridge.h | 3 +-
arch/powerpc/include/asm/pci.h | 2 +
arch/powerpc/kernel/eeh.c | 56 ++++++---------
arch/powerpc/kernel/eeh_driver.c | 106 ++++++++++++++++++++++++++-
arch/powerpc/kernel/eeh_pe.c | 43 ++++++-----
arch/powerpc/kernel/pci-common.c | 8 ++-
arch/powerpc/kernel/pci-hotplug.c | 129 +++++++++++++++++++++++++++------
arch/powerpc/kernel/pci_of_scan.c | 43 ++++++++---
drivers/pci/hotplug/rpadlpar_core.c | 1 -
drivers/pci/probe.c | 4 +
drivers/pci/remove.c | 2 +
include/linux/pci.h | 1 +
13 files changed, 322 insertions(+), 100 deletions(-)
Thanks,
Gavin
next reply other threads:[~2013-07-05 2:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 2:57 Gavin Shan [this message]
2013-07-05 2:57 ` [PATCH 1/8] PCI: Add pcibios_stop_dev() Gavin Shan
2013-07-05 3:08 ` Benjamin Herrenschmidt
2013-07-05 18:49 ` Bjorn Helgaas
2013-07-05 22:36 ` Benjamin Herrenschmidt
2013-07-05 22:49 ` Bjorn Helgaas
2013-07-05 23:05 ` Benjamin Herrenschmidt
2013-07-05 2:57 ` [PATCH 2/8] powerpc/eeh: Export functions for hotplug Gavin Shan
2013-07-05 2:57 ` [PATCH 3/8] powerpc/pci: Override pcibios_stop_dev() Gavin Shan
2013-07-05 2:57 ` [PATCH 4/8] PCI/hotplug: Needn't remove EEH cache again Gavin Shan
2013-07-05 18:51 ` Bjorn Helgaas
2013-07-05 2:57 ` [PATCH 5/8] powerpc/eeh: Keep PE during hotplug Gavin Shan
2013-07-05 2:57 ` [PATCH 6/8] powerpc/eeh: Tranverse EEH devices with safe mode Gavin Shan
2013-07-05 2:57 ` [PATCH 7/8] powerpc/pci: Partial hotplug support Gavin Shan
2013-07-05 2:57 ` [PATCH 8/8] powerpc/eeh: Support partial hotplug Gavin Shan
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=1372993054-25730-1-git-send-email-shangw@linux.vnet.ibm.com \
--to=shangw@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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).