[PATCH] powerpc/powernv: Remove misleading comment in pci.c

2016-01-07 Thread Russell Currey
PCI in powernv now supports quite a bit more than p5ioc2, so remove the outdated comment. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/powernv/pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/pla

Re: [PATCH] powerpc: add va_end()

2015-12-17 Thread Russell Currey
use a commit title that's a bit more detailed.  Right now it doesn't really allude to what it fixes or what it affects. Reviewed-by: Russell Currey <rus...@russell.cc> > --- >  arch/powerpc/kernel/prom_init.c  | 1 + >  arch/powerpc/platforms/powermac/bootx_init.c | 1 +

Re: [PATCH V2] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-26 Thread Russell Currey
On Fri, 2015-11-27 at 16:40 +1100, Stewart Smith wrote: > Russell Currey <rus...@russell.cc> writes: > > On BMC machines, console output is controlled by the OPAL firmware and is > > only flushed when its pollers are called.  When the kernel is in a panic > >

[PATCH V3] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-26 Thread Russell Currey
t+0x24/0x130 >[c00f1f603e30] [c00095b0] ret_from_kernel_thread+0x5c/0xac >---[ end Kernel panic - not This functionality is implemented as a kmsg_dumper as it seems to be the most sensible way to introduce platform-specific functionality to the panic function. Signed-off-by: Russel

[PATCH V2] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-24 Thread Russell Currey
adds a new kmsg_dumper which gets called at panic time to ensure panic output is not lost. It accomplishes this by calling OPAL_CONSOLE_FLUSH in the OPAL API, and if that is not available, the pollers are called enough times to (hopefully) completely flush the buffer. Signed-off-by: Russell Currey

Re: [PATCH V2] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-29 Thread Russell Currey
On Fri, 2015-11-27 at 18:21 +1100, Stewart Smith wrote: > Russell Currey <rus...@russell.cc> writes: > > On Fri, 2015-11-27 at 16:40 +1100, Stewart Smith wrote: > > > Russell Currey <rus...@russell.cc> writes: > > > > On BMC machines, console

[PATCH] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-23 Thread Russell Currey
adds a new kmsg_dumper which gets called at panic time to ensure panic output is not lost. It accomplishes this by calling OPAL_CONSOLE_FLUSH in the OPAL API, and if that is not available, the pollers are called enough times to (hopefully) completely flush the buffer. Signed-off-by: Russell Currey

[PATCH V2] powerpc/powernv: Remove support for p5ioc2

2016-01-12 Thread Russell Currey
lify the powernv PCI code. In addition, support for p5ioc2 has been dropped from skiboot. There's no reason to keep it around in the kernel. Signed-off-by: Russell Currey <rus...@russell.cc> --- V2: Remove pointless union and rebase on -next Tested on a P7IOC machine and a PHB3 machine. Sk

Re: [PATCH] powerpc/powernv: Remove support for p5ioc2

2016-01-12 Thread Russell Currey
On Wed, 2016-01-13 at 17:39 +1100, Andrew Donnellan wrote: > On 13/01/16 17:10, Russell Currey wrote: > > "p5ioc2 is used by approximately 2 machines in the world, and has never > > ever been a supported configuration." > > > > The code for p5ioc2 is es

[PATCH] powerpc/powernv: Remove support for p5ioc2

2016-01-12 Thread Russell Currey
lify the powernv PCI code. In addition, support for p5ioc2 has been dropped from skiboot. There's no reason to keep it around in the kernel. Signed-off-by: Russell Currey <rus...@russell.cc> --- Tested on a P7IOC machine and a PHB3 machine. Skiboot p5ioc2 removal patch: https://patchwo

Re: [V3] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2016-01-11 Thread Russell Currey
On Tue, 2016-01-12 at 14:44 +1100, Stewart Smith wrote: > Michael Ellerman <m...@ellerman.id.au> writes: > > On Fri, 2015-27-11 at 06:23:07 UTC, Russell Currey wrote: > > > On BMC machines, console output is controlled by the OPAL firmware and is > > > only fl

[PATCH] powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages

2016-01-12 Thread Russell Currey
kmsg dumper has been modified to support its new behaviour as an incremental flush. Signed-off-by: Russell Currey <rus...@russell.cc> --- This patch should be applied on top of "powerpc/powernv: Add a kmsg_dumper that flushes console output on panic", which was recently merged i

[PATCH] powerpc/pci: Fix SRIOV not building without EEH enabled

2016-06-16 Thread Russell Currey
. Fixes: 39218cd0 ("powerpc/eeh: EEH device for VF") Reported-by: Michael Ellerman <m...@ellerman.id.au> Cc: <sta...@vger.kernel.org> # 4.1+ Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/kernel/pci_dn.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH V3] powerpc/powernv: Remove support for p5ioc2

2016-02-07 Thread Russell Currey
lify the powernv PCI code. In addition, support for p5ioc2 has been dropped from skiboot. There's no reason to keep it around in the kernel. Signed-off-by: Russell Currey <rus...@russell.cc> --- V3: Remove now-useless variable "found_ioda" thanks to Gavin V2: Remove pointless union

Re: [PATCH] powerpc/eeh: Fix PE location code

2016-01-19 Thread Russell Currey
ent PE's location code. > > This reads the correct PE location code from "ibm,io-base-loc-code" > or "ibm,slot-location-code" property of PE parent bus's device node. > > Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> > --- Tested-by: Russel

Re: [PATCH] MAINTAINERS: rename EEH from "enhanced" to "extended" error handling

2016-02-16 Thread Russell Currey
On Wed, 2016-02-17 at 10:49 +1100, Russell Currey wrote: > On Wed, 2016-02-17 at 09:58 +1100, Gavin Shan wrote: > > > > On Wed, Feb 17, 2016 at 09:49:08AM +1100, Gavin Shan wrote: > > > > > > > > > On Tue, Feb 16, 2016

[PATCH] MAINTAINERS: Update EEH details and maintainership

2016-02-16 Thread Russell Currey
, I am taking over the maintainership. Signed-off-by: Russell Currey <rus...@russell.cc> --- MAINTAINERS | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 28eb61b..95d999e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4

[PATCH] MAINTAINERS: rename EEH from "enhanced" to "extended" error handling

2016-02-16 Thread Russell Currey
.txt), it's referred to as "extended", and in my opinion "extended" makes more sense for what EEH does. The only place "enhanced error handling" shows up in the kernel is in MAINTAINERS, so fix it. Signed-off-by: Russell Currey <rus...@russell.cc> --- I don't know what k

[PATCH] powerpc/eeh: rename EEH from "extended" to "enhanced" error handling

2016-02-16 Thread Russell Currey
tended" in some documentation. IBM originally defined EEH as "enhanced error handling", so standardise all mentions of EEH to use that term. Signed-off-by: Russell Currey <rus...@russell.cc> --- This is essentially a V2 (though it has the inverse result) of this patch: https://lists.ozl

Re: [PATCH 0/3] powerpc/eeh: Enhancement to EEH for VF

2016-03-01 Thread Russell Currey
Fs >   powerpc/eeh: Synchronize recovery in host/guest > >  arch/powerpc/kernel/eeh.c| 11 +++ >  arch/powerpc/kernel/eeh_driver.c | 13 - >  2 files changed, 19 insertions(+), 5 deletions(-) > For the whole series (incorporating

Re: [PATCH 3/3] powerpc/eeh: Synchronize recovery in host/guest

2016-03-01 Thread Russell Currey
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote: > When passing through SRIOV VFs to guest, we possibly encounter EEH > error on PF. In this case, the VF PEs are put into frozen state. > The error could be reported to guest before it's captured by the > host. That means the guest could attempt

[PATCH V2] powernv/hmi: Use the "unknown" checkstop type as a fallback

2016-03-15 Thread Russell Currey
The HMI code knows about three types of errors: CORE, NX and UNKNOWN. If OPAL were to add a new type, it would not be handled at all since there is no fallback case. Instead of explicitly checking for UNKNOWN, treat any checkstop type without a handler as unknown. Signed-off-by: Russell Currey

[PATCH] powernv/hmi: Use the "unknown" checkstop type as a fallback

2016-03-14 Thread Russell Currey
The HMI code knows about three types of errors: CORE, NX and UNKNOWN. If OPAL were to add a new type, it would not be handled at all since there is no fallback case. Instead of explicitly checking for UNKNOWN, treat any checkstop type without a handler as unknown. Signed-off-by: Russell Currey

Re: [PATCH] powernv/hmi: Use the "unknown" checkstop type as a fallback

2016-03-14 Thread Russell Currey
On Tue, 2016-03-15 at 16:36 +1100, Andrew Donnellan wrote: > On 15/03/16 16:15, Russell Currey wrote: > > > > > > > > Would it be useful to print xstop_type in the unknown case? > > I don't think so - if there's a new checkstop type, specific handling >

Re: [PATCH] powernv/hmi: Use the "unknown" checkstop type as a fallback

2016-03-14 Thread Russell Currey
On Tue, 2016-03-15 at 14:56 +1100, Andrew Donnellan wrote: > On 15/03/16 14:26, Russell Currey wrote: > > > > The HMI code knows about three types of errors: CORE, NX and UNKNOWN. > > If OPAL were to add a new type, it would not be handled at all since > > there is

[PATCH V3 1/2] pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-04-07 Thread Russell Currey
l doesn't know about this, and respecting it fixes some PCI failures when the hypervisor is busy. The delay is capped at 0.2 seconds. Cc: <sta...@vger.kernel.org> # 3.10+ Signed-off-by: Russell Currey <rus...@russell.cc> --- V3 changelog: - Refactorings and rewordings thanks to Gavin - T

[PATCH V3 2/2] pseries/eeh: Refactor the configure_bridge RTAS tokens

2016-04-07 Thread Russell Currey
ken that is assigned during init. Signed-off-by: Russell Currey <rus...@russell.cc> --- V3: Reorder commits so the previous patch doesn't depend on this I had a look at doing the same with some other duplicated tokens but they had slight differences in semantics so it wasn't helping clarity. -

[PATCH] pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-21 Thread Russell Currey
this, and respecting it fixes some PCI failures when the hypervisor is busy. The delay is capped at 0.2 seconds. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/pseries/eeh_pseries.c | 63 +--- 1 file changed, 47 insertions(+), 16 deletions(-) diff --git

Re: pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-23 Thread Russell Currey
On Wed, 2016-03-23 at 21:39 +1100, Michael Ellerman wrote: > On Wed, 2016-03-23 at 13:52 +1100, Russell Currey wrote: > > > > On Wed, 2016-03-23 at 11:38 +1100, Michael Ellerman wrote: > > > > > > On Tue, 2016-22-03 at 0

Re: [PATCH] pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-22 Thread Russell Currey
On Tue, 2016-03-22 at 11:34 +1100, Russell Currey wrote: > In the configure_pe and configure_bridge RTAS calls, the spec states > that values of 9900-9905 can be returned, indicating that software > should delay for 10^x (where x is the last digit, i.e. 990x) > milliseconds and atte

Re: pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-22 Thread Russell Currey
On Wed, 2016-03-23 at 11:38 +1100, Michael Ellerman wrote: > On Tue, 2016-22-03 at 00:34:55 UTC, Russell Currey wrote: > > > > In the configure_pe and configure_bridge RTAS calls, the spec states > > that values of 9900-9905 can be returned, indicating that software >

[PATCH] powerpc/swsusp: Only use tlbie in POWER4 mode

2016-03-01 Thread Russell Currey
now build, whether or not it works is a different story. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/include/asm/ppc_asm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 499d9f8..2

Re: [PATCH V2 1/2] pseries/eeh: Refactor the configure bridge RTAS tokens

2016-03-28 Thread Russell Currey
On Tue, 2016-03-29 at 16:26 +1100, Gavin Shan wrote: > On Tue, Mar 29, 2016 at 12:51:50PM +1000, Russell Currey wrote: > > /* > > * Necessary sanity check. We needn't check "get-config-addr-info" > > @@ -93,8 +98,7 @@ s

[PATCH V2 1/2] pseries/eeh: Refactor the configure bridge RTAS tokens

2016-03-28 Thread Russell Currey
. Cc: <sta...@vger.kernel.org> # 3.10- Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/pseries/eeh_pseries.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/

[PATCH V2 2/2] pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-28 Thread Russell Currey
this, and respecting it fixes some PCI failures when the hypervisor is busy. The delay is capped at 0.2 seconds. Cc: <sta...@vger.kernel.org> # 3.10- Signed-off-by: Russell Currey <rus...@russell.cc> --- V2: Use rtas_busy_delay and the new ibm_configure_pe token, refactoring --- arch/powerpc/platf

Re: [PATCH V2 2/2] pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-29 Thread Russell Currey
On Tue, 2016-03-29 at 08:51 -0700, Tyrel Datwyler wrote: > On 03/28/2016 07:51 PM, Russell Currey wrote: > > + /* > > +  * RTAS can return a delay value of up to 10^5 > > milliseconds > > +  * (RTAS_EXTENDED_DELAY_MAX), which is

Re: [PATCH V2 2/2] pseries/eeh: Handle RTAS delay requests in configure_bridge

2016-03-29 Thread Russell Currey
On Tue, 2016-03-29 at 20:49 +1100, Gavin Shan wrote: > On Tue, Mar 29, 2016 at 12:51:51PM +1000, Russell Currey wrote: > > > > In the configure_pe and configure_bridge RTAS calls, the spec states > > that values of 9900-9905 can be returned, indicating that software >

Re: [PATCH 1/3] powerpc/eeh: Ignore error handlers in eeh_pe_reset_and_recover()

2016-04-22 Thread Russell Currey
n't have a bound driver. > > This ignores all error handlers provided by device driver in > eeh_pe_reset_and_recover() to avoid the exceptional behaviour. > > Fixes: 5cfb20b9 ("powerpc/eeh: Emulate EEH recovery for VFIO devices") > Cc: sta...@vger.kernel.org #v3.18+ > S

Re: [PATCH 2/3] powerpc/eeh: Restore config from edev in eeh_pe_reset_and_recover()

2016-04-22 Thread Russell Currey
e. > > Fixes: 5cfb20b9 ("powerpc/eeh: Emulate EEH recovery for VFIO devices") > Cc: sta...@vger.kernel.org #v3.18+ > Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> > --- Reviewed-by: Russell Currey <rus...@russell.cc> _

Re: [PATCH 3/3] powerpc/eeh: Drop unnecessary label in eeh_pe_change_owner()

2016-04-22 Thread Russell Currey
ut on each patch! :) > > Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> > --- Reviewed-by: Russell Currey <rus...@russell.cc> ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/eeh: fix misleading indentation

2016-04-25 Thread Russell Currey
On Tue, 2016-04-26 at 15:02 +1000, Andrew Donnellan wrote: > Found by smatch. > > Signed-off-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com> Acked-by: Russell Currey <rus...@russell.cc> ___ Linuxppc-dev mailing list Linuxppc

Re: [PATCH 0213/1529] Fix typo

2016-05-23 Thread Russell Currey
On Mon, 2016-05-23 at 03:12 -0400, Robert P. J. Day wrote: > On Mon, 23 May 2016, Russell Currey wrote: > > > On Sat, 2016-05-21 at 14:03 +0200, Andrea Gelmini wrote: > > > Signed-off-by: Andrea Gelmini <andrea.gelm...@gelma.net> > > > --- > > >

Re: [PATCH 0244/1529] Fix typo

2016-05-22 Thread Russell Currey
On Sat, 2016-05-21 at 14:08 +0200, Andrea Gelmini wrote: > Signed-off-by: Andrea Gelmini <andrea.gelm...@gelma.net> > --- Acked-by: Russell Currey <rus...@russell.cc> >  arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH 0213/1529] Fix typo

2016-05-22 Thread Russell Currey
On Sat, 2016-05-21 at 14:03 +0200, Andrea Gelmini wrote: > Signed-off-by: Andrea Gelmini <andrea.gelm...@gelma.net> > --- This entire comment needs to be rewritten as it's incredibly confusing, but alas Acked-by: Russell Currey <rus...@russell.cc> >  arch/powerpc/include/

Re: [PATCH 0223/1529] Fix typo

2016-05-22 Thread Russell Currey
On Sat, 2016-05-21 at 14:05 +0200, Andrea Gelmini wrote: > Signed-off-by: Andrea Gelmini <andrea.gelm...@gelma.net> > --- Acked-by: Russell Currey <rus...@russell.cc> >  arch/powerpc/kernel/eeh_driver.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > di

Re: [PATCH] powernv/pci: Add PHB register dump debugfs handle

2016-07-25 Thread Russell Currey
On Fri, 2016-07-22 at 16:36 +1000, Gavin Shan wrote: > On Fri, Jul 22, 2016 at 03:23:36PM +1000, Russell Currey wrote: > > > > On EEH events the kernel will print a dump of relevant registers. > > If EEH is unavailable (i.e. CONFIG_EEH is disabled, a new platform > > do

Re: [PATCH] powernv/pci: Add PHB register dump debugfs handle

2016-07-25 Thread Russell Currey
On Tue, 2016-07-26 at 11:45 +1000, Michael Ellerman wrote: > Quoting Russell Currey (2016-07-22 15:23:36) > > > > On EEH events the kernel will print a dump of relevant registers. > > If EEH is unavailable (i.e. CONFIG_EEH is disabled, a new platform > > do

[PATCH v2] powernv/pci: Add PHB register dump debugfs handle

2016-07-27 Thread Russell Currey
be made available on demand. Signed-off-by: Russell Currey <rus...@russell.cc> --- V2 changes: - use a simple attribute instead of full fops thanks to mpe - miscellanous fixes thanks to Gavin - rename from "regdump" to "dump_regs" --- arch/powerpc/pl

[PATCH] powernv/pci: Add PHB register dump debugfs handle

2016-07-21 Thread Russell Currey
be made available on demand. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/powernv/pci-ioda.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c

[PATCH v3] powernv/pci: Add PHB register dump debugfs handle

2016-07-27 Thread Russell Currey
be made available on demand. Signed-off-by: Russell Currey <rus...@russell.cc> --- V3 changes: - use s64 instead of int for ret - check val != 1ULL instead of 1 - return -ENODEV instead of -EFAULT - check hose and phb in the same statement - whitespace c

Re: [PATCH 1/9] powerpc/powernv: Pass CPU-endian PE number to opal_pci_eeh_freeze_clear()

2016-08-01 Thread Russell Currey
owerpc/powernv: Don't escalate non-existing frozen PE") > Cc: sta...@vger.kernel.org # v4.3+ > Suggested-by: Paul Mackerras <pau...@samba.org> > Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> > --- Reviewed-by: Russell Currey <rus...@russell.cc> _

Re: [PATCH 2/9] powerpc/powernv: Use CPU-endian hub diag-data type in pnv_eeh_get_and_dump_hub_diag()

2016-08-01 Thread Russell Currey
pc/powernv: Drop PHB operation next_error()") > Cc: sta...@vger.kernel.org # v4.1+ > Suggested-by: Michael Ellerman <m...@ellerman.id.au> > Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> > --- Reviewed-by: Russell Currey <rus...@russell.cc> ___

[PATCH] powerpc/eeh: Fix slot locations on NPU and legacy platforms

2016-08-03 Thread Russell Currey
ition, EEH PEs for NPU devices have slot locations specified on the devices instead of buses due to their architecture, and these were not printed. This has been fixed by looking at the top device of a PE for a slot location before checking its bus. Fixes: 7e56f627768 "powerpc/eeh: Fix PE locatio

Re: [PATCH] powerpc/pci: Fix build with PCI_IOV=y and EEH=n

2016-07-04 Thread Russell Currey
gt;   arch/powerpc/kernel/pci_dn.c: In function ‘remove_dev_pci_data’: >   arch/powerpc/kernel/pci_dn.c:230:18: error: unused variable ‘edev’ > > Signed-off-by: Michael Ellerman <m...@ellerman.id.au> > --- Mistakes were made. Acked-by: Russell Currey <rus...@russell.cc> ___

[PATCH v2] powerpc: Add POWER9 architected mode to cputable

2017-02-16 Thread Russell Currey
PVR value of 0x0F05 means we are arch v3.00 compliant (i.e. POWER9). Acked-by: Michael Neuling <mi...@neuling.org> Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/kernel/cputable.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/po

Re: [PATCH] powerpc: Detect POWER9 architected mode

2017-02-16 Thread Russell Currey
anything valuable (though I suppose mentioning cputable in the commit message might add clarity). I guess A PVR of 0x0F05 means we are arch v3.00 compliant (i.e. POWER9) to steal from yours... > > > Signed-off-by: Russell Currey <rus...@russell.cc> > > Other

[PATCH] powerpc: Detect POWER9 architected mode

2017-02-16 Thread Russell Currey
Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/kernel/cputable.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 6a82ef039c50..d23a54b09436 100644 --- a/arch/powerpc/

Re: [bug report] powerpc/powernv: Support EEH reset for VF PE

2017-02-14 Thread Russell Currey
On Tue, 2017-02-14 at 16:39 +0300, Dan Carpenter wrote: > Hello Wei Yang, > > The patch 9312bc5bab59: "powerpc/powernv: Support EEH reset for VF > PE" from Mar 4, 2016, leads to the following static checker warning: > > arch/powerpc/platforms/powernv/eeh-powernv.c:1033

Re: [PATCH v2] powerpc: Add POWER9 architected mode to cputable

2017-02-17 Thread Russell Currey
On Fri, 2017-02-17 at 21:26 +1100, Michael Ellerman wrote: > Russell Currey <rus...@russell.cc> writes: > > > diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c > > index 6a82ef039c50..d23a54b09436 100644 > > --- a/arch/powerpc/kernel/cpu

Re: [PATCH v2] powerpc: Add POWER9 architected mode to cputable

2017-02-17 Thread Russell Currey
On Fri, 2017-02-17 at 21:26 +1100, Michael Ellerman wrote: > Russell Currey <rus...@russell.cc> writes: > > > diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c > > index 6a82ef039c50..d23a54b09436 100644 > > --- a/arch/powerpc/kernel/cpu

Re: [PATCH] powerpc/eeh: Enable IO path on permanent error

2017-01-17 Thread Russell Currey
h prior to putting the devices > into quiet state. > > Link: https://github.com/open-power/supermicro-openpower/issues/419 > Reported-by: Pridhiviraj Paidipeddi <ppaid...@linux.vnet.ibm.com> > Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> > --- (forgot to ack this) Acked-by: Russell Currey <rus...@russell.cc>

Re: [RESEND-RFC v2 1/3] powerpc/eeh: Refactor eeh_pe_update_time_stamp() to update freeze_count

2017-03-01 Thread Russell Currey
On Wed, 2017-03-01 at 21:56 +0530, Vaibhav Jain wrote: > Thanks for reviewing the patch !! > > "Guilherme G. Piccoli" writes: > > > > Not sure why, but many of the words in commit message are missing their > > first letter. See, for example: > > reeze_count,  roze,  

Re: [RFC 3/3] cxl: Reset freeze counters before adapter PERST for flashing new image

2017-02-28 Thread Russell Currey
[resending this since it didn't get delivered to the list] On Tue, 2017-02-28 at 12:52 +0530, Vaibhav Jain wrote: > The patch resets the freeze counter on eeh_pe struct for PHB > associated with the cxl pci adapter. This would enable re-flashing of > the cxl-adapter beyond the default limit of 5.

Re: [RFC 2/3] powerpc/eeh: Introduce function eeh_pe_reset_freeze_counter

2017-02-28 Thread Russell Currey
On Tue, 2017-02-28 at 12:32 +0530, Vaibhav Jain wrote: > This patch introduces function eeh_pe_reset_freeze_counter which can > be used to reset the PE's freeze count variable outside eeh code. This > is useful for devices that can acquire a different personality after > a PERST event (e.g FPGA

Re: [RFC 1/3] powerpc/eeh: Refactor eeh_pe_update_time_stamp to update freeze_count

2017-02-28 Thread Russell Currey
On Tue, 2017-02-28 at 12:32 +0530, Vaibhav Jain wrote: > This patch introduces a new function named > eeh_pe_update_freeze_counter replacing existing function > eeh_pe_update_time_stamp. The new function also manages the value of > freeze_count along with tstamp to track the number of times the PE

[PATCH 1/3] powerpc/eeh: Null check uses of eeh_pe_bus_get

2016-09-11 Thread Russell Currey
eeh_pe_bus_get() can return NULL if a PCI bus isn't found for a given PE. Some callers don't check this, and can cause a null pointer dereference under certain circumstances. Fix this by checking NULL everywhere eeh_pe_bus_get() is called. Cc: stable #3.10+ Signed-off-by: Russell Currey <

[PATCH 2/3] powernv/eeh: Skip finding bus for VF resets

2016-09-11 Thread Russell Currey
reset function to occur before finding and checking the bus. Cc: stable #3.10+ Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/powernv/eeh-powernv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/eeh-powern

[PATCH 3/3] powerpc/eeh: Skip finding bus until after failure reporting

2016-09-11 Thread Russell Currey
retrieval and error check after the eeh_report_failure() calls. Cc: stable #3.10+ Signed-off-by: Russell Currey <rus...@russell.cc> --- 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/

[PATCH] powernv/pci: Fix m64 checks for SR-IOV and window alignment

2016-09-14 Thread Russell Currey
: 5958d19a143e ("Fix incorrect PE reservation attempt on some 64-bit BARs") Reported-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/powernv/pci-ioda.c | 11 +-- 1 file changed, 9 insertions(+), 2 de

Re: [PATCH] powernv/pci: Fix m64 checks for SR-IOV and window alignment

2016-09-19 Thread Russell Currey
On Wed, 2016-09-14 at 21:30 +1000, Gavin Shan wrote: > On Wed, Sep 14, 2016 at 05:51:08PM +1000, Benjamin Herrenschmidt wrote: > > > > On Wed, 2016-09-14 at 16:37 +1000, Russell Currey wrote: > > > > > > Commit 5958d19a143e checks for prefetchable m64 BARs

Re: [1/3] powerpc/eeh: Null check uses of eeh_pe_bus_get

2016-09-20 Thread Russell Currey
On Wed, 2016-09-21 at 14:02 +1000, Michael Ellerman wrote: > On Mon, 2016-12-09 at 04:17:22 UTC, Russell Currey wrote: > > > > eeh_pe_bus_get() can return NULL if a PCI bus isn't found for a given PE. > > Some callers don't check this, and can cause a null pointer derefere

Re: [PATCH] powerpc/eeh/of: use builtin_platform_driver

2016-11-23 Thread Russell Currey
On Wed, 2016-11-23 at 22:58 +0800, Geliang Tang wrote: > Use builtin_platform_driver() helper to simplify the code. > > Signed-off-by: Geliang Tang <geliangt...@gmail.com> > --- Acked-by: Russell Currey <rus...@russell.cc>

[PATCH] powerpc/eeh: Refactor EEH PE reset functions

2016-11-16 Thread Russell Currey
: - eeh_pe_reset(): stays as is, performs a single operation, exported - eeh_pe_reset_full(): new, full reset process that calls eeh_pe_reset() - eeh_reset_pe(): removed and replaced by eeh_pe_reset_full() - eeh_reset_pe_once(): removed Signed-off-by: Russell Currey <rus...@russell.cc> -

Re: [PATCH] powerpc/eeh: Refactor EEH PE reset functions

2016-11-17 Thread Russell Currey
On Fri, 2016-11-18 at 10:59 +1100, Gavin Shan wrote: > On Thu, Nov 17, 2016 at 04:07:47PM +1100, Russell Currey wrote: > > eeh_pe_reset and eeh_reset_pe are two different functions in the same > > file which do mostly the same thing.  Not only is this confusing, but > &g

[PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported

2016-11-15 Thread Russell Currey
and misleading warning message. Skip the warning message on init if OPAL_UNSUPPORTED is returned. As far as I'm aware, this currently only affects NPUs. Fixes: 313483d ("powerpc/powernv: Unfreeze PE on allocation") Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/p

[PATCH] powerpc/pci: Always print PHB and PE numbers as hexadecimal

2016-11-15 Thread Russell Currey
two characters instead of three, so the above would be pci 000a:01 : [PE# 00] Secondary bus 1 associated with PE#0 which gives a hint it's in hex. Signed-off-by: Russell Currey <rus...@russell.cc> --- I think I caught them all, if I didn't, let me know! --- arch/powerpc/kernel

[PATCH] powerpc: Use octal numbers for file permissions

2017-01-11 Thread Russell Currey
in this patch) which hurts readability. Signed-off-by: Russell Currey <rus...@russell.cc> --- I wondered what a "S_IRUGO" was and subsequently found the following: https://lwn.net/Articles/696229/ so I figured making numeric constants standard across the tree was a g

Re: [PATCH] powerpc/eeh: fix deadlock when PE frozen state can't be cleared

2016-11-30 Thread Russell Currey
s: 78954700631f ("powerpc/eeh: Avoid I/O access during PE reset") > Cc: sta...@vger.kernel.org > Signed-off-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com> > --- Locking in this function is such a mess, we (I) should revisit it at some point. Acked-by: Russell Currey <rus...@russell.cc>

Re: [PATCH] powerpc/eeh: Enable IO path on permanent error

2017-01-05 Thread Russell Currey
On Fri, 2017-01-06 at 10:39 +1100, Gavin Shan wrote: > We give up recovery on permanent error, simply shutdown the affected > devices and remove them. If the devices can't be put into quiet state, > they spew more traffic that is likely to cause another unexpected EEH > error. This was observed on

Re: [PATCH] powerpc: Use octal numbers for file permissions

2017-01-15 Thread Russell Currey
On Fri, 2017-01-13 at 13:41 +0530, Balbir Singh wrote: > On Thu, Jan 12, 2017 at 02:54:13PM +1100, Russell Currey wrote: > > Symbolic macros are unintuitive and hard to read, whereas octal constants > > are much easier to interpret.  Replace macros for the basic permission > &

[PATCH] powerpc/powernv/pci: Reduce spam when dumping PEST

2017-04-10 Thread Russell Currey
for 255 PEs. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/powernv/pci.c | 52 ++-- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c

[PATCH v2] powerpc/eeh: Avoid use after free in eeh_handle_special_event()

2017-04-10 Thread Russell Currey
make sure the PE is valid when attempting to clear state in eeh_handle_special_event(). Cc: <sta...@vger.kernel.org> #3.10+ Reported-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Russell Currey <rus...@russell.cc> --- V2: check a specific return path instead of lookin

Re: [PATCH] powerpc/powernv/pci: Reduce spam when dumping PEST

2017-04-21 Thread Russell Currey
On Fri, 2017-04-21 at 13:29 +1000, Gavin Shan wrote: > On Mon, Apr 10, 2017 at 03:53:28PM +1000, Russell Currey wrote: > > Dumping the PE State Tables (PEST) can be highly verbose if a number of PEs > > are affected, especially in the case where the whole PHB is frozen and 25

Re: [PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Russell Currey
On Thu, 2017-04-20 at 09:48 +1000, Gavin Shan wrote: > On Wed, Apr 19, 2017 at 05:39:27PM +1000, Russell Currey wrote: > > Remove unnecessary tags in eeh_handle_normal_event(), and add function > > comments for eeh_handle_normal_event() and eeh_handle_special_event(). > > &g

[PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Russell Currey
of this and suggesting you reseat the device, there are two separate messages. Suggested-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Russell Currey <rus...@russell.cc> --- V3: new. Thanks to Alexey for the suggestions. --- arch/powerpc/kernel/eeh_driver.c | 36 ---

Re: [RESEND-RFC v2 2/3] powerpc/eeh: Introduce function eeh_pe_reset_freeze_counter()

2017-03-02 Thread Russell Currey
On Fri, 2017-03-03 at 09:51 +0530, Vaibhav Jain wrote: > Hi Russell, > > Vaibhav Jain writes: > > > This patch introduces function eeh_pe_reset_freeze_counter() which can > > be used to reset the PE's freeze count variable outside eeh code. This > > is useful for

[PATCH] powerpc/eeh: Avoid use after free in eeh_handle_special_event()

2017-03-02 Thread Russell Currey
make sure the PE is valid when attempting to clear state in eeh_handle_special_event(). Cc: <sta...@vger.kernel.org> #3.10+ Reported-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/kernel/eeh_driver.c | 13 + 1

[PATCH v3 1/2] powerpc/eeh: Avoid use after free in eeh_handle_special_event()

2017-04-19 Thread Russell Currey
make sure the PE is valid when attempting to clear state in eeh_handle_special_event(). Cc: <sta...@vger.kernel.org> #3.10+ Reported-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Russell Currey <rus...@russell.cc> --- V2: check a specific return path instead of look

Re: [PATCH] powerpc/powernv/pci: Return failure for some uses of dma_set_mask()

2017-07-27 Thread Russell Currey
hen the request could not be > fulfilled which allows drivers to either fallback or implement other > workarounds as documented in DMA-API-HOWTO.txt. > > Signed-off-by: Alistair Popple <alist...@popple.id.au> Acked-by: Russell Currey <rus...@russell.cc>

Re: [PATCH v4] powerpc/powernv: Enable PCI peer-to-peer

2017-08-07 Thread Russell Currey
_p2p(struct pci_dev *initiator, struct pci_dev *target, > uint64_t desc) > > It uses a new OPAL call, as the configuration magic is done on the > PHBs by skiboot. > > Signed-off-by: Frederic Barrat <fbar...@linux.vnet.ibm.com> > --- Reviewed-by: Russell Currey <rus...@russell.cc>

[PATCH 2/2] powerpc/powernv/pci: Enable 64-bit devices to access >4GB DMA space

2017-06-21 Thread Russell Currey
mode is only enabled if a device requests 4GB or more of DMA address space, if the system has PHB3 (POWER8 systems), and if the device does not share a PE with any devices from different vendors. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/powernv/pci-ioda.

[PATCH 1/2] powerpc/powernv/pci: Add helper to check if a PE has a single vendor

2017-06-21 Thread Russell Currey
Add a helper that determines if all the devices contained in a given PE are all from the same vendor or not. This can be useful in determining if it's okay to make PE-wide changes that may be suitable for some devices but not for others. This is used later in the series. Signed-off-by: Russell

[PATCH 1/3] powerpc/powernv/pci: Reduce spam when dumping PEST

2017-05-29 Thread Russell Currey
it can get for 512 PEs. Signed-off-by: Russell Currey <rus...@russell.cc> --- This is essentially V2 of a previous patch I submitted, with some changes thanks to feedback from Gavin. --- arch/powerpc/platforms/powernv/pci.c | 50 +--- 1 file changed, 30 inse

[PATCH 3/3] powerpc/powernv/pci: Add support for PHB4 diagnostics

2017-05-29 Thread Russell Currey
As with P7IOC and PHB3, add kernel-side support for decoding and printing diagnostic data for PHB4. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/include/asm/opal-api.h | 75 - arch/powerpc/platforms/powernv/pci.c

[PATCH 2/3] powerpc/powernv/pci: Dynamically allocate PHB diag data

2017-05-29 Thread Russell Currey
the hardcoded buffer size as before. For those that do, only allocate exactly what's needed. In the special case of P7IOC (which has two types of diag data), the larger should be specified in the device tree. Signed-off-by: Russell Currey <rus...@russell.cc> --- arch/powerpc/platforms/power

[PATCH v2 2/3] powerpc/powernv/pci: Dynamically allocate PHB diag data

2017-06-13 Thread Russell Currey
the hardcoded buffer size as before. For those that do, only allocate exactly what's needed. In the special case of P7IOC (which has two types of diag data), the larger should be specified in the device tree. Signed-off-by: Russell Currey <rus...@russell.cc> --- No changes from v1 arch/p

[PATCH v2 1/3] powerpc/powernv/pci: Reduce spam when dumping PEST

2017-06-13 Thread Russell Currey
it can get for 512 PEs. Signed-off-by: Russell Currey <rus...@russell.cc> --- v2: Made a constant instead of ">> 63" grossness thanks to mpe & ajd --- arch/powerpc/platforms/powernv/pci.c | 51 ++-- arch/powerpc/platforms/powernv/pci.h |

[PATCH v2 3/3] powerpc/powernv/pci: Add support for PHB4 diagnostics

2017-06-13 Thread Russell Currey
As with P7IOC and PHB3, add kernel-side support for decoding and printing diagnostic data for PHB4. Signed-off-by: Russell Currey <rus...@russell.cc> --- No changes from v1 arch/powerpc/include/asm/opal-api.h | 75 - arch/powerpc/platforms/powernv/pci.c

Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized

2017-09-20 Thread Russell Currey
On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > > Otherwise we end up not yet having computed the right > > diag data size on powernv where EEH initialization > > is delayed, thus causing memory corruption later on > >

Re: [PATCH 2/2] powerpc/powernv: Rework EEH initialization on powernv

2017-09-13 Thread Russell Currey
re_initcall() like it does on pseries by removing > the hack in eeh_init() that delays it. > > Instead we make sure our eeh->probe cleanly bails > out of the PEs haven't been created yet and we force > a re-probe where we used to call eeh_init() again. > > Signed-off-by: Be

  1   2   3   4   5   >