All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Bobroff <sbobroff@linux.ibm.com>
To: "Oliver O'Halloran" <oohall@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 5/8] powerpc/eeh: Add eeh_show_enabled()
Date: Tue, 30 Apr 2019 15:44:43 +1000	[thread overview]
Message-ID: <20190430054442.GB9630@tungsten.ozlabs.ibm.com> (raw)
In-Reply-To: <7d93d678a1e37a1efb935f88fbc91f134d298ac8.camel@gmail.com>

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

On Thu, Apr 18, 2019 at 08:01:36PM +1000, Oliver O'Halloran wrote:
> On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote:
> > Move the EEH enabled message into it's own function so that future
> > work can call it from multiple places.
> > 
> > Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
> > ---
> >  arch/powerpc/include/asm/eeh.h |  3 +++
> >  arch/powerpc/kernel/eeh.c      | 16 +++++++++++-----
> >  2 files changed, 14 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
> > index fe4cf7208890..e217ccda55d0 100644
> > --- a/arch/powerpc/include/asm/eeh.h
> > +++ b/arch/powerpc/include/asm/eeh.h
> > @@ -289,6 +289,7 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe);
> >  
> >  struct eeh_dev *eeh_dev_init(struct pci_dn *pdn);
> >  void eeh_dev_phb_init_dynamic(struct pci_controller *phb);
> > +void eeh_show_enabled(void);
> >  void eeh_probe_devices(void);
> >  int __init eeh_ops_register(struct eeh_ops *ops);
> >  int __exit eeh_ops_unregister(const char *name);
> > @@ -338,6 +339,8 @@ static inline bool eeh_enabled(void)
> >          return false;
> >  }
> >  
> > +static inline void eeh_show_enabled(void) { }
> > +
> >  static inline bool eeh_phb_enabled(void)
> >  {
> >  	return false;
> > diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
> > index b14d89547895..3dcff29cb9b3 100644
> > --- a/arch/powerpc/kernel/eeh.c
> > +++ b/arch/powerpc/kernel/eeh.c
> > @@ -163,6 +163,16 @@ static int __init eeh_setup(char *str)
> >  }
> >  __setup("eeh=", eeh_setup);
> >  
> > +void eeh_show_enabled(void)
> > +{
> > +	if (eeh_has_flag(EEH_FORCE_DISABLED))
> > +		pr_info("EEH: PCI Enhanced I/O Error Handling DISABLED (by eeh=off)\n");
> 
> The allcaps looks kind of stupid.

Argh, true!

> > +	else if (eeh_enabled())
> > +		pr_info("EEH: PCI Enhanced I/O Error Handling ENABLED (capable adapter found)\n");
> > +	else
> > +		pr_info("EEH: PCI Enhanced I/O Error Handling DISABLED (no capable adapter found)\n");
> 
> If we really have to keep these messages then make it say "no EEH
> capable buses found" or something. EEH support has absolutely nothing

I don't think it's critical, but I'd like something that lets you
determine if EEH_ENABLED is set or not and why, since it's helpful for
debugging.

And I know what you mean about EEH support and adapters, but (before
these patches anyway) if you don't have an EEH capable adapter in the
machine at boot time, you won't ever get EEH recovery because
EEH_ENABLED won't be set. (I think we want to clean that up, so this
probably only matters until we do that.)

> to do with the adapters and I'm not even sure we can get the "DISABLED"
> message on PowerNV since the root port will always be there.

Yes, you'd have to force it off via the command line.

Anyway, I'll try to improve the messages (and no more caps) :-)

> > +}
> > +
> >  /*
> >   * This routine captures assorted PCI configuration space data
> >   * for the indicated PCI device, and puts them into a buffer
> > @@ -1166,11 +1176,7 @@ void eeh_probe_devices(void)
> >  		pdn = hose->pci_data;
> >  		traverse_pci_dn(pdn, eeh_ops->probe, NULL);
> >  	}
> > -	if (eeh_enabled())
> > -		pr_info("EEH: PCI Enhanced I/O Error Handling Enabled\n");
> > -	else
> > -		pr_info("EEH: No capable adapters found\n");
> > -
> > +	eeh_show_enabled();
> >  }
> >  
> >  /**
> 

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

  reply	other threads:[~2019-04-30  5:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  2:58 [PATCH 0/8] Sam Bobroff
2019-03-20  2:58 ` [PATCH 1/8] powerpc/64: Adjust order in pcibios_init() Sam Bobroff
2019-03-20  6:03   ` Alexey Kardashevskiy
2019-03-20  2:58 ` [PATCH 2/8] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-04-08  6:50     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 3/8] powerpc/eeh: Convert PNV_PHB_FLAG_EEH to global flag Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-04-09  1:41     ` Sam Bobroff
2019-04-18  9:51   ` Oliver O'Halloran
2019-04-30  5:30     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 4/8] powerpc/eeh: Improve debug messages around device addition Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-03-20  2:58 ` [PATCH 5/8] powerpc/eeh: Add eeh_show_enabled() Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-03-20  6:24     ` Oliver
2019-04-09  3:30     ` Sam Bobroff
2019-04-18 10:01   ` Oliver O'Halloran
2019-04-30  5:44     ` Sam Bobroff [this message]
2019-03-20  2:58 ` [PATCH 6/8] powerpc/eeh: Initialize EEH address cache earlier Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-04-18 10:13   ` Oliver O'Halloran
2019-04-30  5:54     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 7/8] powerpc/eeh: EEH for pSeries hot plug Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-03-20  2:58 ` [PATCH 8/8] powerpc/eeh: Remove eeh_probe_devices() and eeh_addr_cache_build() Sam Bobroff
2019-03-20  6:05   ` Alexey Kardashevskiy
2019-04-09  3:31     ` Sam Bobroff
2019-04-12  0:55 ` [PATCH 0/8] Tyrel Datwyler
2019-04-15  3:41   ` Sam Bobroff
2019-04-19 22:36     ` Tyrel Datwyler

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=20190430054442.GB9630@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.