From: Sam Bobroff <sbobroff@linux.ibm.com>
To: "Oliver O'Halloran" <oohall@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/5] powerpc/eeh_cache: Don't use pci_dn when inserting new ranges
Date: Tue, 16 Jul 2019 13:53:34 +1000 [thread overview]
Message-ID: <20190716035334.GA3645@tungsten.ozlabs.ibm.com> (raw)
In-Reply-To: <20190715085612.8802-2-oohall@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]
On Mon, Jul 15, 2019 at 06:56:08PM +1000, Oliver O'Halloran wrote:
> At the point where we start inserting ranges into the EEH address cache the
> binding between pci_dev and eeh_dev has already been set up. Instead of
> consulting the pci_dn tree we can retrieve the eeh_dev directly using
> pci_dev_to_eeh_dev().
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
In fact the binding between pci_dev and eeh_dev is set up right before
the calls to eeh_addr_cache_insert_dev() (see eeh_addr_cache_build() and
eeh_add_device_tree_late()) so this looks clearly correct to me.
A few simple tests of EEH recovery still succeed as well.
Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com>
Tested-by: Sam Bobroff <sbobroff@linux.ibm.com>
> ---
> arch/powerpc/kernel/eeh_cache.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c
> index 3204723..908ba69 100644
> --- a/arch/powerpc/kernel/eeh_cache.c
> +++ b/arch/powerpc/kernel/eeh_cache.c
> @@ -156,18 +156,10 @@ eeh_addr_cache_insert(struct pci_dev *dev, resource_size_t alo,
>
> static void __eeh_addr_cache_insert_dev(struct pci_dev *dev)
> {
> - struct pci_dn *pdn;
> struct eeh_dev *edev;
> int i;
>
> - pdn = pci_get_pdn_by_devfn(dev->bus, dev->devfn);
> - if (!pdn) {
> - pr_warn("PCI: no pci dn found for dev=%s\n",
> - pci_name(dev));
> - return;
> - }
> -
> - edev = pdn_to_eeh_dev(pdn);
> + edev = pci_dev_to_eeh_dev(dev);
> if (!edev) {
> pr_warn("PCI: no EEH dev found for %s\n",
> pci_name(dev));
> --
> 2.9.5
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-16 3:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 8:56 Misc EEH fixes Oliver O'Halloran
2019-07-15 8:56 ` [PATCH 1/5] powerpc/eeh_cache: Don't use pci_dn when inserting new ranges Oliver O'Halloran
2019-07-16 3:53 ` Sam Bobroff [this message]
2020-01-29 5:17 ` Michael Ellerman
2019-07-15 8:56 ` [PATCH 2/5] powerpc/eeh_sysfs: Fix incorrect comment Oliver O'Halloran
2019-07-16 3:54 ` Sam Bobroff
2019-07-15 8:56 ` [PATCH 3/5] powerpc/eeh_sysfs: ifdef pseries sr-iov sysfs properties Oliver O'Halloran
2019-07-16 3:54 ` Sam Bobroff
2019-07-15 8:56 ` [PATCH 4/5] powerpc/eeh_sysfs: Remove double pci_dn lookup Oliver O'Halloran
2019-07-16 3:55 ` Sam Bobroff
2019-07-15 8:56 ` [PATCH 5/5] powerpc/eeh_sysfs: Make clearing EEH_DEV_SYSFS saner Oliver O'Halloran
2019-07-16 4:00 ` 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=20190716035334.GA3645@tungsten.ozlabs.ibm.com \
--to=sbobroff@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.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).