[PATCH v3 2/4] selftests/powerpc: Move get_auxv_entry() to harness.c

2015-04-06 Thread Sam Bobroff
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff --- tools/testing/selftests/powerpc/harness.c | 47 + tools/testing/selftests/powerpc/pmu/lib.c | 47 - tools

[PATCH v3 0/4] powerpc/tm: Abort syscalls in active transactions

2015-04-06 Thread Sam Bobroff
nto ten seconds, to better test for failures that occur more rarely. This has stabilised the results, and it's no longer necessary to use special compiler or linker flags. Patch 4/4: powerpc/tm: Correct minor documentation typos Discovered some typos while updating the documentation. Sam Bobr

[PATCH v3 1/4] powerpc/tm: Abort syscalls in active transactions

2015-04-06 Thread Sam Bobroff
ame across powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff Acked-By: Michael Neuling --

[PATCH v3 3/4] selftests/powerpc: Add transactional syscall test

2015-04-06 Thread Sam Bobroff
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff --- v2: Further testing has shown that the success or failure of the transactions was affected by minor

[PATCH v3 4/4] powerpc/tm: Correct minor documentation typos

2015-04-06 Thread Sam Bobroff
Signed-off-by: Sam Bobroff --- v2: Discovered some typos while updating the documentation. Documentation/powerpc/transactional_memory.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc

[PATCH 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-19 Thread Sam Bobroff
instruction which, depending on endianness, will cause either the lower or upper 32 bits to be missed. In another case it is cast as a u32, causing the upper 32 bits to be cleared. This patch corrects those places by extending the access methods to 64 bits. Signed-off-by: Sam Bobroff --- arch

Re: [PATCH 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-25 Thread Sam Bobroff
On Mon, May 25, 2015 at 11:08:08PM +0200, Alexander Graf wrote: > > > On 20.05.15 07:26, Sam Bobroff wrote: > > In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 > > bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is > > acce

[PATCH v2 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-25 Thread Sam Bobroff
instruction which, depending on endianness, will cause either the lower or upper 32 bits to be missed. In another case it is cast as a u32, causing the upper 32 bits to be cleared. This patch corrects those places by extending the access methods to 64 bits. Signed-off-by: Sam Bobroff --- v2: Also

Re: [PATCH v2 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Sam Bobroff
On Tue, May 26, 2015 at 10:35:08AM +0200, Alexander Graf wrote: > > > On 26.05.15 02:27, Sam Bobroff wrote: > > In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 > > bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is > > acce

[PATCH v3 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Sam Bobroff
instruction which, depending on endianness, will cause either the lower or upper 32 bits to be missed. In another case it is cast as a u32, causing the upper 32 bits to be cleared. This patch corrects those places by extending the access methods to 64 bits. Signed-off-by: Sam Bobroff --- v3

[PATCH 1/1] powerpc/tm: Abort syscalls in active transactions (v2)

2015-06-11 Thread Sam Bobroff
ot support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a normal (non-aborted) system call increases by about 0.25%. Signed-off-by: Sam Bobroff --- Documentation/powerpc/transactional_memory

Re: [PATCH v3 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-08-05 Thread Sam Bobroff
Ping? I think I've addressed all the comments in this version. Is there anything else I need to look at? Cheers, Sam. On Wed, May 27, 2015 at 09:56:57AM +1000, Sam Bobroff wrote: > In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 > bit field (e.g. in k

Re: [PATCH v2] powerpc/xmon: Allow limiting the size of the paca display

2015-08-13 Thread Sam Bobroff
On Wed, Aug 12, 2015 at 09:55:25PM +1000, Michael Ellerman wrote: > The paca display is already more than 24 lines, which can be problematic > if you have an old school 80x24 terminal, or more likely you are on a > virtual terminal which does not scroll for whatever reason. > > We'd like to expand

[PATCH 1/1] powerpc/xmon: Paged output for paca display

2015-08-13 Thread Sam Bobroff
= 0x0 (0x2bc) irq_work_pending = 0x0 (0x2bd) nap_state_lost = 0x0 (0x2be) 0:mon> (Based on a similar patch by Michael Ellerman "[v2] powerpc/xmon: Allow limiting the size of the paca display". This patch is an alternative and canno

Re: [PATCH v3] powerpc: Add an inline function to update POWER8 HID0

2015-08-13 Thread Sam Bobroff
inline function name update_power8_hid0() which follows this > recipe and invoke it from the static split core path. > > Signed-off-by: Gautham R. Shenoy Hi Gautham, I've tested this on a Power 8 machine and verified that it is able to change split modes and that when doing so the new code

Re: [PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit

2015-08-13 Thread Sam Bobroff
gt; spurious trap number. > > Fix this by copying r12 into r3 before calling kvmhv_commence_exit as > r12 contains the trap number > > Signed-off-by: Gautham R. Shenoy Hi Gautham, I agree with your logic: r3 is quite clearly corrupted in that path. So: Reviewed-by: Sam Bobroff

Re: [1/1] powerpc/xmon: Paged output for paca display

2015-08-19 Thread Sam Bobroff
On Tue, Aug 18, 2015 at 04:26:32PM +1000, Michael Ellerman wrote: > On Fri, 2015-14-08 at 02:55:14 UTC, Sam bobroff wrote: > > The paca display is already more than 24 lines, which can be problematic > > if you have an old school 80x24 terminal, or more likely you are on a >

[PATCH 3/3] powerpc: Document sysfs DSCR interface

2014-05-20 Thread Sam Bobroff
Add some documentation about ... /sys/devices/system/cpu/dscr_default /sys/devices/system/cpu/cpuN/dscr ... to Documentation/ABI/stable. Signed-off-by: Sam Bobroff --- Documentation/ABI/stable/sysfs-devices-system-cpu | 25 + 1 file changed, 25 insertions(+) create mode

[PATCH 2/3] powerpc: fix regression of per-CPU DSCR setting

2014-05-20 Thread Sam Bobroff
all of the per-CPU values and reads return the last written value. The new per-CPU default is added to the paca_struct and is used everywhere outside of sysfs.c instead of the old global default. Signed-off-by: Sam Bobroff --- arch/powerpc/include/asm/paca.h |3 +++ arch/powerpc/

[PATCH 0/3] powerpc: fix regression of per-CPU DSCR setting

2014-05-20 Thread Sam Bobroff
any performance cost; if anything it should get slightly faster due to the per-CPU value being easier to access than the old global default. Sam Bobroff (3): powerpc: Split __SYSFS_SPRSETUP macro powerpc: fix regression of per-CPU DSCR setting powerpc: Document sysfs DSCR interface Documenta

[PATCH 1/3] powerpc: Split __SYSFS_SPRSETUP macro

2014-05-20 Thread Sam Bobroff
Split the __SYSFS_SPRSETUP macro into two parts so that registers requiring custom read and write functions can use common code for their show and store functions. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/sysfs.c | 19 +-- 1 file changed, 13 insertions(+), 6

[PATCH 1/1] powerpc: correct DSCR during TM context switch

2014-06-03 Thread Sam Bobroff
;> 56) == TM_CAUSE_RESCHED) { putchar('!'); fflush(stdout); i++; } else { putchar('.'); fflush(stdout); } if (dscr2 != dscr1) { printf("\n DSCR incorrect: 0x%lx (expecting 0x%lx)\n", dscr2, ds

Re: [PATCH 1/1] powerpc: correct DSCR during TM context switch

2014-06-04 Thread Sam Bobroff
On 04/06/14 20:03, Michael Neuling wrote: > On Wed, 2014-06-04 at 17:31 +1000, Michael Ellerman wrote: >> Hi Sam, >> >> Comments inline .. > > Ditto Responses inline... >> On Wed, 2014-06-04 at 13:33 +1000, Sam Bobroff wrote: >>> Correct the DSCR

[PATCH 1/1 v2] powerpc: Correct DSCR during TM context switch

2014-06-04 Thread Sam Bobroff
it resumes the transaction. The fix is to treat the DSCR similarly to the TAR and save it early in __switch_to(). A program exposing the problem is added to the kernel self tests as: tools/testing/selftests/powerpc/tm/tm-resched-dscr. Signed-off-by: Sam Bobroff --- Changes: v2: * Reworked commit message.

[PATCH 1/1] selftests/powerpc: fix TARGETS in powerpc selftests makefile

2014-06-24 Thread Sam Bobroff
l. Signed-off-by: Sam Bobroff --- tools/testing/selftests/powerpc/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 54833a7..84795c0 100644 --- a/tools/testing/selftes

Re: [PATCH V3 0/3] Add new PowerPC specific ELF core notes

2014-07-17 Thread Sam Bobroff
On 17/07/14 21:14, Michael Neuling wrote: > > On Jul 17, 2014 9:11 PM, "Benjamin Herrenschmidt" > mailto:b...@kernel.crashing.org>> wrote: >> >> > > >> > >> Outstanding Issues >> > >> == >> > >> (1) Running DSCR register value inside a transaction does not > seem to be saved >> > >

Re: [PATCH V3 0/3] Add new PowerPC specific ELF core notes

2014-07-23 Thread Sam Bobroff
On 24/05/14 01:15, Anshuman Khandual wrote: > This patch series adds five new ELF core note sections which can be > used with existing ptrace request PTRACE_GETREGSET/SETREGSET for accessing > various transactional memory and miscellaneous register sets on PowerPC > platform. Please find a te

Re: [PATCH V3 2/3] powerpc, ptrace: Enable support for transactional memory register sets

2014-07-23 Thread Sam Bobroff
On 24/05/14 01:15, Anshuman Khandual wrote: > This patch enables get and set of transactional memory related register > sets through PTRACE_GETREGSET/PTRACE_SETREGSET interface by implementing > four new powerpc specific register sets i.e REGSET_TM_SPR, REGSET_TM_CGPR, > REGSET_TM_CFPR, REGSET_CVMX

suspicious RCU usage clockevents_lock, tick_broadcast_lock, hrtimer_bases.lock

2015-02-12 Thread Sam Bobroff
Hello, I'm receiving this while booting a vanilla 3.19 kernel on a Power 8 machine: [2.522179] device-mapper: uevent: version 1.0.3 [2.522741] device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-de...@redhat.com [2.543590] [2.543630] === [

Re: [PATCH] powerpc/powernv: Check image loaded or not before calling flash

2015-02-12 Thread Sam Bobroff
>> So if reboot is issued before the subsys init stage then we endup displaying >> "Flashing new firmware" message.. which may confuse end user. >> >> This patch adds additional validation to make sure image is actually loaded >> or not. >> >> R

Re: [RFC] powerpc: use ticket spin lock for !CONFIG_PPC_SPLPAR

2015-03-15 Thread Sam Bobroff
On 13/03/15 18:14, Benjamin Herrenschmidt wrote: > On Fri, 2015-03-13 at 18:09 +1100, Michael Ellerman wrote: >> On Thu, 2015-03-12 at 22:13 +1100, Benjamin Herrenschmidt wrote: >>> On Thu, 2015-03-12 at 18:55 +0800, Kevin Hao wrote: I know Torsten Duwe has tried to add the ticket spinlock for

[PATCH 0/3] powerpc/tm: Abort syscalls in active transactions

2015-03-18 Thread Sam Bobroff
See the first patch for a description of the reasoning behind this change. This set includes the change, a kernel selftest for it and some slight refactoring of the selftest code. Sam Bobroff (3): powerpc/tm: Abort syscalls in active transactions selftests/powerpc: Move get_auxv_entry() to

[PATCH 3/3] selftests/powerpc: Add transactional syscall test

2015-03-18 Thread Sam Bobroff
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff --- tools/testing/selftests/powerpc/tm/Makefile |3 +- tools/testing/selftests/powerpc/tm/tm-syscall.c

[PATCH 1/3] powerpc/tm: Abort syscalls in active transactions

2015-03-18 Thread Sam Bobroff
ame across powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff --- Documentati

[PATCH 2/3] selftests/powerpc: Move get_auxv_entry() to harness.c

2015-03-18 Thread Sam Bobroff
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff --- tools/testing/selftests/powerpc/harness.c | 47 + tools/testing/selftests/powerpc/pmu/lib.c | 47 - tools

Re: [PATCH 3/3] selftests/powerpc: Add transactional syscall test

2015-03-23 Thread Sam Bobroff
On 20/03/15 20:25, Anshuman Khandual wrote: > On 03/19/2015 10:13 AM, Sam Bobroff wrote: >> Check that a syscall made during an active transaction will fail with >> the correct failure code and that one made during a suspended >> transaction will succeed. >> >> Sig

Re: [PATCH 3/3] selftests/powerpc: Add transactional syscall test

2015-03-29 Thread Sam Bobroff
On 24/03/15 13:02, Michael Ellerman wrote: > On Tue, 2015-03-24 at 12:52 +1100, Sam Bobroff wrote: >> On 20/03/15 20:25, Anshuman Khandual wrote: >>> On 03/19/2015 10:13 AM, Sam Bobroff wrote: >>>> Check that a syscall made during an active transaction will fail with

[PATCH v2 3/4] selftests/powerpc: Add transactional syscall test

2015-03-29 Thread Sam Bobroff
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff --- v2: Further testing has shown that the success or failure of the transactions was affected by minor

[PATCH v2 1/4] powerpc/tm: Abort syscalls in active transactions

2015-03-29 Thread Sam Bobroff
ame across powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff --- v2: Also update the failure

[PATCH v2 2/4] selftests/powerpc: Move get_auxv_entry() to harness.c

2015-03-29 Thread Sam Bobroff
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff --- tools/testing/selftests/powerpc/harness.c | 47 + tools/testing/selftests/powerpc/pmu/lib.c | 47 - tools

[PATCH v2 4/4] powerpc/tm: Correct minor documentation typos

2015-03-29 Thread Sam Bobroff
Signed-off-by: Sam Bobroff --- v2: Discovered some typos while updating the documentation. Documentation/powerpc/transactional_memory.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc

[PATCH v2 0/4] powerpc/tm: Abort syscalls in active transactions

2015-03-29 Thread Sam Bobroff
: Correct minor documentation typos Discovered some typos while updating the documentation. Sam Bobroff (4): powerpc/tm: Abort syscalls in active transactions selftests/powerpc: Move get_auxv_entry() to harness.c selftests/powerpc: Add transactional syscall test powerpc/tm: Correct minor docu

[PATCH 1/1] powerpc: Detect broken or mismatched toolchains

2016-02-21 Thread Sam Bobroff
option '-maltivec' This patch adds a basic compile test and error message to arch/powerpc/Makefile so that the above error becomes: *** Sorry, your toolchain seems to be broken or incorrect. *** Make sure it supports your kernel configuration (ppc64). Signed-off-by: Sam Bobroff

Re: [PATCH 1/1] powerpc: Detect broken or mismatched toolchains

2016-02-22 Thread Sam Bobroff
On Mon, Feb 22, 2016 at 08:05:01PM -0600, Scott Wood wrote: > On Mon, 2016-02-22 at 16:13 +1100, Sam Bobroff wrote: > > It can currently be difficult to diagnose a build that fails due to > > the compiler, linker or other parts of the toolchain being unable to > > build

[PATCH v2 1/2] powerpc/xmon: Paged output for paca display

2015-08-20 Thread Sam Bobroff
c = 0x0 (0x2bc) irq_work_pending = 0x0 (0x2bd) nap_state_lost = 0x0 (0x2be) 0:mon> (Based on a similar patch by Michael Ellerman "[v2] powerpc/xmon: Allow limiting the size of the paca display". This patch is an alternative and ca

[PATCH v2 0/2] powerpc/xmon: Paged output for paca display

2015-08-20 Thread Sam Bobroff
is less invasive to the command code. * Added a patch to paginate the kernel log buffer display. Sam Bobroff (2): powerpc/xmon: Paged output for paca display powerpc/xmon: Paginate kernel log buffer display arch/powerpc/xmon/xmon.c | 89 +++- 1 f

[PATCH v2 2/2] powerpc/xmon: Paginate kernel log buffer display

2015-08-20 Thread Sam Bobroff
The kernel log buffer is often much longer than the size of a terminal so paginate it's output. Signed-off-by: Sam Bobroff --- arch/powerpc/xmon/xmon.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 9c

[PATCH 1/1] powerpc: Individual System V IPC system calls

2015-09-23 Thread Sam Bobroff
This patch provides individual system call numbers for the following System V IPC system calls, on PowerPC, so that they do not need to be multiplexed: * semop, semget, semctl, semtimedop * msgsnd, msgrcv, msgget, msgctl * shmat, shmdt, shmget, shmctl Signed-off-by: Sam Bobroff --- arch

Re: [PATCH 1/1] powerpc: Individual System V IPC system calls

2015-09-24 Thread Sam Bobroff
On Fri, Sep 25, 2015 at 10:33:37AM +1000, Michael Ellerman wrote: > On Thu, 2015-09-24 at 15:39 +1000, Sam Bobroff wrote: > > This patch provides individual system call numbers for the following > > System V IPC system calls, on PowerPC, so that they do not need to be > > mul

Re: [v2,1/2] powerpc/xmon: Paged output for paca display

2015-10-07 Thread Sam Bobroff
On Tue, Oct 06, 2015 at 10:05:38PM +1100, Michael Ellerman wrote: > On Fri, 2015-21-08 at 04:24:27 UTC, Sam bobroff wrote: > > The paca display is already more than 24 lines, which can be problematic > > if you have an old school 80x24 terminal, or more likely you are on a >

[PATCH v3 1/2] powerpc/xmon: Paged output for paca display

2015-10-07 Thread Sam Bobroff
ot;. This patch is an alternative and cannot coexist with the original.) Signed-off-by: Sam Bobroff --- arch/powerpc/xmon/nonstdio.c | 57 ++-- arch/powerpc/xmon/nonstdio.h | 3 +++ arch/powerpc/xmon/xmon.c | 18 ++ 3 files changed, 76 inse

[PATCH v3 0/2] powerpc/xmon: Paged output for paca display

2015-10-07 Thread Sam Bobroff
position in the command buffer to using some globals. Saves some memory and is less invasive to the command code. * Added a patch to paginate the kernel log buffer display. Sam Bobroff (2): powerpc/xmon: Paged output for paca display powerpc/xmon: Paginate kernel log buffer display a

[PATCH v3 2/2] powerpc/xmon: Paginate kernel log buffer display

2015-10-07 Thread Sam Bobroff
The kernel log buffer is often much longer than the size of a terminal so paginate it's output. Signed-off-by: Sam Bobroff --- arch/powerpc/xmon/xmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index cc

[PATCH v2 1/1] powerpc: Individual System V IPC system calls

2015-10-12 Thread Sam Bobroff
This patch provides individual system call numbers for the following System V IPC system calls, on PowerPC, so that they do not need to be multiplexed: * semop, semget, semctl, semtimedop * msgsnd, msgrcv, msgget, msgctl * shmat, shmdt, shmget, shmctl Signed-off-by: Sam Bobroff --- v2: Rebased

Re: [v2,1/1] powerpc: Individual System V IPC system calls

2015-10-14 Thread Sam Bobroff
On Tue, Oct 13, 2015 at 08:38:42PM +1100, Michael Ellerman wrote: > On Tue, 2015-13-10 at 01:49:28 UTC, Sam bobroff wrote: > > This patch provides individual system call numbers for the following > > System V IPC system calls, on PowerPC, so that they do not need to be > > mul

Re: [PATCH v3 1/2] powerpc/xmon: Paged output for paca display

2015-10-14 Thread Sam Bobroff
On Wed, Oct 14, 2015 at 08:39:09PM +1100, Michael Ellerman wrote: > On Thu, 2015-10-08 at 11:50 +1100, Sam Bobroff wrote: > > The paca display is already more than 24 lines, which can be problematic > > if you have an old school 80x24 terminal, or more likely you are on a >

Re: [v2,1/1] powerpc: Individual System V IPC system calls

2015-10-14 Thread Sam Bobroff
On Wed, Oct 14, 2015 at 08:38:15PM +1100, Michael Ellerman wrote: > On Wed, 2015-10-14 at 18:00 +1100, Sam Bobroff wrote: > > On Tue, Oct 13, 2015 at 08:38:42PM +1100, Michael Ellerman wrote: > > > On Tue, 2015-13-10 at 01:49:28 UTC, Sam bobroff wrote: > > > > This pa

[PATCH 1/8] powerpc/64: Adjust order in pcibios_init()

2019-03-19 Thread Sam Bobroff
already the case) and at boot time, to support future work. Signed-off-by: Sam Bobroff --- 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(+), 7 deletions(-) diff --git a

[PATCH 6/8] powerpc/eeh: Initialize EEH address cache earlier

2019-03-19 Thread Sam Bobroff
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 --- arch/powerpc/include/asm/eeh.h | 3 +++ arch/powerpc/kernel/eeh.c | 2

[PATCH 5/8] powerpc/eeh: Add eeh_show_enabled()

2019-03-19 Thread Sam Bobroff
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 --- arch/powerpc/include/asm/eeh.h | 3 +++ arch/powerpc/kernel/eeh.c | 16 +++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --

[PATCH 3/8] powerpc/eeh: Convert PNV_PHB_FLAG_EEH to global flag

2019-03-19 Thread Sam Bobroff
set for pSeries; although it is currently unused it may be useful in the future. Signed-off-by: Sam Bobroff --- arch/powerpc/include/asm/eeh.h | 11 +++ arch/powerpc/platforms/powernv/eeh-powernv.c | 14 +++--- arch/powerpc/platforms/powernv/pci.c | 7

[PATCH 0/8]

2019-03-19 Thread Sam Bobroff
odified rpaphp module, and the EEH-related parts seem to work. Cheers, Sam. Sam Bobroff (8): powerpc/64: Adjust order in pcibios_init() powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag powerpc/eeh: Convert PNV_PHB_FLAG_EEH to global flag powerpc/eeh: Improve debug messages around device additi

[PATCH 4/8] powerpc/eeh: Improve debug messages around device addition

2019-03-19 Thread Sam Bobroff
Also remove useless comment. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh.c| 2 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 14 arch/powerpc/platforms/pseries/eeh_pseries.c | 23 +++- 3 files changed, 28 insertions(+), 11

[PATCH 2/8] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

2019-03-19 Thread Sam Bobroff
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. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh_driver.c | 4 1 file changed, 4

[PATCH 8/8] powerpc/eeh: Remove eeh_probe_devices() and eeh_addr_cache_build()

2019-03-19 Thread Sam Bobroff
EEH support and this change prevents them from being created. Signed-off-by: Sam Bobroff --- arch/powerpc/include/asm/eeh.h | 6 arch/powerpc/kernel/eeh.c| 13 arch/powerpc/kernel/eeh_cache.c | 32 arch/powerpc

[PATCH 7/8] powerpc/eeh: EEH for pSeries hot plug

2019-03-19 Thread Sam Bobroff
was not previously possible (it was already possible on pSeries). Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh.c| 2 +- arch/powerpc/kernel/of_platform.c| 3 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 8 ++- arch/powerpc/platforms/pseries

Re: [PATCH 2/8] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

2019-04-07 Thread Sam Bobroff
On Wed, Mar 20, 2019 at 05:02:57PM +1100, Alexey Kardashevskiy wrote: > > > On 20/03/2019 13:58, Sam Bobroff wrote: > > The EEH_DEV_NO_HANDLER flag is used by the EEH system to prevent the > > use of driver callbacks in drivers that have been bound part way > > through

Re: [PATCH 3/8] powerpc/eeh: Convert PNV_PHB_FLAG_EEH to global flag

2019-04-08 Thread Sam Bobroff
On Wed, Mar 20, 2019 at 05:02:44PM +1100, Alexey Kardashevskiy wrote: > > > On 20/03/2019 13:58, 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 > > fla

Re: [PATCH 5/8] powerpc/eeh: Add eeh_show_enabled()

2019-04-08 Thread Sam Bobroff
On Wed, Mar 20, 2019 at 05:02:23PM +1100, Alexey Kardashevskiy wrote: > > > On 20/03/2019 13:58, 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:

Re: [PATCH 8/8] powerpc/eeh: Remove eeh_probe_devices() and eeh_addr_cache_build()

2019-04-08 Thread Sam Bobroff
On Wed, Mar 20, 2019 at 05:05:49PM +1100, Alexey Kardashevskiy wrote: > > > On 20/03/2019 13:58, Sam Bobroff wrote: > > Now that EEH support for all devices (on PowerNV and pSeries) is > > provided by the pcibios bus add device hooks, eeh_probe_devices() and > >

Re: [PATCH 0/8]

2019-04-14 Thread Sam Bobroff
On Thu, Apr 11, 2019 at 05:55:33PM -0700, Tyrel Datwyler wrote: > On 03/19/2019 07:58 PM, Sam Bobroff wrote: > > Hi all, > > > > This patch set adds support for EEH recovery of hot plugged devices on > > pSeries > > machines. Specifically, devices discovered by

[PATCH 0/4] powerpc/eeh: Release EEH device state synchronously

2020-03-29 Thread Sam Bobroff
not been able to hit them during testing. Cheers, Sam. Sam Bobroff (4): powerpc/eeh: fix pseries_eeh_configure_bridge() powerpc/eeh: Release EEH device state synchronously powerpc/eeh: Remove workaround from eeh_add_device_late() powerpc/eeh: Clean up edev cleanup for VFs

[PATCH 2/4] powerpc/eeh: Release EEH device state synchronously

2020-03-29 Thread Sam Bobroff
h are called synchronously in the removal path. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh.c | 26 ++ arch/powerpc/kernel/pci-hotplug.c | 2 -- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/

[PATCH 1/4] powerpc/eeh: fix pseries_eeh_configure_bridge()

2020-03-29 Thread Sam Bobroff
ative values. Signed-off-by: Sam Bobroff --- arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 893ba3f562c4..c4ef03bec0de 100644 --- a

[PATCH 3/4] powerpc/eeh: Remove workaround from eeh_add_device_late()

2020-03-29 Thread Sam Bobroff
that is no longer possible and the workaround is no longer necessary. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index c36c5a7

[PATCH 4/4] powerpc/eeh: Clean up edev cleanup for VFs

2020-03-29 Thread Sam Bobroff
Because the bus notifier calls eeh_rmv_from_parent_pe() (via eeh_remove_device()) when a VF is removed, the call in remove_sriov_vf_pdns() is redundant. So remove the call. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/pci_dn.c | 9 + 1 file changed, 1 insertion(+), 8 deletions

[PATCH RFC 1/1] powerpc/eeh: Synchronization for safety

2020-03-29 Thread Sam Bobroff
when ordering these locks against the PCI rescan/remove lock and the device locks to avoid deadlocking. Signed-off-by: Sam Bobroff --- Hello everyone, Here's an attempt to bring some safety to the interactions between the various moving parts involved in EEH recovery. It's based on top

[PATCH v2 1/1] vfio-pci/nvlink2: Allow fallback to ibm,mmio-atsd[0]

2020-03-30 Thread Sam Bobroff
quot;) Signed-off-by: Sam Bobroff --- Patch set v2: Patch 1/1: vfio-pci/nvlink2: Allow fallback to ibm,mmio-atsd[0] - Removed unnecessary warning. - Added Fixes tag. Patch set v1: Patch 1/1: vfio-pci/nvlink2: Allow fallback to ibm,mmio-atsd[0] drivers/vfio/pci/vfio_pci_nvlink2.c | 10 -

Re: [PATCH 2/4] powerpc/eeh: Release EEH device state synchronously

2020-04-07 Thread Sam Bobroff
On Fri, Apr 03, 2020 at 03:51:18PM +1100, Oliver O'Halloran wrote: > On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote: > > EEH device state is currently removed (by eeh_remove_device()) during > > the device release handler, which is invoked as the device's referenc

Re: [PATCH 3/4] powerpc/eeh: Remove workaround from eeh_add_device_late()

2020-04-07 Thread Sam Bobroff
On Fri, Apr 03, 2020 at 05:08:32PM +1100, Oliver O'Halloran wrote: > On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote: > > When EEH device state was released asynchronously by the device > > release handler, it was possible for an outstanding reference to > > preve

Re: [PATCH 4/4] powerpc/eeh: Clean up edev cleanup for VFs

2020-04-07 Thread Sam Bobroff
On Fri, Apr 03, 2020 at 04:45:47PM +1100, Oliver O'Halloran wrote: > On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote: > > Because the bus notifier calls eeh_rmv_from_parent_pe() (via > > eeh_remove_device()) when a VF is removed, the call in > > remove_sr

Re: [PATCH] powerpc/powernv: Add a print indicating when an IODA PE is released

2020-04-09 Thread Sam Bobroff
On Wed, Apr 08, 2020 at 09:22:13PM +1000, Oliver O'Halloran wrote: > Quite useful to know in some cases. > > Signed-off-by: Oliver O'Halloran Agreed. Reviewed-by: Sam Bobroff > --- > arch/powerpc/platforms/powernv/pci-ioda.c | 2 ++ > 1 file changed, 2 insertio

Re: [PATCH 3/4] powerpc/eeh: Remove workaround from eeh_add_device_late()

2020-04-14 Thread Sam Bobroff
On Wed, Apr 08, 2020 at 04:53:36PM +1000, Oliver O'Halloran wrote: > On Wed, Apr 8, 2020 at 4:22 PM Sam Bobroff wrote: > > > > On Fri, Apr 03, 2020 at 05:08:32PM +1100, Oliver O'Halloran wrote: > > > On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote: > >

[PATCH v2 0/2] powerpc/eeh: Release EEH device state synchronously

2020-04-19 Thread Sam Bobroff
ev cleanup for VFs Patch set v1: Patch 1/4: powerpc/eeh: fix pseries_eeh_configure_bridge() Patch 2/4: powerpc/eeh: Release EEH device state synchronously Patch 3/4: powerpc/eeh: Remove workaround from eeh_add_device_late() Patch 4/4: powerpc/eeh: Clean up edev cleanup for VFs Sam Bobroff (2): po

[PATCH v2 1/2] powerpc/eeh: fix pseries_eeh_configure_bridge()

2020-04-19 Thread Sam Bobroff
ative values. Signed-off-by: Sam Bobroff --- arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 893ba3f562c4..c4ef03bec0de 100644 --- a

[PATCH v2 2/2] powerpc/eeh: Release EEH device state synchronously

2020-04-19 Thread Sam Bobroff
h are called synchronously in the removal path. Signed-off-by: Sam Bobroff --- v2 - Added comment explaining why the add case can't be handled similarly to the remove case. arch/powerpc/kernel/eeh.c | 31 +++ arch/powerpc/kernel/pci-hotplug.c | 2 -- 2 fil

Re: [PATCH v2 1/2] powerpc/eeh: fix pseries_eeh_configure_bridge()

2020-04-21 Thread Sam Bobroff
On Tue, Apr 21, 2020 at 06:33:36PM -0500, Nathan Lynch wrote: > Sam Bobroff writes: > > If a device is hot unplgged during EEH recovery, it's possible for the > > RTAS call to ibm,configure-pe in pseries_eeh_configure() to return > > parameter error (-3), however nega

[PATCH v3 1/3] powerpc/rtas: Export rtas_error_rc

2020-04-23 Thread Sam Bobroff
Export rtas_error_rc() so that it can be used by other users of rtas_call() (which is already exported). Signed-off-by: Sam Bobroff --- v3 * New in this version. arch/powerpc/include/asm/rtas.h | 1 + arch/powerpc/kernel/rtas.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion

[PATCH v3 0/3] powerpc/eeh: Release EEH device state synchronously

2020-04-23 Thread Sam Bobroff
rpc/eeh: Clean up edev cleanup for VFs Patch set v1: Patch 1/4: powerpc/eeh: fix pseries_eeh_configure_bridge() Patch 2/4: powerpc/eeh: Release EEH device state synchronously Patch 3/4: powerpc/eeh: Remove workaround from eeh_add_device_late() Patch 4/4: powerpc/eeh: Clean up edev cleanup for VFs Sam

[PATCH v3 2/3] powerpc/eeh: fix pseries_eeh_configure_bridge()

2020-04-23 Thread Sam Bobroff
ative values. Signed-off-by: Sam Bobroff --- arch/powerpc/platforms/pseries/eeh_pseries.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 893ba3f562c4..9ea1c06a78cd 100644 --- a

[PATCH v3 3/3] powerpc/eeh: Release EEH device state synchronously

2020-04-23 Thread Sam Bobroff
h are called synchronously in the removal path. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh.c | 31 +++ arch/powerpc/kernel/pci-hotplug.c | 2 -- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/k

Re: [PATCH v3 1/3] powerpc/rtas: Export rtas_error_rc

2020-04-27 Thread Sam Bobroff
On Fri, Apr 24, 2020 at 11:07:43AM -0500, Nathan Lynch wrote: > Sam Bobroff writes: > > Export rtas_error_rc() so that it can be used by other users of > > rtas_call() (which is already exported). > > This will do the right thing for your ibm,configure-pe use case in pat

[PATCH v4 0/2] powerpc/eeh: Release EEH device state synchronously

2020-04-27 Thread Sam Bobroff
) Patch set v1: Patch 1/4: powerpc/eeh: fix pseries_eeh_configure_bridge() Patch 2/4: powerpc/eeh: Release EEH device state synchronously Patch 3/4: powerpc/eeh: Remove workaround from eeh_add_device_late() Patch 4/4: powerpc/eeh: Clean up edev cleanup for VFs Sam Bobroff (2): powerpc/eeh: f

[PATCH v4 2/2] powerpc/eeh: Release EEH device state synchronously

2020-04-27 Thread Sam Bobroff
h are called synchronously in the removal path. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh.c | 31 +++ arch/powerpc/kernel/pci-hotplug.c | 2 -- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/k

[PATCH v4 1/2] powerpc/eeh: fix pseries_eeh_configure_bridge()

2020-04-27 Thread Sam Bobroff
ative values. Signed-off-by: Sam Bobroff --- v4 - Just handle the error translation locally, as it's specific to the RTAS call, but log the unaltered code in case it's useful for debugging. arch/powerpc/platforms/pseries/eeh_pseries.c | 8 +++- 1 file changed, 7 insertions

Re: powerpc/pci: [PATCH 1/1]: PCIE PHB reset

2020-05-11 Thread Sam Bobroff
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

Re: [PATCH v2 1/5] powerpc/pci: Access PCI config space directly w/o pci_dn

2018-09-09 Thread Sam Bobroff
Hi Sergey, On Thu, Sep 06, 2018 at 02:57:48PM +0300, Sergey Miroshnichenko wrote: > The pci_dn structures are retrieved from a DT, but hot-plugged PCIe > devices don't have them. Don't stop PCIe I/O in absence of pci_dn, so > it is now possible to discover new devices. > > Signed-off-by: Sergey M

Re: [PATCH v2 2/5] powerpc/pci: Create pci_dn on demand

2018-09-09 Thread Sam Bobroff
Hi Sergey, On Thu, Sep 06, 2018 at 02:57:49PM +0300, Sergey Miroshnichenko wrote: > The pci_dn structures can be created not only from DT, but also > directly from newly discovered PCIe devices, so allocate them > dynamically. > > Signed-off-by: Sergey Miroshnichenko > --- > arch/powerpc/kernel

Re: [PATCH v2 5/5] PCI/powerpc/eeh: Add pcibios hooks for preparing to rescan

2018-09-09 Thread Sam Bobroff
Hi Sergey, On Thu, Sep 06, 2018 at 02:57:52PM +0300, Sergey Miroshnichenko wrote: > Reading an empty slot returns all ones, which triggers a false > EEH error event on PowerNV. > > New callbacks pcibios_rescan_prepare/done are introduced to > pause/resume the EEH during rescan. If I understand i

[PATCH 02/14] powerpc/eeh: Fix null deref for devices removed during EEH

2018-09-11 Thread Sam Bobroff
If a device is removed during EEH processing (either by a driver's handler or as part of recovery), it can lead to a null dereference in eeh_pe_report_edev(). To handle this, skip devices that have been removed. Signed-off-by: Sam Bobroff --- arch/powerpc/kernel/eeh_driver.c | 4 1

  1   2   3   4   >