All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
To: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org
Cc: gwshan@linux.vnet.ibm.com, benh@kernel.crashing.org,
	nfont@linux.vnet.ibm.com, paulus@samba.org,
	"Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Subject: [PATCH 0/2] Two patches regarding EEH availability checks - DLPAR/DDW
Date: Tue, 19 Jan 2016 18:18:18 -0200	[thread overview]
Message-ID: <1453234700-27593-1-git-send-email-gpiccoli@linux.vnet.ibm.com> (raw)

We have 2 patches here to deal with checks of EEH availability before its use.
The issue that triggered these patches was related to hotplug-add a PCI device
with no other PCI device present in machine. Since EEH wouldn't be enabled in
this case, we hit an oops.

We already sent a patch to ppc-dev ("[PATCH] powerpc/eeh: Validate arch in
eeh_add_device_early()"), but Michael Ellerman made some good points that led us
to elaborate more our approach. Now, we have two patches instead of one:

(i) The first one aims to solve a specific issue in hotplug process: we have
lowered the "constraints" imposed by checking for eeh_enabled() result. To
achieve this, we've added a small function named eeh_available(). Instead of
checking if EEH is enabled on hotplug process (which is not always true), we
check if it's available based on running architecture (currently, only pSeries
and PowerNV have EEH capabilities).

(ii) The DDW mechanism has a "non-exposed" intrinsic dependency of EEH. We
rely on EEH to obtain the devices' config. address, so if EEH is not enabled
(for example if we boot with "eeh=off" on kernel command-line), we hit an oops
during device probe caused by DDW trying to use EEH struct. The 2nd patch in
this series inserts a check based on eeh_enabled() function, so the DDW
mechanism safely fallbacks to non-dynamic iommu if EEH is not enabled.

Guilherme G. Piccoli (2):
  powerpc/eeh: Check for EEH availability in eeh_add_device_early()
  powerpc/pseries: Check if EEH is enabled on DDW mechanism code

 arch/powerpc/kernel/eeh.c              | 19 ++++++++++++++++++-
 arch/powerpc/platforms/pseries/iommu.c |  6 ++++--
 2 files changed, 22 insertions(+), 3 deletions(-)

--
2.1.0

             reply	other threads:[~2016-01-19 20:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 20:18 Guilherme G. Piccoli [this message]
2016-01-19 20:18 ` [PATCH 1/2] powerpc/eeh: Check for EEH availability in eeh_add_device_early() Guilherme G. Piccoli
2016-02-02 22:44   ` Gavin Shan
2016-02-03 11:54     ` Guilherme G. Piccoli
2016-02-04  5:27       ` Gavin Shan
2016-01-19 20:18 ` [PATCH 2/2] powerpc/pseries: Check if EEH is enabled on DDW mechanism code Guilherme G. Piccoli
2016-02-02 23:48   ` Gavin Shan
2016-02-03 12:26     ` Guilherme G. Piccoli
2016-02-04  5:30       ` Gavin Shan
2016-04-07  0:23         ` Guilherme G. Piccoli
2016-02-01 12:47 ` [PATCH 0/2] Two patches regarding EEH availability checks - DLPAR/DDW Guilherme G. Piccoli

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=1453234700-27593-1-git-send-email-gpiccoli@linux.vnet.ibm.com \
    --to=gpiccoli@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    /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.