From: Sam Bobroff <sbobroff@linux.ibm.com>
To: "Oliver O'Halloran" <oohall@gmail.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Subject: Re: [EXTERNAL] Re: [PATCH v2 3/6] powerpc/eeh: Improve debug messages around device addition
Date: Tue, 16 Jul 2019 16:48:28 +1000 [thread overview]
Message-ID: <20190716064827.GF3645@tungsten.ozlabs.ibm.com> (raw)
In-Reply-To: <CAOSf1CFwj93TYGppJVU5djEe4TN6ezo36G=DxWbFU4buaCWM4g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2572 bytes --]
On Thu, Jun 20, 2019 at 01:45:24PM +1000, Oliver O'Halloran wrote:
> On Thu, Jun 20, 2019 at 12:40 PM Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> >
> > On 19/06/2019 14:27, Sam Bobroff wrote:
> > > On Tue, Jun 11, 2019 at 03:47:58PM +1000, Alexey Kardashevskiy wrote:
> > >>
> > >> On 07/05/2019 14:30, Sam Bobroff wrote:
> > >>> Also remove useless comment.
> > >>>
> > >>> Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
> > >>> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> > >>> ---
> > *snip*
> > >
> > > I can see that edev will be non-NULL here, but that pr_debug() pattern
> > > (using the PDN information to form the PCI address) is quite common
> > > across the EEH code, so I think rather than changing a couple of
> > > specific cases, I should do a separate cleanup patch and introduce
> > > something like pdn_debug(pdn, "...."). What do you think?
> >
> > I'd switch them all to already existing dev_dbg/pci_debug rather than
> > adding pdn_debug as imho it should not have been used in the first place
> > really...
> >
> > > (I don't know exactly when edev->pdev can be NULL.)
> >
> > ... and if you switch to dev_dbg/pci_debug, I think quite soon you'll
> > know if it can or cannot be NULL :)
>
> As far as I can tell edev->pdev is NULL in two cases:
>
> 1. Before eeh_device_add_late() has been called on the pdev. The late
> part of the add maps the pdev to an edev and sets the pdev's edev
> pointer and vis a vis.
> 2. While recoverying EEH unaware devices. Unaware devices are
> destroyed and rescanned and the edev->pdev pointer is cleared by
> pcibios_device_release()
>
> In most of these cases it should be safe to use the pci_*() functions
> rather than making a new one up for printing pdns. In the cases where
> we might not have a PCI dev i'd make a new set of prints that take an
> EEH dev rather than a pci_dn since i'd like pci_dn to die sooner
> rather than later.
>
> Oliver
I'll change the calls in {pnv,pseries}_pcibios_bus_add_device() and
eeh_add_device_late() to use dev_dbg() and post a new version.
For {pnv,pseries}_eeh_probe() I'm not sure what we can do; there's no
pci_dev available yet and while it would be nice to use the eeh_dev
rather than the pdn, it doesn't seem to have the bus/device/fn
information we need. Am I missing something there? (The code in the
probe functions seems to get it from the pci_dn.)
If there isn't an easy way around this, would it therefore be reasonable
to just leave them open-coded as they are?
Cheers,
Sam.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-16 6:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 4:30 [PATCH v2 0/6] Sam Bobroff
2019-05-07 4:30 ` [PATCH v2 1/6] powerpc/64: Adjust order in pcibios_init() Sam Bobroff
2019-05-07 4:30 ` [PATCH v2 2/6] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag Sam Bobroff
2019-05-07 4:30 ` [PATCH v2 3/6] powerpc/eeh: Improve debug messages around device addition Sam Bobroff
2019-06-11 5:47 ` Alexey Kardashevskiy
2019-06-19 4:27 ` Sam Bobroff
2019-06-20 2:40 ` Alexey Kardashevskiy
2019-06-20 3:45 ` Oliver O'Halloran
2019-07-16 6:48 ` Sam Bobroff [this message]
2019-07-16 7:00 ` [EXTERNAL] " Oliver O'Halloran
2019-07-18 5:24 ` Sam Bobroff
2019-05-07 4:30 ` [PATCH v2 4/6] powerpc/eeh: Initialize EEH address cache earlier Sam Bobroff
2019-05-07 4:30 ` [PATCH v2 5/6] powerpc/eeh: EEH for pSeries hot plug Sam Bobroff
2019-05-07 4:30 ` [PATCH v2 6/6] powerpc/eeh: Refactor around eeh_probe_devices() Sam Bobroff
2019-06-05 5:49 ` Oliver
2019-06-19 5:53 ` 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=20190716064827.GF3645@tungsten.ozlabs.ibm.com \
--to=sbobroff@linux.ibm.com \
--cc=aik@ozlabs.ru \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
--cc=tyreld@linux.vnet.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).