On Thu, Feb 06, 2020 at 03:23:03PM +1100, Alexey Kardashevskiy wrote:
>
>
> On 06/02/2020 14:17, Sam Bobroff wrote:
> > Older versions of skiboot only provide a single value in the device
> > tree property "ibm,mmio-atsd", even when multiple Address Translation
On Fri, Feb 07, 2020 at 01:39:14PM +1100, Sam Bobroff wrote:
> On Thu, Feb 06, 2020 at 03:23:03PM +1100, Alexey Kardashevskiy wrote:
> >
> >
> > On 06/02/2020 14:17, Sam Bobroff wrote:
> > > Older versions of skiboot only provide a single value in the device
, incorrectly, processed more than once.
Untangling this section can move the pe processing out of the loop and
also outside the locked section, correcting both problems.
Signed-off-by: Sam Bobroff
---
I have only compile tested this fix, Frederic Barrat (who discovered it) has
offered to test it (thanks
allbacks so
> the EEH fallback path (which removes and re-probes PCI devices)
> would be used.
I gave this a quick test with some added instrumentation, and I can see
that the new code is used during VF removal and it doesn't cause any new
problems. I agree that even if it's difficult
d remove the dead
> code that checks if the device is a VF.
>
> Signed-off-by: Oliver O'Halloran
Looks good, but you might want to consider using WARN_ON_ONCE() just in
case it gets hit a lot.
Reviewed-by: Sam Bobroff
> ---
> arch/powerpc/kernel/pci_dn.c | 17 +++-
hen CONFIG_PCI_IOV
> is selected, and rename them to reflect their actual usage rather than
> having them masquerade as generic code.
>
> Signed-off-by: Oliver O'Halloran
Nice cleanup,
Reviewed-by: Sam Bobroff
> ---
> arch/powerpc/include/asm/pci-bridge.h | 7
Signed-off-by: Sam Bobroff
---
Let's move the test into eeh_add_device_tree_late().
Thanks,
Sam.
arch/powerpc/kernel/eeh.c | 2 ++
arch/powerpc/kernel/of_platform.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/k
change is where EEH_PE_RECOVERING affects
eeh_pe_reset_and_recover() (used when a PE is passed back from
a guest to the host), but the test case doesn't seem to be any worse.
Reviewed-by: Sam Bobroff
> ---
> Sam Bobroff is working on implementing proper refcounting for EEH PEs,
>
l, meaning the pci_dev is already gone, the release
handler is already called, and the PDN can be removed there, or
b) returns non-null and atomically increases the refcount and the
release handler won't be called until after we've set the DEAD flag and
released our reference.
Looks g
considered un-actionable.
>
> Signed-off-by: Oliver O'Halloran
Other than the typo, looks good (I think it should always have been like
this):
Reviewed-by: Sam Bobroff
> ---
> arch/powerpc/kernel/eeh_driver.c | 12 ++--
> 1 file changed, 10 insertions(+), 2 deleti
On Tue, Sep 03, 2019 at 08:15:55PM +1000, Oliver O'Halloran wrote:
> When a device is surprise removed while undergoing IO we will probably
> get an EEH PE freeze due to MMIO timeouts and other errors. When a freeze
> is detected we send a recovery event to the EEH worker thread which will
> notify
On Tue, Sep 03, 2019 at 08:15:56PM +1000, Oliver O'Halloran wrote:
> Currently we print a stack trace in the event handler to help with
> debugging EEH issues. In the case of suprise hot-unplug this is unneeded,
> so we want to prevent printing the stack trace unless we know it's due to
> an actual
On Tue, Sep 03, 2019 at 08:15:57PM +1000, Oliver O'Halloran wrote:
> Support for switching CAPI cards into and out of CAPI mode was removed a
> while ago. Drop the comment since it's no longer relevant.
>
> Cc: Andrew Donnellan
> Signed-off-by: Oliver O'Halloran
On Tue, Sep 03, 2019 at 08:15:58PM +1000, Oliver O'Halloran wrote:
> When we reset PCI devices managed by a hotplug driver the reset may
> generate spurious hotplug events that cause the PCI device we're resetting
> to be torn down accidently. This is a problem for EEH (when the driver is
> EEH awa
> the device is present and only clear it if the device is fully recovered.
>
> Signed-off-by: Oliver O'Halloran
Looks good, although I think it would be clearer if you could separate
checking the slot from raising the alert.
Reviewed-by: Sam Bobroff
>
ace.
>
> Signed-off-by: Oliver O'Halloran
Looks good, and I tested it with the next patch and it seems to work.
But I think you should make it clear that this does not work with
the hardware "EEH error injection" facility accessible via debugfs in
err_injct (that doesn
ks good to me. Tested with the previous patch.
Tested-by: Sam Bobroff
Reviewed-by: Sam Bobroff
> ---
> arch/powerpc/kernel/eeh.c | 139 +-
> 1 file changed, 138 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/eeh.c b/arch/p
On Tue, Sep 17, 2019 at 11:45:14AM +1000, Oliver O'Halloran wrote:
> On Tue, Sep 17, 2019 at 11:04 AM Sam Bobroff wrote:
> >
> > On Tue, Sep 03, 2019 at 08:15:56PM +1000, Oliver O'Halloran wrote:
> > > Currently we print a stack trace in the event handler to he
On Thu, Sep 19, 2019 at 03:28:40PM -0500, Nathan Lynch wrote:
> Hello Sam,
>
> Sam Bobroff writes:
> > On PowerNV and pSeries, devices currently acquire EEH support from
> > several different places: Boot-time devices from eeh_probe_devices()
> > and eeh_addr_cach
provides no additional synchronization of the other EEH
state, it seems to be an effective way of providing the necessary
safety with a very low risk of introducing deadlocks.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh.h | 7
arch/powerpc/kernel/eeh_pe.c | 70
set to NULL on removal
(see eeh_rmv_from_parent_pe()) (PHB type PEs never have their parent
set, but aren't a problem: they can't be removed). If this does occur,
the traversal is terminated. This may leave the traversal incomplete,
but that is preferable to crashing.
Signed-off
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 7eb6ca1ab72b..eb37cb384ff4 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 15 +---
arch/powerpc/platforms/powernv/eeh-powernv.c | 38
2 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index b3245d0cfb22..c9d73070793e 100644
--- a/arch/powerpc/kernel
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh.c | 26 --
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index eb37cb384ff4..171be70b34d8 100644
--- a/arch/powerpc
Note that even though there is currently only one place where a PE can
be removed from the parent/child tree (eeh_rmv_from_parent_pe()), it
is still protected against concurrent removal in case that changes in
the future.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_pe.c | 26
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 171be70b34d8..cba16ca0694a 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_pe.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index 0486d3c6ff20..e89a30de2e7e 100644
--- a/arch/powerpc/kernel
ing, so any
PEs that stay longer will be the result of bugs.
The list can be examined by reading from the "eeh_pe_debug" file in
debugfs.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh.h | 4 +++
arch/powerpc/kernel/eeh.c | 21 ++
arch/power
There are now functions eeh_get_pe() and eeh_pe_get() which seems
likely to cause confusion.
Keep eeh_get_pe() because "get" is commonly used to refer to acquiring
a reference (which it does), and rename eeh_pe_get() to eeh_pe_find()
because it performs a search.
Signed-off-by: S
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/platforms/powernv/eeh-powernv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c
b/arch/powerpc/platforms/powernv/eeh-powernv.c
index c56a796dd894..12367ed2083b 100644
of PEs
that have been removed from the PHB tree, but not yet freed and makes that list
available in debugfs. Any PEs that remain orphans for very long are going to
be the result of bugs. It's extra risk because it itself could contain bugs,
but it could also be useful during debugging.
Cheers,
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 26d9367c41a1..c61bfaf4ca26 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_pe.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index b89ed46f14e6..0486d3c6ff20 100644
--- a/arch/powerpc
Synchronize access to eeh_pe.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index cba16ca0694a..26d9367c41a1 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch
On Fri, Sep 27, 2019 at 02:45:10PM +0200, Frederic Barrat wrote:
> Recent cleanup in the way EEH support is added to a device causes a
> kernel oops when the cxl driver probes a device and creates virtual
> devices discovered on the FPGA:
>
> BUG: Kernel NULL pointer dereference at 0x00a0
spinning in a loop. This
> results in a lot of spurious stack traces in the kernel log.
>
> Fix this by limiting it to printing one stack trace for each PE freeze. If
> the driver is truely stuck the kernel's hung task detector is better suited
> to reporting the probelm anyway.
didn't
> touch the pseries path. At least on pseries, if there's another
> unexpected case where the pdn is NULL, we should catch it more easily
> with the oops message.
OK. I agree that it's not worth doing more.
Reviewed-by: Sam Bobroff
> arch/powerpc/platforms/p
r
EEH: eeh_dev_check_failure: Frozen PHB#0-PE#0 detected
EEH: Recovering PHB#0-PE#0
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index d9279d0
On Thu, May 07, 2020 at 08:10:37AM -0500, wenxi...@linux.vnet.ibm.com wrote:
> From: Wen Xiong
>
> Several device drivers hit EEH(Extended Error handling) when triggering
> kdump on Pseries PowerVM. This patch implemented a reset of the PHBs
> in pci general code. PHB reset stop all PCI transacti
dump. PHB reset stop all PCI
> transactions from normal kernel. We have tested the patch in several
> enviroments:
> - direct slot adapters
> - adapters under the switch
> - a VF adapter in PowerVM
> - a VF adapter/adapter in KVM guest.
>
> Signed-off-by: Wen Xiong
Loo
Give a unique ID to each recovery event, to ease log parsing and
prepare for parallel recovery.
Also add some new messages with a very simple format that may be
useful to log-parsers.
Signed-off-by: Sam Bobroff
---
This patch should be applied on top of my recent(ish) set:
"powerp
alled by
traversing the tree of affected PEs from the top, stopping to call
handlers (in parallel) when a PE with devices is discovered. When the
calls for that PE are complete, traversal continues at each child PE.
Signed-off-by: Sam Bobroff
---
This patch should be applied on top of both:
"p
/eeh_pe_tree
Signed-off-by: Sam Bobroff
---
Here's some debug code I've been using for a long time while working on EEH. I
haven't posted it before because it wasn't possible to make the code safe
enough (to avoid either NULL or LIST_POISON), but with the recent safety w
I'm sorry to say I can no longer maintain this position.
Signed-off-by: Sam Bobroff
---
MAINTAINERS | 1 -
1 file changed, 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 496fd4eafb68..7e954e4a29e1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13187,7 +13187,6 @@ F: tool
On Thu, Apr 18, 2019 at 07:51:40PM +1000, Oliver O'Halloran wrote:
> On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote:
> > The PHB flag, PNV_PHB_FLAG_EEH, is set (on PowerNV) individually on
> > each PHB once the EEH subsystem is ready. It is the only use of the
> &g
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-o
On Thu, Apr 18, 2019 at 08:13:53PM +1000, Oliver O'Halloran wrote:
> On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote:
> > The EEH address cache is currently initialized and populated by a
> > single function: eeh_addr_cache_build(). While the initial population
> >
On Mon, May 06, 2019 at 03:58:45PM -0600, Alex Williamson wrote:
> On Fri, 19 Apr 2019 17:37:17 +0200
> Greg Kurz wrote:
>
> > If vfio_pci_register_dev_region() fails then we should rollback
> > previous changes, ie. unmap the ATSD registers.
> >
> > Signed-off-by: Greg Kurz
> > ---
>
> Applie
already the case) and at boot time, to support future
work.
Signed-off-by: Sam Bobroff
Reviewed-by: Alexey Kardashevskiy
---
arch/powerpc/kernel/pci-common.c | 4
arch/powerpc/kernel/pci_32.c | 4
arch/powerpc/kernel/pci_64.c | 12 +---
3 files changed, 13 insertions
step into a separate function and call it
from a core_initcall (rather than a subsys initcall).
This will allow future work to make use of the cache during boot time
PCI scanning.
Signed-off-by: Sam Bobroff
Reviewed-by: Alexey Kardashevskiy
---
arch/powerpc/include/asm/eeh.h | 3 +++
arch
che earlier
Patch 7/8: powerpc/eeh: EEH for pSeries hot plug
Patch 8/8: powerpc/eeh: Remove eeh_probe_devices() and eeh_addr_cache_build()
Sam Bobroff (6):
powerpc/64: Adjust order in pcibios_init()
powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag
powerpc/eeh: Improve debug messages around
lers to be incorrectly ignored).
To remedy this, clear the flag at the beginning of recovery
processing. The flag is still cleared at the end of recovery
processing, although it is no longer really necessary.
Also clear the flag during eeh_handle_special_event(), for the same
reasons.
Signed-off-by: S
Also remove useless comment.
Signed-off-by: Sam Bobroff
Reviewed-by: Alexey Kardashevskiy
---
arch/powerpc/kernel/eeh.c| 2 +-
arch/powerpc/platforms/powernv/eeh-powernv.c | 14
arch/powerpc/platforms/pseries/eeh_pseries.c | 23 +++-
3 files
Note that previously on pSeries, useless EEH sysfs files were created
for some devices that did not have EEH support and this change
prevents them from being created.
Signed-off-by: Sam Bobroff
---
v2 - As it's so small, merged the enablement message patch into this one (where
was
not previously possible (it was already possible on pSeries).
Signed-off-by: Sam Bobroff
---
v2 - Dropped changes to the PowerNV PHB EEH flag, instead refactor just enough
to
use the existing flag from multiple places.
- Merge the little remaining work from the above change into the
p the FW assignments otherwise things
> break. QEMU however doesn't do any BAR assignments and relies on that
> being handled by the guest. At boot time this is done by SLOF, but
> Linux only keeps SLOF around until it's extracted the device-tree.
> Once that's done SLOF
_alignment= with /chosen/linux,pci-probe-only is broken
> anyway.
Looks good to me. I gave it a quick test for regressions, with a host
and QEMU guest (with some passed-through devices) both using the patch
and it seemed fine.
Reviewed-by: Sam Bobroff
> ---
> arch/powerpc/kernel/pci_of_sca
On Mon, Mar 20, 2017 at 05:49:03PM +1100, Benjamin Herrenschmidt wrote:
> Otherwise KVM guests might mess with it even when told not
> to causing bad thing interrupts in the host
>
> Signed-off-by: Benjamin Herrenschmidt
I've tested this on a P8, with a kernel and QEMU close to their
respective
xes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE
interrupt controller")
Cc: sta...@vger.kernel.org
Signed-off-by: Sam Bobroff
---
The other obvious way to patch this would be to set state->guest_server in
kvmppc_xive_set_xive() and that does also work because ac
uot; being uninitialized, due to
init_ras_IRQ() executing before hugetlb_init().
To correct this, extract the part of init_ras_IRQ() that enables
hotplug event processing and place it in the machine_late_initcall
phase, which is guaranteed to be after hugetlb_init() is called.
Signed-off-by: S
), because the
"ibm,open-sriov-vf-bar-info" property is missing, causing it to bail
out early.
Correct this by zeroing the IOV resources in the bailout path, so that
they are not seen by pci_enable_resources().
Signed-off-by: Sam Bobroff
---
Hi,
This is a fix to allow EEH recovery to succ
Hello everyone,
Here is a set of some small, mostly idempotent, changes to improve
maintainability in some of the EEH code, primarily in eeh_driver.c.
I've kept them all small to aid review but perhaps they should be squashed down
before being applied.
Cheers,
Sam.
Sam Bobroff (9):
po
g but obscure the flow of
control.
So, remove it.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh_event.h | 3 ++-
arch/powerpc/kernel/eeh_driver.c | 42 +---
arch/powerpc/kernel/eeh_event.c | 4 ++--
3 files changed, 19 insertions(+), 30 dele
ed
on an invalid PE, which is now avoided.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh_event.h | 2 +-
arch/powerpc/kernel/eeh_driver.c | 29 +++--
arch/powerpc/kernel/eeh_event.c | 2 --
3 files changed, 12 insertions(+), 21 deletions(-)
diff
Commit "0ba17b05 powerpc/eeh: Remove reference to PCI device"
removed a call to pci_dev_get() from __eeh_addr_cache_get_device() but
did not update the comment to match.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_cache.c | 3 +--
1 file changed, 1 insertion(+), 2
Remove a test that checks if "frozen_bus" is NULL, because it cannot
have changed since it was tested at the start of the function and so
must be true here.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 24 +++-
1 file changed, 11 inserti
The name "frozen_bus" is misleading: it's not necessarily frozen, it's
just the PE's PCI bus.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_drive
r' and replace uses of 'frozen_bus' with 'bus'.
Also update the function's comment.
This should not change behaviour.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --g
eeh_reset_device() tests the value of 'bus' more than once but the
only caller, eeh_handle_normal_device() does this test itself and will
never pass NULL.
So, remove the dead tests.
This should not change behaviour.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c |
The caller will always pass NULL for 'rmv_data' when
'eeh_aware_driver' is true, so the first two calls to
eeh_pe_dev_traverse() can be combined without changing behaviour as
can the two arms of the final 'if' block.
This should not change behaviour.
Signed-off-by:
Checking for a "fully active" device state requires testing two flag
bits, which is open coded in several places, so add a function to do
it.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh.h | 6 ++
arch/powerpc/kernel/eeh.c
On Tue, Mar 06, 2018 at 04:49:48PM +1100, Russell Currey wrote:
> On Tue, 2018-03-06 at 11:00 +1100, Sam Bobroff wrote:
> > Checking for a "fully active" device state requires testing two flag
> > bits, which is open coded in several places, so add a function to do
>
Rename frozen_bus to bus in eeh_handle_normal_event()
Patch 6/9: powerpc/eeh: Clarify arguments to eeh_reset_device()
Patch 7/9: powerpc/eeh: Remove always-true tests in eeh_reset_device()
Patch 8/9: powerpc/eeh: Factor out common code eeh_reset_device()
Patch 9/9: powerpc/eeh: Add eeh_state_active() helper
Sa
g but obscure the flow of
control.
So, remove it.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh_event.h | 3 ++-
arch/powerpc/kernel/eeh_driver.c | 42 +---
arch/powerpc/kernel/eeh_event.c | 4 ++--
3 files changed, 19 insertions(+), 30 dele
ed
on an invalid PE, which is now avoided.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh_event.h | 2 +-
arch/powerpc/kernel/eeh_driver.c | 29 +++--
arch/powerpc/kernel/eeh_event.c | 2 --
3 files changed, 12 insertions(+), 21 deletions(-)
diff
Commit "0ba17b05 powerpc/eeh: Remove reference to PCI device"
removed a call to pci_dev_get() from __eeh_addr_cache_get_device() but
did not update the comment to match.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_cache.c | 3 +--
1 file changed, 1 insertion(+), 2
Remove a test that checks if "frozen_bus" is NULL, because it cannot
have changed since it was tested at the start of the function and so
must be true here.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 24 +++-
1 file changed, 11 inserti
The name "frozen_bus" is misleading: it's not necessarily frozen, it's
just the PE's PCI bus.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_drive
e' and replace uses of 'frozen_bus' with 'bus'.
Also update the function's comment.
This should not change behaviour.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --g
eeh_reset_device() tests the value of 'bus' more than once but the
only caller, eeh_handle_normal_device() does this test itself and will
never pass NULL.
So, remove the dead tests.
This should not change behaviour.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c |
The caller will always pass NULL for 'rmv_data' when
'eeh_aware_driver' is true, so the first two calls to
eeh_pe_dev_traverse() can be combined without changing behaviour as
can the two arms of the final 'if' block.
This should not change behaviour.
Signed-off-
Checking for a "fully active" device state requires testing two flag
bits, which is open coded in several places, so add a function to do
it.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh.h | 6 ++
arch/powerpc/kernel/eeh.c
The caller will always pass NULL for 'rmv_data' when
'eeh_aware_driver' is true, so the first two calls to
eeh_pe_dev_traverse() can be combined without changing behaviour as
can the two arms of the final 'if' block.
This should not change behaviour.
Signed-off-
rs, without access to the VCPU structure.
Signed-off-by: Sam Bobroff
---
Hello everyone,
I've tested this on P8 and P9, in lots of combinations of host and guest
threading modes and it has been fine but it does feel like a "tricky"
approach, so I still feel somewhat wary about it.
On Mon, Apr 23, 2018 at 11:06:35AM +0200, Cédric Le Goater wrote:
> On 04/16/2018 06:09 AM, David Gibson wrote:
> > On Thu, Apr 12, 2018 at 05:02:06PM +1000, Sam Bobroff wrote:
> >> It is not currently possible to create the full number of possible
> >> VCPUs (KVM_MAX_V
On Tue, Apr 24, 2018 at 01:48:25PM +1000, David Gibson wrote:
> On Tue, Apr 24, 2018 at 01:19:15PM +1000, Sam Bobroff wrote:
> > On Mon, Apr 23, 2018 at 11:06:35AM +0200, Cédric Le Goater wrote:
> > > On 04/16/2018 06:09 AM, David Gibson wrote:
> > > > On Thu, Apr 12,
From: Sam Bobroff
It is not currently possible to create the full number of possible
VCPUs (KVM_MAX_VCPUS) on Power9 with KVM-HV when the guest uses less
threads per core than it's core stride (or "VSMT mode"). This is
because the VCORE ID and XIVE offsets to grow beyond KVM
ddition of some useful messaging which should make future
maintenance easier (as an example, a recent fix in this area "powerpc/eeh: Fix
race with driver un/bind" would have required adding two lines rather than
42+/26-).
Cheers,
Sam.
Sam Bobroff (13):
powerpc/eeh: Add eeh_max_freezes to
.
Also remove the embedded newline from the existing message to make it
easier to grep for.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
Add a single log line at the end of successful EEH recovery, so that
it's clear that event processing has finished.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/k
at all if it wasn't needed.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 07e0a42035ce..54333f6c9d
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 54333f6c9d67..ca9a73fe9cc5 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc
The traversal functions eeh_pe_traverse() and eeh_pe_dev_traverse()
both provide their first argument as void * but every single user casts
it to the expected type.
Change the type of the first parameter from void * to the appropriate
type, and clean up all uses.
Signed-off-by: Sam Bobroff
To aid debugging, add a message to show when EEH processing for a PE
will be done at the device's parent, rather than directly at the
device.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/k
ependent.
Address this by assigning a priority to each result value, and always
merging to the highest priority. This renders the intent clear, and
provides a stable value for all orderings.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 36 ++--
Add a for_each-style macro for iterating through PEs without the
boilerplate required by a traversal function. eeh_pe_next() is now
exported, as it is now used directly in place.
Signed-off-by: Sam Bobroff
---
arch/powerpc/include/asm/eeh.h | 4
arch/powerpc/kernel/eeh_pe.c | 7
The same test is done in every EEH report function, so factor it out.
Since eeh_dev_removed() needs to be moved higher up in the file,
simplify it a little while we're at it.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 30 --
1 file change
To ease future refactoring, extract setting of the channel state
from the report functions out into their own functions. This increases
the amount of code that is identical across all of the report
functions.
Signed-off-by: Sam Bobroff
---
arch/powerpc/kernel/eeh_driver.c | 19
To ease future refactoring, extract calls to eeh_enable_irq() and
eeh_disable_irq() from the various report functions. This makes
the report functions initial sequences more similar, as well as making
the IRQ changes visible when reading eeh_handle_normal_event().
Signed-off-by: Sam Bobroff
201 - 300 of 340 matches
Mail list logo