[PATCH 4/6] powerpc/eeh: Remove PHB check in probe

Sam Bobroff sbobroff at linux.ibm.com
Thu Feb 6 16:30:57 AEDT 2020


On Mon, Feb 03, 2020 at 07:35:19PM +1100, Oliver O'Halloran wrote:
> This check for a missing PHB has existing in various forms since the
> initial PPC64 port was upstreamed in 2002. The idea seems to be that we
> need to guard against creating pci-specific data structures for the non-pci
> children of a PCI device tree node (e.g. USB devices). However, we only
> create pci_dn structures for DT nodes that correspond to PCI devices so
> there's not much point in doing this check in the eeh_probe path.
> 
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

I always wondered how to test that block... and it's just dead code.
Reviewed-by: Sam Bobroff <sbobroff at linux.ibm.com>

> ---
>  arch/powerpc/kernel/eeh.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
> index 9cb3370..a9e4ca7 100644
> --- a/arch/powerpc/kernel/eeh.c
> +++ b/arch/powerpc/kernel/eeh.c
> @@ -1120,7 +1120,6 @@ core_initcall_sync(eeh_init);
>   */
>  void eeh_add_device_early(struct pci_dn *pdn)
>  {
> -	struct pci_controller *phb = pdn ? pdn->phb : NULL;
>  	struct eeh_dev *edev = pdn_to_eeh_dev(pdn);
>  
>  	if (!edev)
> @@ -1129,11 +1128,6 @@ void eeh_add_device_early(struct pci_dn *pdn)
>  	if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))
>  		return;
>  
> -	/* USB Bus children of PCI devices will not have BUID's */
> -	if (NULL == phb ||
> -	    (eeh_has_flag(EEH_PROBE_MODE_DEVTREE) && 0 == phb->buid))
> -		return;
> -
>  	eeh_ops->probe(pdn, NULL);
>  }
>  
> -- 
> 2.9.5
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20200206/6a9a7a0a/attachment.sig>


More information about the Linuxppc-dev mailing list