[PATCH v4 07/20] selftests/powerpc: Check for VSX preservation across userspace preemption

2016-09-05 Thread Cyril Bur
Ensure the kernel correctly switches VSX registers correctly. VSX registers are all volatile, and despite the kernel preserving VSX across syscalls, it doesn't have to. Test that during interrupts and timeslices ending the VSX regs remain the same. Signed-off-by: Cyril Bur --- tools/te

[PATCH v4 08/20] selftests/powerpc: Rework FPU stack placement macros and move to header file

2016-09-05 Thread Cyril Bur
an different area of the powerpc selftests Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/fpu_asm.h | 81 ++ tools/testing/selftests/powerpc/math/fpu_asm.S | 73 ++- 2 files changed, 86 insertions(+), 68 deletions(-) create mode

[PATCH v4 15/20] selftests/powerpc: Add checks for transactional FPUs in signal contexts

2016-09-05 Thread Cyril Bur
If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur --- tools

[PATCH v4 09/20] selftests/powerpc: Move VMX stack frame macros to header file

2016-09-05 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/math/vmx_asm.S | 85 +- tools/testing/selftests/powerpc/vmx_asm.h | 98 ++ 2 files changed, 99 insertions(+), 84 deletions(-) create mode 100644 tools/testing/selftests/powerpc

[PATCH v4 10/20] selftests/powerpc: Introduce GPR asm helper header file

2016-09-05 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/gpr_asm.h | 96 +++ 1 file changed, 96 insertions(+) create mode 100644 tools/testing/selftests/powerpc/gpr_asm.h diff --git a/tools/testing/selftests/powerpc/gpr_asm.h b/tools/testing/selftests/powerpc

[PATCH v4 17/20] selftests/powerpc: Add checks for transactional VSXs in signal contexts

2016-09-05 Thread Cyril Bur
If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur --- tools

[PATCH v4 18/20] powerpc: tm: Always use fp_state and vr_state to store live registers

2016-09-05 Thread Cyril Bur
ther structures [pending rename] are for checkpointed state. Signed-off-by: Cyril Bur Acked-by: Simon Guo --- arch/powerpc/include/asm/processor.h | 7 +- arch/powerpc/kernel/process.c| 83 +++ arch/powerpc/kernel/ptrace.c | 278 +-- ar

[PATCH v4 12/20] selftests/powerpc: Add TM tcheck helpers in C

2016-09-05 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/tm/tm.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tools/testing/selftests/powerpc/tm/tm.h b/tools/testing/selftests/powerpc/tm/tm.h index 60318ba..2c8da74 100644 --- a/tools/testing/selftests

[PATCH v4 19/20] powerpc: tm: Rename transct_(*) to ck(\1)_state

2016-09-05 Thread Cyril Bur
Make the structures being used for checkpointed state named consistently with the pt_regs/ckpt_regs. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/processor.h | 8 ++--- arch/powerpc/kernel/asm-offsets.c| 12 arch/powerpc/kernel/fpu.S| 2 +- arch/powerpc

[PATCH v4 11/20] selftests/powerpc: Allow tests to extend their kill timeout

2016-09-05 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/harness.c | 9 +++-- tools/testing/selftests/powerpc/utils.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/powerpc/harness.c b/tools/testing/selftests/powerpc/harness.c index

[PATCH v4 16/20] selftests/powerpc: Add checks for transactional VMXs in signal contexts

2016-09-05 Thread Cyril Bur
If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur --- tools

[PATCH v4 14/20] selftests/powerpc: Add checks for transactional GPRs in signal contexts

2016-09-05 Thread Cyril Bur
If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur --- tools

[PATCH v4 20/20] powerpc: Remove do_load_up_transact_{fpu,altivec}

2016-09-05 Thread Cyril Bur
Previous rework of TM code leaves these functions unused Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/tm.h | 5 - arch/powerpc/kernel/fpu.S | 26 -- arch/powerpc/kernel/vector.S | 25 - 3 files changed, 56 deletions(-) diff

[PATCH v4 13/20] selftests/powerpc: Check that signals always get delivered

2016-09-05 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/Makefile | 1 + tools/testing/selftests/powerpc/signal/Makefile| 12 +++ tools/testing/selftests/powerpc/signal/signal.S| 50 ++ tools/testing/selftests/powerpc/signal/signal.c| 111

Re: [PATCH v14 00/15] selftests/powerpc: Add ptrace tests for ppc registers

2016-09-12 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > This selftest suite is for PPC register ptrace functionality. It > is also useful for Transaction Memory functionality verification. > > Signed-off-by: Anshuman Khandual > Signed-off-by: Simon Guo > Hi Si

Re: [PATCH v14 00/15] selftests/powerpc: Add ptrace tests for ppc registers

2016-09-13 Thread Cyril Bur
On Tue, 2016-09-13 at 01:01 +0800, Simon Guo wrote: > Hi Cyril, > On Tue, Sep 13, 2016 at 03:49:10PM +1000, Cyril Bur wrote: > > > > Thanks for putting the effort in to get these merged! I have a few > > remarks that apply to more than one patch which I'll sa

Re: [PATCH v14 01/15] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h'

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds SPR number for TAR, PPR, DSCR special > purpose registers. It also adds TM, VSX, VMX related > instructions which will then be used by patches later > in the series. > > Signed-off-by:

Re: [PATCH v14 04/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for GPR/FPR registers. > This adds ptrace interface based helper functions related to > GPR/FPR access and some assembly helper functions related to > GPR/FPR regi

Re: [PATCH v14 05/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers in TM

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for GPR/FPR registers > inside TM context. This adds ptrace interface based helper > functions related to checkpointed GPR/FPR access. > > Signed-off-by: Anshuman

Re: [PATCH v14 07/15] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for TAR, PPR, DSCR > registers. This also adds ptrace interface based helper > functions related to TAR, PPR, DSCR register access. > > Signed-off-by: Anshuman Kh

Re: [PATCH v14 15/15] selftests/powerpc: Fix a build issue

2016-09-13 Thread Cyril Bur
f-by: Anshuman Khandual > Signed-off-by: Simon Guo Reviewed-by: Cyril Bur > --- >  tools/testing/selftests/powerpc/context_switch/cp_abort.c | 6 +++--- >  1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git > a/tools/testing/selftests/powerpc/context_switch/cp_abort

Re: [PATCH v14 13/15] selftests/powerpc: Add ptrace tests for TM SPR registers

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for TM SPR registers. This > also adds ptrace interface based helper functions related to TM > SPR registers access. > I'm seeing this one fail a lot, it does oc

[PATCH 0/2] Enable MSR_TM lazily

2016-09-14 Thread Cyril Bur
ixed my unability to use & and | correctly. - Spotted by Laurent Dufour, thanks Dropped the selftest patch as it was merged as part of a previous series Cyril Bur (2): powerpc: tm: Add TM Unavailable Exception powerpc: tm: Enable transactional memory (TM) lazily for us

[PATCH 2/2] powerpc: tm: Enable transactional memory (TM) lazily for userspace

2016-09-14 Thread Cyril Bur
el to avoid the expensive swap of the TM registers. A TM unavailable exception will occur if a thread does use TM and the kernel will enable MSR_TM and leave it so for some time afterwards. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/processor.h | 1 + arch/powerpc/kernel/proc

[PATCH 1/2] powerpc: tm: Add TM Unavailable Exception

2016-09-14 Thread Cyril Bur
-off-by: Cyril Bur --- arch/powerpc/kernel/traps.c | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 0eba74b..cd40130 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1372,6

Re: [PATCH] powerpc/tm: fix TM SPRs in code dump file

2017-07-23 Thread Cyril Bur
y zero). The above test was run on the same 4.13-rc1 with this patch applied for a over 48 hours. The test was executed at a rate of about one run per second. An incorrect value was never observed. This gives me confidence that this patch is correct. Running the kernel selftests does not detect a

Re: [PATCH V8 1/3] powernv: powercap: Add support for powercap framework

2017-07-27 Thread Cyril Bur
On Wed, 2017-07-26 at 10:35 +0530, Shilpasri G Bhat wrote: > Adds a generic powercap framework to change the system powercap > inband through OPAL-OCC command/response interface. > > Signed-off-by: Shilpasri G Bhat > --- > Changes from V7: > - Replaced sscanf with kstrtoint > > arch/powerpc/inc

Re: [PATCH V8 2/3] powernv: Add support to set power-shifting-ratio

2017-07-27 Thread Cyril Bur
On Wed, 2017-07-26 at 10:35 +0530, Shilpasri G Bhat wrote: > This patch adds support to set power-shifting-ratio for CPU-GPU which > is used by OCC power capping algorithm. > > Signed-off-by: Shilpasri G Bhat Hi Shilpasri, I started looking though this - a lot the comments to patch 1/3 apply h

Re: [PATCH V8 3/3] powernv: Add support to clear sensor groups data

2017-07-27 Thread Cyril Bur
On Wed, 2017-07-26 at 10:35 +0530, Shilpasri G Bhat wrote: > Adds support for clearing different sensor groups. OCC inband sensor > groups like CSM, Profiler, Job Scheduler can be cleared using this > driver. The min/max of all sensors belonging to these sensor groups > will be cleared. > Hi Shil

Re: [PATCH] powerpc/configs: Add a powernv_be_defconfig

2017-07-27 Thread Cyril Bur
nv_defconfig. > > Signed-off-by: Michael Ellerman Reviewed-by: Cyril Bur > --- > arch/powerpc/Makefile | 4 > arch/powerpc/configs/be.config | 1 + > 2 files changed, 5 insertions(+) > create mode 100644 arch/powerpc/configs/be.config > > diff --git a/arch/p

Re: [PATCH] powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler

2017-07-27 Thread Cyril Bur
1 make[1]: *** [arch/powerpc/boot/Makefile:198: arch/powerpc/boot/cuboot.o] Error 1 COPYarch/powerpc/boot/inffixed.h make: *** [arch/powerpc/Makefile:289: zImage] Error 2 make: *** Waiting for unfinished jobs With this patch applied builds fine. Please merge! Reviewed-by: Cyril Bur &g

Re: [PATCH v4 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-30 Thread Cyril Bur
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote: > This patch adds emulation of the cmpb instruction, enabling xmon to > emulate this instruction. > Tested for correctness against the cmpb asm instruction on ppc64le. > > Signed-off-by: Matt Brown Reviewed-by: Cyril B

Re: [PATCH v4 3/5] powerpc/lib/sstep: Add bpermd instruction emulation

2017-07-30 Thread Cyril Bur
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote: > This adds emulation for the bpermd instruction. > Tested for correctness against the bpermd instruction on ppc64le. > > Signed-off-by: Matt Brown Reviewed-by: Cyril Bur > --- > v4: > - change ifdef macro

Re: [PATCH v4 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-30 Thread Cyril Bur
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote: > This adds emulation for the prtyw and prtyd instructions. > Tested for logical correctness against the prtyw and prtyd instructions > on ppc64le. > > Signed-off-by: Matt Brown Reviewed-by: Cyril Bur > --- > v4: >

Re: [PATCH v4 5/5] powerpc/lib/sstep: Add isel instruction emulation

2017-07-30 Thread Cyril Bur
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote: > This adds emulation for the isel instruction. > Tested for correctness against the isel instruction and its extended > mnemonics (lt, gt, eq) on ppc64le. > > Signed-off-by: Matt Brown Reviewed-by: Cyril Bur > --- > v

Re: [PATCH v4 2/5] powerpc/lib/sstep: Add popcnt instruction emulation

2017-07-30 Thread Cyril Bur
immediately clear that it is correct, we're definitely on the other side of the optimisation vs readability line. It looks like it is, perhaps some comments to clarify. Otherwise, Reviewed-by: Cyril Bur > --- > v4: > - change ifdef macro from __powerpc64__ to CONFIG_PPC64

Re: [PATCH V9 1/3] powernv: powercap: Add support for powercap framework

2017-07-30 Thread Cyril Bur
On Mon, 2017-07-31 at 07:54 +0530, Shilpasri G Bhat wrote: > Adds a generic powercap framework to change the system powercap > inband through OPAL-OCC command/response interface. > > Signed-off-by: Shilpasri G Bhat > --- > Changes from V8: > - Use __pa() while passing pointer in opal call > - Use

[PATCH] powerpc: Use reg.h values for program check reason codes

2017-08-15 Thread Cyril Bur
Small amount of #define duplication, makes sense for these to be in reg.h. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kernel/traps.c| 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch

Re: [PATCH] powerpc: Use reg.h values for program check reason codes

2017-08-16 Thread Cyril Bur
On Wed, 2017-08-16 at 10:52 +0200, Christophe LEROY wrote: > Hi, > > Le 16/08/2017 à 08:50, Cyril Bur a écrit : > > Small amount of #define duplication, makes sense for these to be in > > reg.h. > > > > Signed-off-by: Cyril Bur > > Looks similar to t

Re: [PATCH v2] powerpc/tm: Flush TM only if CPU has TM feature

2017-09-14 Thread Cyril Bur
("powerpc/tm: Fix saving of TM SPRs in core dump") > Signed-off-by: Gustavo Romero Keeping in mind I reviewed cd63f3c and feeling a bit sheepish having missed this. Reviewed-by: Cyril Bur > --- > arch/powerpc/kernel/ptrace.c | 2 +- > 1 file changed, 1 insertion(+), 1

<    1   2   3   4   5