diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-12-11 04:28:55 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-01-23 04:02:53 +0100 |
commit | 432227e9077eec13b3caf3aec6087f94a2f4327f (patch) | |
tree | 7187da73a487f7251f6c03ace7b0d9c138edf327 /arch/powerpc/kernel/eeh_pe.c | |
parent | powerpc/eeh: Fix missed PE#0 on P7IOC (diff) | |
download | linux-432227e9077eec13b3caf3aec6087f94a2f4327f.tar.xz linux-432227e9077eec13b3caf3aec6087f94a2f4327f.zip |
powerpc/eeh: Introduce flag EEH_PE_REMOVED
The conditions that one specific PE's frozen count exceeds the maximal
allowed times (EEH_MAX_ALLOWED_FREEZES) and it's in isolated or recovery
state indicate the PE was removed permanently implicitly. The patch
introduces flag EEH_PE_REMOVED to indicate that explicitly so that we
don't depend on the fixed maximal allowed times, which can be varied as
we do in subsequent patch.
Flag EEH_PE_REMOVED is expected to be marked for the PE whose frozen
count exceeds the maximal allowed times, or just failed from recovery.
Requested-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/eeh_pe.c')
-rw-r--r-- | arch/powerpc/kernel/eeh_pe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c index fa950fbc2d97..1e4946c36f9e 100644 --- a/arch/powerpc/kernel/eeh_pe.c +++ b/arch/powerpc/kernel/eeh_pe.c @@ -526,8 +526,7 @@ static void *__eeh_pe_state_mark(void *data, void *flag) struct pci_dev *pdev; /* Keep the state of permanently removed PE intact */ - if ((pe->freeze_count > EEH_MAX_ALLOWED_FREEZES) && - (state & (EEH_PE_ISOLATED | EEH_PE_RECOVERING))) + if (pe->state & EEH_PE_REMOVED) return NULL; pe->state |= state; @@ -600,8 +599,7 @@ static void *__eeh_pe_state_clear(void *data, void *flag) struct pci_dev *pdev; /* Keep the state of permanently removed PE intact */ - if ((pe->freeze_count > EEH_MAX_ALLOWED_FREEZES) && - (state & EEH_PE_ISOLATED)) + if (pe->state & EEH_PE_REMOVED) return NULL; pe->state &= ~state; |