diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-03-04 06:35:43 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-04 06:35:43 +0100 |
commit | d2c032e3dc58137a7261a7824d3acce435db1d66 (patch) | |
tree | 7eea1c7c6103eefe879f07472eec99b3c41eb792 /arch/powerpc/kernel/eeh_pe.c | |
parent | 7e8e385aaf6ed5b64b5d9108081cfcdcdd021b78 (diff) | |
parent | 13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff) |
Merge tag 'v4.0-rc2' into x86/asm, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/powerpc/kernel/eeh_pe.c')
-rw-r--r-- | arch/powerpc/kernel/eeh_pe.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c index 5a63e2b0f65b..1e4946c36f9e 100644 --- a/arch/powerpc/kernel/eeh_pe.c +++ b/arch/powerpc/kernel/eeh_pe.c @@ -239,10 +239,18 @@ static void *__eeh_pe_get(void *data, void *flag) if (pe->type & EEH_PE_PHB) return NULL; - /* We prefer PE address */ - if (edev->pe_config_addr && - (edev->pe_config_addr == pe->addr)) + /* + * We prefer PE address. For most cases, we should + * have non-zero PE address + */ + if (eeh_has_flag(EEH_VALID_PE_ZERO)) { + if (edev->pe_config_addr == pe->addr) + return pe; + } else { + if (edev->pe_config_addr && + (edev->pe_config_addr == pe->addr)) return pe; + } /* Try BDF address */ if (edev->config_addr && @@ -518,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; @@ -592,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; |