All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Two patches regarding EEH availability checks - DLPAR/DDW
@ 2016-01-19 20:18 Guilherme G. Piccoli
  2016-01-19 20:18 ` [PATCH 1/2] powerpc/eeh: Check for EEH availability in eeh_add_device_early() Guilherme G. Piccoli
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Guilherme G. Piccoli @ 2016-01-19 20:18 UTC (permalink / raw)
  To: mpe, linuxppc-dev; +Cc: gwshan, benh, nfont, paulus, Guilherme G. Piccoli

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-04-07  0:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 20:18 [PATCH 0/2] Two patches regarding EEH availability checks - DLPAR/DDW Guilherme G. Piccoli
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

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.