[Very RFC 27/46] powernv/pci: Clear reserved PE freezes

Alexey Kardashevskiy aik at ozlabs.ru
Wed Nov 27 14:00:46 AEDT 2019



On 20/11/2019 12:28, Oliver O'Halloran wrote:
> When we scan an empty slot the PHB gets an Unsupported Request from the
> downstream bridge when there's no device present at that BDFN.  Some older
> PHBs (p7-IOC) don't allow further config space accesses while the PE is
> frozen, so clear it here without bothering with the diagnostic log.


This executes when EEH is not enabled (rather unsupported case) and the
patch allegedly extends support of some P7 none of which was ever
supported by the powernv platform, or was/is it? Thanks,


> 
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
> ---
>  arch/powerpc/platforms/powernv/pci.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
> index 36eea4bb514c..5b1f4677cdce 100644
> --- a/arch/powerpc/platforms/powernv/pci.c
> +++ b/arch/powerpc/platforms/powernv/pci.c
> @@ -642,6 +642,19 @@ static void pnv_pci_config_check_eeh(struct pnv_phb *phb, u16 bdfn)
>  	if (fstate == OPAL_EEH_STOPPED_MMIO_FREEZE ||
>  	    fstate == OPAL_EEH_STOPPED_DMA_FREEZE  ||
>  	    fstate == OPAL_EEH_STOPPED_MMIO_DMA_FREEZE) {
> +
> +		/*
> +		 * Scanning an empty slot will result in a freeze on the reserved PE.
> +		 *
> +		 * Some old and bad PHBs block config space access to frozen PEs in
> +		 * addition to MMIOs, so unfreeze it here.
> +		 */
> +		if (pe_no == phb->ioda.reserved_pe_idx) {
> +			phb->unfreeze_pe(phb, phb->ioda.reserved_pe_idx,
> +					 OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
> +			return;
> +		}
> +
>  		/*
>  		 * If PHB supports compound PE, freeze it for
>  		 * consistency.
> 

-- 
Alexey


More information about the Linuxppc-dev mailing list