linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sam Bobroff <sbobroff@linux.ibm.com>
To: "Oliver O'Halloran" <oohall@gmail.com>
Cc: tyreld@linux.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/6] powerpc/eeh: Remove eeh_add_device_tree_late()
Date: Thu, 6 Feb 2020 15:23:29 +1100	[thread overview]
Message-ID: <20200206042328.GE15629@osmium> (raw)
In-Reply-To: <20200203083521.16549-3-oohall@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3995 bytes --]

On Mon, Feb 03, 2020 at 07:35:17PM +1100, Oliver O'Halloran wrote:
> On pseries and PowerNV pcibios_bus_add_device() calls eeh_add_device_late()
> so there's no need to do a separate tree traversal to bind the eeh_dev and
> pci_dev together setting up the PHB at boot. As a result we can remove
> eeh_add_device_tree_late().
> 
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

... with pcibios_bus_add_device() being called from
pci_bus_add_devices(), in this case.

Looks good.

Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com>

> ---
>  arch/powerpc/include/asm/eeh.h    |  3 ---
>  arch/powerpc/kernel/eeh.c         | 25 -------------------------
>  arch/powerpc/kernel/of_platform.c |  3 ---
>  arch/powerpc/kernel/pci-common.c  |  3 ---
>  4 files changed, 34 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
> index 5a34907..5d10781 100644
> --- a/arch/powerpc/include/asm/eeh.h
> +++ b/arch/powerpc/include/asm/eeh.h
> @@ -304,7 +304,6 @@ void eeh_addr_cache_init(void);
>  void eeh_add_device_early(struct pci_dn *);
>  void eeh_add_device_tree_early(struct pci_dn *);
>  void eeh_add_device_late(struct pci_dev *);
> -void eeh_add_device_tree_late(struct pci_bus *);
>  void eeh_remove_device(struct pci_dev *);
>  int eeh_unfreeze_pe(struct eeh_pe *pe);
>  int eeh_pe_reset_and_recover(struct eeh_pe *pe);
> @@ -365,8 +364,6 @@ static inline void eeh_add_device_tree_early(struct pci_dn *pdn) { }
>  
>  static inline void eeh_add_device_late(struct pci_dev *dev) { }
>  
> -static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
> -
>  static inline void eeh_remove_device(struct pci_dev *dev) { }
>  
>  #define EEH_POSSIBLE_ERROR(val, type) (0)
> diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
> index 0878912..9cb3370 100644
> --- a/arch/powerpc/kernel/eeh.c
> +++ b/arch/powerpc/kernel/eeh.c
> @@ -1214,31 +1214,6 @@ void eeh_add_device_late(struct pci_dev *dev)
>  }
>  
>  /**
> - * eeh_add_device_tree_late - Perform EEH initialization for the indicated PCI bus
> - * @bus: PCI bus
> - *
> - * This routine must be used to perform EEH initialization for PCI
> - * devices which are attached to the indicated PCI bus. The PCI bus
> - * is added after system boot through hotplug or dlpar.
> - */
> -void eeh_add_device_tree_late(struct pci_bus *bus)
> -{
> -	struct pci_dev *dev;
> -
> -	if (eeh_has_flag(EEH_FORCE_DISABLED))
> -		return;
> -	list_for_each_entry(dev, &bus->devices, bus_list) {
> -		eeh_add_device_late(dev);
> -		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
> -			struct pci_bus *subbus = dev->subordinate;
> -			if (subbus)
> -				eeh_add_device_tree_late(subbus);
> -		}
> -	}
> -}
> -EXPORT_SYMBOL_GPL(eeh_add_device_tree_late);
> -
> -/**
>   * eeh_remove_device - Undo EEH setup for the indicated pci device
>   * @dev: pci device to be removed
>   *
> diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
> index cb68800..64edac81 100644
> --- a/arch/powerpc/kernel/of_platform.c
> +++ b/arch/powerpc/kernel/of_platform.c
> @@ -80,9 +80,6 @@ static int of_pci_phb_probe(struct platform_device *dev)
>  	 */
>  	pcibios_claim_one_bus(phb->bus);
>  
> -	/* Finish EEH setup */
> -	eeh_add_device_tree_late(phb->bus);
> -
>  	/* Add probed PCI devices to the device model */
>  	pci_bus_add_devices(phb->bus);
>  
> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
> index 3d2b1cf..8983afa 100644
> --- a/arch/powerpc/kernel/pci-common.c
> +++ b/arch/powerpc/kernel/pci-common.c
> @@ -1399,9 +1399,6 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus)
>  			pci_assign_unassigned_bus_resources(bus);
>  	}
>  
> -	/* Fixup EEH */
> -	eeh_add_device_tree_late(bus);
> -
>  	/* Add new devices to global lists.  Register in proc, sysfs. */
>  	pci_bus_add_devices(bus);
>  }
> -- 
> 2.9.5
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-02-06  4:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03  8:35 EEH init cleanup Oliver O'Halloran
2020-02-03  8:35 ` [PATCH 1/6] powerpc/eeh: Add sysfs files in late probe Oliver O'Halloran
2020-02-06  4:13   ` Sam Bobroff
2020-02-07  3:22     ` Oliver O'Halloran
2020-02-03  8:35 ` [PATCH 2/6] powerpc/eeh: Remove eeh_add_device_tree_late() Oliver O'Halloran
2020-02-06  4:23   ` Sam Bobroff [this message]
2020-02-03  8:35 ` [PATCH 3/6] powerpc/eeh: Do early EEH init only when required Oliver O'Halloran
2020-02-06  5:22   ` Sam Bobroff
2020-02-03  8:35 ` [PATCH 4/6] powerpc/eeh: Remove PHB check in probe Oliver O'Halloran
2020-02-06  5:30   ` Sam Bobroff
2020-02-03  8:35 ` [PATCH 5/6] powerpc/eeh: Make early EEH init pseries specific Oliver O'Halloran
2020-02-07  2:24   ` Sam Bobroff
2020-02-07  3:35     ` Oliver O'Halloran
2020-02-07  3:56       ` Oliver O'Halloran
2020-02-03  8:35 ` [PATCH 6/6] powerpc/eeh: Rework eeh_ops->probe() Oliver O'Halloran
2020-02-07  2:37   ` Sam Bobroff

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=20200206042328.GE15629@osmium \
    --to=sbobroff@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oohall@gmail.com \
    --cc=tyreld@linux.ibm.com \
    /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).