From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: benh@kernel.crashing.org
Cc: linuxppc-dev@lists.ozlabs.org, Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: [PATCH 01/25] powerpc/eeh: Remove EEH_PE_PHB_DEAD
Date: Thu, 24 Apr 2014 18:00:07 +1000 [thread overview]
Message-ID: <1398326431-24305-2-git-send-email-gwshan@linux.vnet.ibm.com> (raw)
In-Reply-To: <1398326431-24305-1-git-send-email-gwshan@linux.vnet.ibm.com>
The PE state (for eeh_pe instance) EEH_PE_PHB_DEAD is duplicate to
EEH_PE_ISOLATED. Originally, those PHBs (PHB PE) with EEH_PE_PHB_DEAD
would be removed from the system. However, it's safe to replace
that with EEH_PE_ISOLATED.
The patch also clear EEH_PE_RECOVERING after fenced PHB has been handled,
either failure or success. It makes the PHB PE state consistent with:
PHB functions normally NONE
PHB has been removed EEH_PE_ISOLATED
PHB fenced, recovery in progress EEH_PE_ISOLATED | RECOVERING
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/eeh.h | 1 -
arch/powerpc/kernel/eeh.c | 10 ++--------
arch/powerpc/kernel/eeh_driver.c | 10 +++++-----
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index d4dd41f..a61b06f 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -53,7 +53,6 @@ struct device_node;
#define EEH_PE_ISOLATED (1 << 0) /* Isolated PE */
#define EEH_PE_RECOVERING (1 << 1) /* Recovering PE */
-#define EEH_PE_PHB_DEAD (1 << 2) /* Dead PHB */
#define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index e7b76a6..f167676 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -232,7 +232,6 @@ void eeh_slot_error_detail(struct eeh_pe *pe, int severity)
{
size_t loglen = 0;
struct eeh_dev *edev, *tmp;
- bool valid_cfg_log = true;
/*
* When the PHB is fenced or dead, it's pointless to collect
@@ -240,12 +239,7 @@ void eeh_slot_error_detail(struct eeh_pe *pe, int severity)
* 0xFF's. For ER, we still retrieve the data from the PCI
* config space.
*/
- if (eeh_probe_mode_dev() &&
- (pe->type & EEH_PE_PHB) &&
- (pe->state & (EEH_PE_ISOLATED | EEH_PE_PHB_DEAD)))
- valid_cfg_log = false;
-
- if (valid_cfg_log) {
+ if (!(pe->type & EEH_PE_PHB)) {
eeh_pci_enable(pe, EEH_OPT_THAW_MMIO);
eeh_ops->configure_bridge(pe);
eeh_pe_restore_bars(pe);
@@ -309,7 +303,7 @@ static int eeh_phb_check_failure(struct eeh_pe *pe)
/* If the PHB has been in problematic state */
eeh_serialize_lock(&flags);
- if (phb_pe->state & (EEH_PE_ISOLATED | EEH_PE_PHB_DEAD)) {
+ if (phb_pe->state & EEH_PE_ISOLATED) {
ret = 0;
goto out;
}
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index bb61ca5..1ddc046 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -682,8 +682,7 @@ static void eeh_handle_special_event(void)
phb_pe = eeh_phb_pe_get(hose);
if (!phb_pe) continue;
- eeh_pe_state_mark(phb_pe,
- EEH_PE_ISOLATED | EEH_PE_PHB_DEAD);
+ eeh_pe_state_mark(phb_pe, EEH_PE_ISOLATED);
}
eeh_serialize_unlock(flags);
@@ -699,8 +698,7 @@ static void eeh_handle_special_event(void)
eeh_remove_event(pe);
if (rc == EEH_NEXT_ERR_DEAD_PHB)
- eeh_pe_state_mark(pe,
- EEH_PE_ISOLATED | EEH_PE_PHB_DEAD);
+ eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
else
eeh_pe_state_mark(pe,
EEH_PE_ISOLATED | EEH_PE_RECOVERING);
@@ -724,12 +722,14 @@ static void eeh_handle_special_event(void)
if (rc == EEH_NEXT_ERR_FROZEN_PE ||
rc == EEH_NEXT_ERR_FENCED_PHB) {
eeh_handle_normal_event(pe);
+ eeh_pe_state_clear(pe, EEH_PE_RECOVERING);
} else {
pci_lock_rescan_remove();
list_for_each_entry(hose, &hose_list, list_node) {
phb_pe = eeh_phb_pe_get(hose);
if (!phb_pe ||
- !(phb_pe->state & EEH_PE_PHB_DEAD))
+ !(phb_pe->state & EEH_PE_ISOLATED) ||
+ (phb_pe->state & EEH_PE_RECOVERING))
continue;
/* Notify all devices to be down */
--
1.8.3.2
next prev parent reply other threads:[~2014-04-24 8:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 8:00 [PATCH 00/25] EEH Enhancement and bug fixes Gavin Shan
2014-04-24 8:00 ` Gavin Shan [this message]
2014-04-24 8:00 ` [PATCH 02/25] powerpc/powernv: Remove PNV_EEH_STATE_REMOVED Gavin Shan
2014-04-24 8:00 ` [PATCH 03/25] powerpc/powernv: Move PNV_EEH_STATE_ENABLED around Gavin Shan
2014-04-24 8:00 ` [PATCH 04/25] powerpc/powernv: Remove fields in PHB diag-data dump Gavin Shan
2014-04-24 8:00 ` [PATCH 05/25] powerpc/eeh: EEH_PE_ISOLATED not reflect HW state Gavin Shan
2014-04-24 8:00 ` [PATCH 06/25] powerpc/eeh: Block PCI-CFG access during PE reset Gavin Shan
2014-04-24 8:00 ` [PATCH 07/25] powerpc/powernv: Use EEH PCI config accessors Gavin Shan
2014-04-24 8:00 ` [PATCH 08/25] powerpc/eeh: Avoid I/O access during PE reset Gavin Shan
2014-04-24 8:00 ` [PATCH 09/25] powerpc/eeh: Cleanup eeh_gather_pci_data() Gavin Shan
2014-04-24 8:00 ` [PATCH 10/25] powerpc/eeh: Use cached capability for log dump Gavin Shan
2014-04-24 8:00 ` [PATCH 11/25] powerpc/eeh: Cleanup EEH subsystem variables Gavin Shan
2014-04-24 8:00 ` [PATCH 12/25] powerpc/eeh: Allow to disable EEH Gavin Shan
2014-04-24 8:00 ` [PATCH 13/25] powerpc/eeh: No hotplug on permanently removed dev Gavin Shan
2014-04-24 8:00 ` [PATCH 14/25] powerpc/powernv: Fix endless reporting frozen PE Gavin Shan
2014-04-24 8:00 ` [PATCH 15/25] powerpc/pseries: Fix overwritten PE state Gavin Shan
2014-04-24 8:00 ` [PATCH 16/25] powerpc/powernv: Reset root port in firmware Gavin Shan
2014-04-24 8:00 ` [PATCH 17/25] powerpc/eeh: Make the delay for PE reset unified Gavin Shan
2014-04-24 8:00 ` [PATCH 18/25] powerpc/pci: Mask linkDown on resetting PCI bus Gavin Shan
2014-04-24 8:00 ` [PATCH 19/25] powrpc/powernv: Reset PHB in kdump kernel Gavin Shan
2014-04-24 8:00 ` [PATCH 20/25] powerpc/eeh: Can't recover from non-PE-reset case Gavin Shan
2014-04-24 8:00 ` [PATCH 21/25] powerpc/powernv: Fundamental reset on PLX ports Gavin Shan
2014-04-24 8:00 ` [PATCH 22/25] powerpc/powernv: Missed IOMMU table type Gavin Shan
2014-04-24 8:00 ` [PATCH 23/25] powerpc/powernv: pci_domain_nr() not reliable Gavin Shan
2014-04-24 8:00 ` [PATCH 24/25] PCI: Fix return value from pci_user_{read, write}_config_*() Gavin Shan
2014-04-24 8:00 ` [PATCH 25/25] powerpc/prom: Stop scanning dev-tree for fdump early 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=1398326431-24305-2-git-send-email-gwshan@linux.vnet.ibm.com \
--to=gwshan@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--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).