Re: [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash

2015-04-12 Thread Cyril Bur
ss likely to conflict. > Ping about this patchset. What do the MTD maintainers think? Hi David, Jeremy mentioned you might be interested in seeing these. Thanks, Cyril > Either way, I'm happy. > > Cheers, > > > Jeremy > > --- > Cyril Bur (2): >

[PATCH] Add a MTD driver for OpenPower PNOR flash

2015-05-03 Thread Cyril Bur
ommit ed59190e41b725e1cfd79541f5fc66c20adb0671 Author: Cyril Bur Date: Wed Apr 1 14:05:30 2015 +0800 powerpc/powernv: Add interfaces for flash device access Cheers, Cyril Cyril Bur (1): drivers/mtd: add powernv flash MTD abstraction driver drivers/mtd/devices/Kconfig | 6 + drivers/mtd/devices/Makefile

[PATCH] drivers/mtd: add powernv flash MTD abstraction driver

2015-05-03 Thread Cyril Bur
Powerpc powernv platforms allow access to certain system flash devices through a firmwarwe interface. This change adds an mtd driver for these flash devices. Minor updates from Jeremy Kerr and Joel Stanley. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley Signed-off-by: Jeremy Kerr

[PATCH 1/2] powerpc/configs: merge pseries_defconfig and pseries_le_defconfig

2015-05-14 Thread Cyril Bur
These two configs should be identical with the exception of big or little endian The big endian version has XMON_DEFAULT turned on while the little endian has XMON_DEFAULT not set. Enable XMON_DEFAULT for little endian. Signed-off-by: Cyril Bur --- arch/powerpc/configs/pseries_le_defconfig | 1

[PATCH 2/2] powerpc: replace pseries_le_defconfig with a Makefile target using merge_config

2015-05-14 Thread Cyril Bur
maintenance in the future and will ensure that both 'defconfigs' are always in sync. Signed-off-by: Cyril Bur --- arch/powerpc/Makefile | 3 + arch/powerpc/configs/le.config| 1 + arch/powerpc/configs/pseries_le_defconfig | 320 ---

Re: [PATCH] drivers/mtd: add powernv flash MTD abstraction driver

2015-05-20 Thread Cyril Bur
at - I'll post a v2. One question though, > On Mon, May 04, 2015 at 04:42:19PM +1000, Cyril Bur wrote: > > Powerpc powernv platforms allow access to certain system flash devices > > through a firmwarwe interface. This change adds an mtd driver for these > > flash devices

Re: [PATCH 1/2] powerpc/configs: merge pseries_defconfig and pseries_le_defconfig

2015-05-24 Thread Cyril Bur
On Sun, 2015-05-24 at 12:19 +0300, Denis Kirjanov wrote: > On 5/24/15, Anton Blanchard wrote: > > Hi Cyril, > > > >> These two configs should be identical with the exception of big or > >> little endian > >> > >> The big endian version has XMON_DEFAULT turned on while the little > >> endian has XM

[PATCH] crypto: nx - tweak Makefile dependencies

2015-05-24 Thread Cyril Bur
. CC: Marcelo Henrique Cerri CC: Fionnuala Gunter CC: linux-cry...@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Cyril Bur --- drivers/crypto/Kconfig| 11 +-- drivers/crypto/nx/Kconfig | 11 +-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --

[PATCH V2 2/2] powerpc/configs: Replace pseries_le_defconfig with a Makefile target using merge_config

2015-05-25 Thread Cyril Bur
to correctly set all the parameters. This is done through the explicit call to make olddefconfig Signed-off-by: Cyril Bur --- V2: Rework to have olddefconfig (or equivalent) only called once. Improved to make writing *_defconfig targets easier and have the targets look cleaner. a

[PATCH V2 1/2] powerpc/configs: Merge pseries_defconfig and pseries_le_defconfig

2015-05-25 Thread Cyril Bur
as possible, not sit in xmon. In the event debugging is required, the option can be enabled or xmon=on can be specified on commandline. Signed-off-by: Cyril Bur --- V2: Removes XMON_DEFAULT from big endian after Antons suggestion that it should be a default for production systems. arch

[PATCH V2] drivers/mtd: add powernv flash MTD abstraction driver

2015-05-28 Thread Cyril Bur
Powerpc powernv platforms allow access to certain system flash devices through a firmwarwe interface. This change adds an mtd driver for these flash devices. Minor updates from Jeremy Kerr and Joel Stanley. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley Signed-off-by: Jeremy Kerr --- V2

[PATCH V3] drivers/mtd: add powernv flash MTD abstraction driver

2015-05-29 Thread Cyril Bur
Powerpc powernv platforms allow access to certain system flash devices through a firmwarwe interface. This change adds an mtd driver for these flash devices. Minor updates from Jeremy Kerr and Joel Stanley. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley Signed-off-by: Jeremy Kerr --- V2

Re: [PATCH V3] drivers/mtd: add powernv flash MTD abstraction driver

2015-05-31 Thread Cyril Bur
On Fri, 2015-05-29 at 14:52 +0530, Neelesh Gupta wrote: > > [...] > > > +/** > > + * @mtd: the device > > + * @erase: the erase info > > + * Returns 0 if erase successful or -ERRNO if an error occurred > > + */ > > +static int powernv_flash_erase(struct mtd_info *mtd, struct erase_info > > *eras

[PATCH V3] drivers/mtd: add powernv flash MTD abstraction driver

2015-05-31 Thread Cyril Bur
Powerpc powernv platforms allow access to certain system flash devices through a firmwarwe interface. This change adds an mtd driver for these flash devices. Minor updates from Jeremy Kerr and Joel Stanley. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley Signed-off-by: Jeremy Kerr --- V2

[PATCH V3] drivers/mtd: add powernv flash MTD abstraction driver

2015-06-01 Thread Cyril Bur
Powerpc powernv platforms allow access to certain system flash devices through a firmwarwe interface. This change adds an mtd driver for these flash devices. Minor updates from Jeremy Kerr and Joel Stanley. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley Signed-off-by: Jeremy Kerr

Re: [PATCH V3] drivers/mtd: add powernv flash MTD abstraction driver

2015-06-04 Thread Cyril Bur
On Tue, 2015-06-02 at 14:26 +1000, Cyril Bur wrote: > Powerpc powernv platforms allow access to certain system flash devices > through a firmwarwe interface. This change adds an mtd driver for these > flash devices. > > Minor updates from Jeremy Kerr and Joel Stanley. > >

Re: [RFC PATCH v3 2/3] powerpc: Only set numa node information for present cpus at boottime

2014-09-03 Thread Cyril Bur
commit 2fabf084b6ad. Cc: Nishanth Aravamudan Cc: Nathan Fontenot Signed-off-by: Li Zhong Acked-by: Nishanth Aravamudan Tested-by: Cyril Bur --- arch/powerpc/kernel/smp.c | 10 -- arch/powerpc/mm/numa.c| 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a

[PATCH] Make CONFIG_FHANDLE=y for all 64 bit powerpc defconfigs

2014-09-04 Thread Cyril Bur
CONFIG_FHANDLE is a requirement for systemd and with the increasing uptake of systemd within distros it makes sense for 64 bit defconfigs to include it. Signed-off-by: Cyril Bur --- arch/powerpc/configs/cell_defconfig | 1 + arch/powerpc/configs/celleb_defconfig| 1 + arch

[PATCH 0/2] powerpc/pseries: RTAS mobility fixes

2014-09-15 Thread Cyril Bur
tree nodes. Cyril Bur (2): powerpc/pseries: fix endian bugs in mobility RTAS calls powerpc/pseries: fix bugs in RTAS mobility code arch/powerpc/platforms/pseries/mobility.c | 143 +++--- 1 file changed, 89 insertions(+), 54 deletions(-) -- 1.9.1

[PATCH 1/2] powerpc/pseries: fix endian bugs in mobility RTAS calls

2014-09-15 Thread Cyril Bur
These calls use a buffer shared memory buffer to comunicate device tree updates. PAPR specifies that RTAS buffers are to be written in big endian. Signed-off-by: Cyril Bur --- arch/powerpc/platforms/pseries/mobility.c | 50 --- 1 file changed, 26 insertions(+), 24

[PATCH 2/2] powerpc/pseries: fix bugs in RTAS mobility code

2014-09-15 Thread Cyril Bur
overflows and/or garbage reads. Don't warn about failed allcations when the amount was taken from the buffer, assume the value was incorrect, don't needlessly concern the user. Signed-off-by: Cyril Bur --- arch/powerpc/platforms/pseries/mobility.c | 95 +

[PATCH v2 0/3] fix bugs in mobility RTAS calls

2014-09-24 Thread Cyril Bur
tree nodes. v1 attempted to keep the structure of the existing code. v2 rewrites the relevent sections of mobility.c. Cyril Bur (3): drivers/of: add of_changeset_apply_locked powerpc/pseries: create rtas buffer accessor powerpc/pseries: fix bugs in mobility RTAS calls arch/powerpc/platforms

[PATCH v2 1/3] drivers/of: add of_changeset_apply_locked

2014-09-24 Thread Cyril Bur
Due to the requirement of of_changesets that of_changeset_apply be called holding the of_mutex and that the of_mutex cannot be accessed nicely outside the of code, added a wrapper which grabs the lock and called of_changeset_apply. Signed-off-by: Cyril Bur --- drivers/of/dynamic.c | 11

[PATCH v2 3/3] powerpc/pseries: fix bugs in mobility RTAS calls

2014-09-24 Thread Cyril Bur
e was incorrect, don't needlessly concern the user. Signed-off-by: Cyril Bur --- arch/powerpc/platforms/pseries/mobility.c | 406 ++ 1 file changed, 243 insertions(+), 163 deletions(-) diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platfor

[PATCH v2 2/3] powerpc/pseries: create rtas buffer accessor

2014-09-24 Thread Cyril Bur
Added simple accessor functions for rtas in memory buffers which performs accesses of appropriate type and performs endian conversions. Signed-off-by: Cyril Bur --- arch/powerpc/platforms/pseries/Makefile | 4 +- arch/powerpc/platforms/pseries/pseries.h | 41 + arch/powerpc

Re: [PATCH v2 2/3] powerpc/pseries: create rtas buffer accessor

2014-09-25 Thread Cyril Bur
On Thu, 2014-09-25 at 15:47 -0700, Tyrel Datwyler wrote: > On 09/24/2014 11:41 PM, Cyril Bur wrote: > > Added simple accessor functions for rtas in memory buffers which performs > > accesses of appropriate type and performs endian conversions. > > > > Signed-off-by: C

Re: [PATCH v2 0/6] pseries: Move memory hotplug to the kernel

2014-11-17 Thread Cyril Bur
Hi Nathan, I tried to apply these to Linus' tree and Mpes tree and to stable and got several problems, I got stuck at the third hunk in patch 5. Could you point out where I'm going wrong? Thanks, Cyril On Mon, 2014-11-17 at 15:44 -0600, Nathan Fontenot wrote: > In order to better support devic

Re: [PATCH v2 0/6] pseries: Move memory hotplug to the kernel

2014-11-18 Thread Cyril Bur
On Tue, 2014-11-18 at 12:34 -0600, Nathan Fontenot wrote: > On 11/17/2014 08:00 PM, Cyril Bur wrote: > > Hi Nathan, > > > > I tried to apply these to Linus' tree and Mpes tree and to stable and > > got several problems, I got stuck at the third hunk in patch 5. &

Re: [PATCH v2 6/6] pseries: Implement memory hotplug remove in the kernel

2014-11-20 Thread Cyril Bur
On Mon, 2014-11-17 at 15:56 -0600, Nathan Fontenot wrote: > Move handling of memory hotplug remove on pseries completely into the kernel. > > The current memory hotplug remove path involves the drmgr command doing part > of this work in userspace and requesting the kernel to do additional pieces.

Re: [PATCH v2 5/6] pseries: Implement memory hotplug add in the kernel

2014-11-20 Thread Cyril Bur
On Mon, 2014-11-17 at 15:54 -0600, Nathan Fontenot wrote: > Move handling of memory hotplug add on pseries completely into the kernel. > > The current memory hotplug add path involves the drmgr command doing part > of this work in userspace and requesting the kernel to do additional pieces. > Thi

Re: [PATCH v2 3/6] pseries: Create new device hotplug entry point

2014-11-20 Thread Cyril Bur
On Mon, 2014-11-17 at 15:51 -0600, Nathan Fontenot wrote: > Create a new entry point for device hotplug on pseries that will > work for both PowerVM and PowerKVM systems. > > The current process to hotplug (or dlpar) devices (generally the same > process for memory, cpu, and pci devices) on Power

Re: [PATCH v2 6/6] pseries: Implement memory hotplug remove in the kernel

2014-11-24 Thread Cyril Bur
On Mon, 2014-11-24 at 09:03 -0600, Nathan Fontenot wrote: > > On 11/21/2014 01:49 AM, Cyril Bur wrote: > > > > On Mon, 2014-11-17 at 15:56 -0600, Nathan Fontenot wrote: > >> Move handling of memory hotplug remove on pseries completely into the > >> kernel.

Re: [PATCH v2 01/10] cxl: Drop commands if the PCI channel is not in normal state

2015-08-10 Thread Cyril Bur
n > mmio register, and the mmio mappings get invalidated in the EEH > teardown. > Hey Daniel, keeping in mind I can't exactly test it, and that I don't know the ins and outs of CAPI, the code looks nice and it makes sence to me. Some very minor points, Otherwise Acked-by: C

Re: [PATCH v2 02/10] cxl: Allocate and release the SPA with the AFU

2015-08-10 Thread Cyril Bur
e to me, from an outsiders perspective code appears to do what the commit message says. Just one super minor question, you do the NULL check in the caller. How obvious is the error if/when a caller forgets? Acked-by: Cyril Bur > Signed-off-by: Daniel Axtens > ---

Re: [PATCH v2 03/10] cxl: Make IRQ release idempotent

2015-08-10 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:36 +1000 Daniel Axtens wrote: > Check if an IRQ is mapped before releasing it. > > This will simplify future EEH code by allowing unconditional unmapping > of IRQs. > Acked-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > dr

Re: [PATCH v2 04/10] cxl: Clean up adapter MMIO unmap path.

2015-08-10 Thread Cyril Bur
needs to be unmapped. > > - PCI regions are allocated in cxl_map_adapter_regs. >Therefore they should be released in unmap, not elsewhere. > You've changed the order in which cxl_remove_adapter() does its work, which, I'm sure you've considered and it's fine

Re: [PATCH v2 10/10] cxl: Add CONFIG_CXL_EEH symbol

2015-08-10 Thread Cyril Bur
it now. > Reviewed-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > drivers/misc/cxl/Kconfig | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/misc/cxl/Kconfig b/drivers/misc/cxl/Kconfig > index b6db9ebd52c2..c151fc1fe14c 100644 > --- a

Re: [PATCH v2 06/10] cxl: Refactor AFU init/teardown

2015-08-10 Thread Cyril Bur
gt; > - Once-only functions that do not involve allocating/releasing memory >stay in the overarching 'cxl_init_afu'/'cxl_remove_afu' pair. >However, the task of picking an AFU mode and activating it has been >broken out. > Reviewed-by: Cyril Bur

Re: [PATCH v2 07/10] cxl: Don't remove AFUs/vPHBs in cxl_reset

2015-08-10 Thread Cyril Bur
icpate. > > In both cases, we shouldn't remove the AFU/vPHB. > Reviewed-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > drivers/misc/cxl/pci.c | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c >

Re: [PATCH v2 05/10] cxl: Refactor adaptor init/teardown

2015-08-10 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:38 +1000 Daniel Axtens wrote: > Some aspects of initialisation are done only once in the lifetime of > an adapter: for example, allocating memory for the adapter, > allocating the adapter number, or setting up sysfs/debugfs files. > > However, we may want to be able to

Re: [PATCH v2 08/10] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:41 +1000 Daniel Axtens wrote: > Provide a kernel API and a sysfs entry which allow a user to specify > that when a card is PERSTed, it's image will stay the same, allowing > it to participate in EEH. > > cxl_reset is used to reflash the card. In that case, we cannot saf

Re: [PATCH v2 09/10] cxl: EEH support

2015-08-11 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:42 +1000 Daniel Axtens wrote: > EEH (Enhanced Error Handling) allows a driver to recover from the > temporary failure of an attached PCI card. Enable basic CXL support > for EEH. > Same thoughts about the config option as in 8/10. As I've mentioned to you my knowledge

Re: [PATCH v3 01/11] cxl: Convert MMIO read/write macros to inline functions

2015-08-11 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:10 +1000 Daniel Axtens wrote: > We're about to make these more complex, so make them functions > first. > Reviewed-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > drivers/misc/cxl/cxl.h | 51 > ++

Re: [PATCH v3 02/11] cxl: Drop commands if the PCI channel is not in normal state

2015-08-11 Thread Cyril Bur
debugging whatever is doing that. > My previous comments appear to have been added, making functions from those macros was a good move. I can't speak too much for the exact function of the patch but the code looks good. Reviewed-by: Cyril Bur > Signed-off-by:

Re: [PATCH v3 06/11] cxl: Refactor adaptor init/teardown

2015-08-11 Thread Cyril Bur
ter number out of >cxl_init_adapter.) > > - Create two new functions: 'cxl_configure_adapter', and its pair >'cxl_deconfigure_adapter'. These two functions 'wire up' the >hardware --- they (de)configure resources that do not need to

Re: [PATCH v3 09/11] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Cyril Bur
that case, we cannot safely > assert that the image will not change. Therefore, disallow cxl_reset > if the flag is set. > Looks much better without all the #ifdefs!! Reviewed-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > Documentation/ABI/testing/sysfs-class-cxl | 1

Re: [PATCH v3 10/11] cxl: EEH support

2015-08-11 Thread Cyril Bur
t is correct. Reviewed-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > drivers/misc/cxl/cxl.h | 1 + > drivers/misc/cxl/pci.c | 252 > > drivers/misc/cxl/vphb.c | 8 ++ > 3 files changed, 261 insertions(+) > >

[PATCH] powerpc/pseries: fix endian problems with LE migration

2015-01-20 Thread Cyril Bur
the rtas_args struct to pass params to rtas_ibm_suspend_me in favour of passing what it needs directly. Signed-off-by: Cyril Bur --- This patch has been tested with KVM both LE and BE and on PowerVM both LE and BE. Under QEMU/KVM the migration happens without touching the these code pathes. For

Re: [PATCH] powerpc/pseries: fix endian problems with LE migration

2015-01-21 Thread Cyril Bur
On Wed, 2015-01-21 at 14:33 +1100, Michael Ellerman wrote: > On Wed, 2015-01-21 at 13:32 +1100, Cyril Bur wrote: > > The need to handle ibm,suspend_me specially from within ppc_rtas has left an > > endian bug exposed as rtas_ibm_suspend_me actually performs HCALLs and > >

Re: [PATCH 1/3] powerpc/pseries: Simplify check for suspendability during suspend/migration

2015-03-01 Thread Cyril Bur
On Fri, 2015-02-27 at 18:24 -0800, Tyrel Datwyler wrote: > During suspend/migration operation we must wait for the VASI state reported > by the hypervisor to become Suspending prior to making the ibm,suspend-me > RTAS call. Calling routines to rtas_ibm_supend_me() pass a vasi_state variable > that

Re: [PATCH 2/3] powerpc/pseries: Little endian fixes for post mobility device tree update

2015-03-01 Thread Cyril Bur
On Fri, 2015-02-27 at 18:24 -0800, Tyrel Datwyler wrote: > We currently use the device tree update code in the kernel after resuming > from a suspend operation to re-sync the kernels view of the device tree with > that of the hypervisor. The code as it stands is not endian safe as it relies > on pa

Re: [PATCH 2/3] powerpc/pseries: Little endian fixes for post mobility device tree update

2015-03-03 Thread Cyril Bur
On Tue, 2015-03-03 at 15:15 -0800, Tyrel Datwyler wrote: > On 03/02/2015 01:49 PM, Tyrel Datwyler wrote: > > On 03/01/2015 09:20 PM, Cyril Bur wrote: > >> On Fri, 2015-02-27 at 18:24 -0800, Tyrel Datwyler wrote: > >>> We currently use the device tree update cod

Re: [PATCH v2] powerpc/pseries: Simplify check for suspendability during suspend/migration

2015-03-23 Thread Cyril Bur
to call > rtas_ibm_suspend_me again. > Hi Tyrel, sorry this fell off my radar. Thanks for addressing all those issues. > Signed-off-by: Tyrel Datwyler > Cc: Nathan Fontenot > Cc: Cyril Bur > --- > > Changes in v2: > - Addressed Cyril's comments as follow: >

[PATCH v5 0/9] FP/VEC/VSX switching optimisations

2016-02-22 Thread Cyril Bur
h the custom ASM. - Added some extra debugging output to the vmx_signal testcase - Fixed comments in testing code - Updated VSX test code to use GCC Altivec macros Cyril Bur (9): selftests/powerpc: Test the preservation of FPU and VMX regs across syscall selftests/powerpc: Test preserv

[PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-22 Thread Cyril Bur
Test that the non volatile floating point and Altivec registers get correctly preserved across the fork() syscall. fork() works nicely for this purpose, the registers should be the same for both parent and child Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/Makefile

[PATCH v5 3/9] selftests/powerpc: Test FPU and VMX regs in signal ucontext

2016-02-22 Thread Cyril Bur
Load up the non volatile FPU and VMX regs and ensure that they are the expected value in a signal handler Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/math/.gitignore | 2 + tools/testing/selftests/powerpc/math/Makefile | 4 +- tools/testing/selftests/powerpc/math

[PATCH v5 4/9] powerpc: Explicitly disable math features when copying thread

2016-02-22 Thread Cyril Bur
hot while not having MSR_{FP,VEC,VSX} means that the registers must be loaded. This allows for a smarter return to userspace. Signed-off-by: Cyril Bur --- arch/powerpc/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel

[PATCH v5 5/9] powerpc: Restore FPU/VEC/VSX if previously used

2016-02-22 Thread Cyril Bur
benchmarking it was determined that avoiding C in the common case is a performance benefit. The full check in asm greatly complicated that codepath for a negligible performance gain and the trade-off was deemed not worth it. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/processor.h | 2

[PATCH v5 6/9] powerpc: Prepare for splitting giveup_{fpu, altivec, vsx} in two

2016-02-22 Thread Cyril Bur
saving of registers to thread structs and leave threads MSR with bits enabled. This patch introduces no functional change. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/reg.h | 8 arch/powerpc/include/asm/switch_to.h | 7 +++ arch/powerpc/kernel/process.c| 31

[PATCH v5 8/9] powerpc: Add the ability to save Altivec without giving it up

2016-02-22 Thread Cyril Bur
reload of VEC state. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/switch_to.h | 3 ++- arch/powerpc/kernel/process.c| 12 +++- arch/powerpc/kernel/vector.S | 24 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/arch/powerpc

[PATCH v5 7/9] powerpc: Add the ability to save FPU without giving it up

2016-02-22 Thread Cyril Bur
userspace with hot registers avoiding a possibly pointless reload of FPU register state. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/switch_to.h | 3 ++- arch/powerpc/kernel/fpu.S| 21 - arch/powerpc/kernel/process.c| 12 +++- 3 files changed

[PATCH v5 2/9] selftests/powerpc: Test preservation of FPU and VMX regs across preemption

2016-02-22 Thread Cyril Bur
Loop in assembly checking the registers with many threads. Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/math/.gitignore| 2 + tools/testing/selftests/powerpc/math/Makefile | 5 +- tools/testing/selftests/powerpc/math/fpu_asm.S | 36 +++ tools/testing

[PATCH v5 9/9] powerpc: Add the ability to save VSX without giving it up

2016-02-22 Thread Cyril Bur
pointless reload of VSX state. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/switch_to.h | 4 arch/powerpc/kernel/ppc_ksyms.c | 4 arch/powerpc/kernel/process.c| 42 +--- arch/powerpc/kernel/vector.S | 17 --- 4 files

Re: [PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-24 Thread Cyril Bur
On Wed, 24 Feb 2016 19:57:38 +0530 "Naveen N. Rao" wrote: > On 2016/02/23 02:38PM, Cyril Bur wrote: > > Test that the non volatile floating point and Altivec registers get > > correctly preserved across the fork() syscall. > > > > fork() works nicely for

Re: [PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-24 Thread Cyril Bur
On Tue, 23 Feb 2016 14:38:14 +1100 Cyril Bur wrote: > Test that the non volatile floating point and Altivec registers get > correctly preserved across the fork() syscall. > > fork() works nicely for this purpose, the registers should be the same for > both parent and child >

Re: [PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-25 Thread Cyril Bur
On Thu, 25 Feb 2016 11:52:05 +0530 "Naveen N. Rao" wrote: > On 2016/02/25 10:44AM, Cyril Bur wrote: > > On Wed, 24 Feb 2016 19:57:38 +0530 > > "Naveen N. Rao" wrote: > > > > > On 2016/02/23 02:38PM, Cyril Bur wrote: > > > > T

[PATCH 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-28 Thread Cyril Bur
Test that the non volatile floating point and Altivec registers get correctly preserved across the fork() syscall. fork() works nicely for this purpose, the registers should be the same for both parent and child Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/Makefile

[PATCH 4/9] powerpc: Explicitly disable math features when copying thread

2016-02-28 Thread Cyril Bur
hot while not having MSR_{FP,VEC,VSX} means that the registers must be loaded. This allows for a smarter return to userspace. Signed-off-by: Cyril Bur --- arch/powerpc/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel

[PATCH 2/9] selftests/powerpc: Test preservation of FPU and VMX regs across preemption

2016-02-28 Thread Cyril Bur
Loop in assembly checking the registers with many threads. Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/math/.gitignore| 2 + tools/testing/selftests/powerpc/math/Makefile | 5 +- tools/testing/selftests/powerpc/math/fpu_asm.S | 36 +++ tools/testing

[PATCH 3/9] selftests/powerpc: Test FPU and VMX regs in signal ucontext

2016-02-28 Thread Cyril Bur
Load up the non volatile FPU and VMX regs and ensure that they are the expected value in a signal handler Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/math/.gitignore | 2 + tools/testing/selftests/powerpc/math/Makefile | 4 +- tools/testing/selftests/powerpc/math

[PATCH 6/9] powerpc: Prepare for splitting giveup_{fpu, altivec, vsx} in two

2016-02-28 Thread Cyril Bur
saving of registers to thread structs and leave threads MSR with bits enabled. This patch introduces no functional change. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/reg.h | 8 arch/powerpc/include/asm/switch_to.h | 7 +++ arch/powerpc/kernel/process.c| 31

[PATCH 8/9] powerpc: Add the ability to save Altivec without giving it up

2016-02-28 Thread Cyril Bur
reload of VEC state. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/switch_to.h | 3 ++- arch/powerpc/kernel/process.c| 12 +++- arch/powerpc/kernel/vector.S | 24 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/arch/powerpc

[PATCH 7/9] powerpc: Add the ability to save FPU without giving it up

2016-02-28 Thread Cyril Bur
userspace with hot registers avoiding a possibly pointless reload of FPU register state. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/switch_to.h | 3 ++- arch/powerpc/kernel/fpu.S| 21 - arch/powerpc/kernel/process.c| 12 +++- 3 files changed

[PATCH 5/9] powerpc: Restore FPU/VEC/VSX if previously used

2016-02-28 Thread Cyril Bur
benchmarking it was determined that avoiding C in the common case is a performance benefit. The full check in asm greatly complicated that codepath for a negligible performance gain and the trade-off was deemed not worth it. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/processor.h | 2

[PATCH 0/9] FP/VEC/VSX switching optimisations

2016-02-28 Thread Cyril Bur
eword - Reordered some code in basic-asm.h and neatened some comments Cyril Bur (9): selftests/powerpc: Test the preservation of FPU and VMX regs across syscall selftests/powerpc: Test preservation of FPU and VMX regs across preemption selftests/powerpc: Test FPU and VMX regs in s

[PATCH 9/9] powerpc: Add the ability to save VSX without giving it up

2016-02-28 Thread Cyril Bur
pointless reload of VSX state. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/switch_to.h | 4 arch/powerpc/kernel/ppc_ksyms.c | 4 arch/powerpc/kernel/process.c| 42 +--- arch/powerpc/kernel/vector.S | 17 --- 4 files

Re: [PATCH 0/9] FP/VEC/VSX switching optimisations

2016-02-29 Thread Cyril Bur
On Mon, 29 Feb 2016 17:53:42 +1100 Cyril Bur wrote: Apologies this should have had a Version 6 prefix! > Cover-letter for V1 of the series is at > https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-November/136350.html > > Cover-letter for V2 of the series is at > https://l

Re: selftests/powerpc: Remove -flto from common CFLAGS

2016-02-29 Thread Cyril Bur
On Mon, 29 Feb 2016 22:10:13 +1100 (AEDT) Michael Ellerman wrote: > Hi Suraj, > > On Mon, 2016-29-02 at 06:29:55 UTC, Suraj Jitindar Singh wrote: > > LTO can cause GCC to inline some functions which have attributes set. The > > You should define what LTO is the first time you use it. > > > a

Re: selftests/powerpc: Remove -flto from common CFLAGS

2016-02-29 Thread Cyril Bur
event_pinned_vs_ebb_test.out:[FAIL] Test FAILED on line 87 ipc_unmuxed.out:[FAIL] Test FAILED on line 38 per_event_excludes.out:[FAIL] Test FAILED on line 95 There were no matches for grep SKIP *.out for any of the four. This patch appears to not have affected any of the tests. Reviewed-

[PATCH] selftests/powerpc: PMU libs: use signed long to read perf_event_paranoid

2016-02-29 Thread Cyril Bur
. Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/pmu/lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/powerpc/pmu/lib.c b/tools/testing/selftests/powerpc/pmu/lib.c index a361ad3..8b992fa 100644 --- a/tools/testing/selftests/powerpc

[PATCH 2/2] powerpc: Batch up loads/stores on saving and restoring VSX

2016-02-29 Thread Cyril Bur
the overlapping layout of FPU registers and VSX registers on POWER chips, this patch also benefits FPU loads and stores when VSX is compiled in and the CPU is VSX capable. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/ppc_asm.h | 65 ++ arch/powerpc

[PATCH 1/2] powerpc: Batch up loads/stores on saving and restoring Altivec

2016-02-29 Thread Cyril Bur
instruction. Signed-off-by: Cyril Bur --- These patches need to be applied on to of my rework of FPU/VMX/VSX switching: https://patchwork.ozlabs.org/patch/589703/ I left in some of my comments indicating if functions are called from C or not. Looking at them now, they might be a bit much, let me know what

Re: [PATCH V10 02/28] powerpc, process: Add the function flush_tmregs_to_thread

2016-03-01 Thread Cyril Bur
On Tue, 16 Feb 2016 14:29:32 +0530 Anshuman Khandual wrote: > This patch creates a function flush_tmregs_to_thread which > will then be used by subsequent patches in this series. The > function checks for self tracing ptrace interface attempts > while in the TM context and logs appropriate warnin

Re: [PATCH V10 17/28] selftests, powerpc: Add ptrace tests for EBB

2016-03-01 Thread Cyril Bur
On Tue, 16 Feb 2016 14:29:47 +0530 Anshuman Khandual wrote: > This patch adds ptrace interface test for EBB specific > registers. This also adds some generic ptrace interface > based helper functions to be used by other patches later > on in the series. > > Signed-off-by: Anshuman Khandual > --

Re: [PATCH V10 18/28] selftests, powerpc: Add ptrace tests for GPR/FPR registers

2016-03-01 Thread Cyril Bur
On Tue, 16 Feb 2016 14:29:48 +0530 Anshuman Khandual wrote: > 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 registers. > I wonder if with a bit

Re: [PATCH V10 02/28] powerpc, process: Add the function flush_tmregs_to_thread

2016-03-01 Thread Cyril Bur
On Wed, 02 Mar 2016 09:59:06 +0530 Anshuman Khandual wrote: > On 03/02/2016 05:45 AM, Cyril Bur wrote: > > On Tue, 16 Feb 2016 14:29:32 +0530 > > Anshuman Khandual wrote: > > > >> This patch creates a function flush_tmregs_to_thread which > >> will the

[PATCH 1/2] selftests/powerpc: benchmarks/context_switch.c improve usage message

2016-03-03 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/benchmarks/context_switch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/powerpc/benchmarks/context_switch.c b/tools/testing/selftests/powerpc/benchmarks/context_switch.c index

[PATCH 2/2] selftests/powerpc: benchmarks/context_switch.c use vector instructions/types

2016-03-03 Thread Cyril Bur
x27;t play well with __attribute__((__target__("no-vsx")), LTO can cause GCC to forget about the attribute and compile with VSX instructions regardless. Be weary when enabling -flfo for this test. Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/benchmarks/Makefile | 1 + t

Re: [PATCH 1/2] powerpc: Batch up loads/stores on saving and restoring Altivec

2016-03-09 Thread Cyril Bur
On Thu, 10 Mar 2016 10:01:07 +1100 Michael Neuling wrote: > On Tue, 2016-03-01 at 16:55 +1100, Cyril Bur wrote: > > > Currently the assembly to save and restore Altivec registers boils down to > > a load immediate of the offset of the specific Altivec register in memory > &

Re: [PATCH 2/2] powerpc: Batch up loads/stores on saving and restoring VSX

2016-03-09 Thread Cyril Bur
On Thu, 10 Mar 2016 11:09:32 +1100 Michael Neuling wrote: > On Tue, 2016-03-01 at 16:55 +1100, Cyril Bur wrote: > > > Currently the assembly to save and restore VSX registers boils down to a > > load immediate of the offset of the specific VSX register in memory > > fo

Re: [PATCH 1/2] powerpc: Batch up loads/stores on saving and restoring Altivec

2016-03-09 Thread Cyril Bur
On Thu, 10 Mar 2016 10:01:07 +1100 Michael Neuling wrote: > On Tue, 2016-03-01 at 16:55 +1100, Cyril Bur wrote: > > > Currently the assembly to save and restore Altivec registers boils down to > > a load immediate of the offset of the specific Altivec register in memory > &

Re: [PATCH 1/2] powerpc: Batch up loads/stores on saving and restoring Altivec

2016-03-10 Thread Cyril Bur
On Thu, 10 Mar 2016 16:37:47 +1100 Cyril Bur wrote: > On Thu, 10 Mar 2016 10:01:07 +1100 > Michael Neuling wrote: > > > On Tue, 2016-03-01 at 16:55 +1100, Cyril Bur wrote: > > > > > Currently the assembly to save and restore Altivec registers boils down to

[PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-15 Thread Cyril Bur
like to do a better fix in future. Signed-off-by: Cyril Bur --- arch/powerpc/kernel/entry_64.S | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 038e0a1..f3aa4b4 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/

Re: [PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-19 Thread Cyril Bur
On Wed, 16 Mar 2016 22:45:20 +1100 Benjamin Herrenschmidt wrote: > On Wed, 2016-03-16 at 13:29 +1100, Cyril Bur wrote: > > +#ifdef CONFIG_PPC_BOOK3S > > +   ld  r10,PACAKMSR(r13) > > +   li  r9,MSR_RI > > +   andcr11,r10,r9 /* Re-clear RI *

[PATCH 2/5] selftests/powerpc: Add fork() test to check for spr being preserved

2016-03-22 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/syscalls/Makefile | 3 +- .../testing/selftests/powerpc/syscalls/spr_fork.c | 78 ++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/powerpc/syscalls/spr_fork.c diff

[PATCH 1/5] selftests/powerpc: Add exec() test to check for spr sanitisation

2016-03-22 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/syscalls/Makefile | 3 +- .../testing/selftests/powerpc/syscalls/spr_exec.c | 78 ++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/powerpc/syscalls/spr_exec.c diff

[PATCH 3/5] powerpc: Fix TAR leak across exec() syscalls

2016-03-22 Thread Cyril Bur
well as the Event Based Branch (EBB) registers are left alone by design as these fall into the same category as leaving file descriptors open across exec(), it is up the parent thread to sanitise what it deems necessary. Signed-off-by: Cyril Bur --- arch/powerpc/kernel/process.c | 14

[PATCH 5/5] powerpc: Preserve the SPR values across fork() syscalls

2016-03-22 Thread Cyril Bur
Currently copy_thread() doesn't flush SPRs to the parent thread struct. Currently this only affects the TAR register as perf takes care of some of the others and the remaining ones are all Event Based Branch (EBB) registers which are cleared across fork(). Signed-off-by: Cyril Bur ---

[PATCH 4/5] powerpc: Move flush_all_to_thread() below save_sprs()

2016-03-22 Thread Cyril Bur
Signed-off-by: Cyril Bur --- arch/powerpc/kernel/process.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 56444a6..7625976 100644 --- a/arch/powerpc/kernel/process.c

[PATCH V2 1/5] selftests/powerpc: Add exec() test to check for spr sanitisation

2016-04-04 Thread Cyril Bur
Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/syscalls/Makefile | 3 +- .../testing/selftests/powerpc/syscalls/spr_exec.c | 78 ++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/powerpc/syscalls/spr_exec.c diff

  1   2   3   4   5   >