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 n...@linux.vnet.ibm.com Cc: Nathan Fontenot nf...@linux.vnet.ibm.com Signed-off-by: Li Zhong zh...@linux.vnet.ibm.com Acked-by: Nishanth Aravamudan n...@linux.vnet.ibm.com Tested-by: Cyril Bur cyril@au1.ibm.com --- arch/powerpc/kernel/smp.c | 10

[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 cyril@au1.ibm.com --- arch/powerpc/configs/cell_defconfig | 1 + arch/powerpc/configs/celleb_defconfig

[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 cyril@au1.ibm.com --- arch/powerpc/platforms/pseries/mobility.c | 50 --- 1 file changed

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

2014-09-15 Thread Cyril Bur
of 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 cyril@au1.ibm.com --- arch/powerpc/platforms/pseries/mobility.c | 95

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

2014-09-25 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-25 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 cyril@au1.ibm.com --- drivers

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

2014-09-25 Thread Cyril Bur
was incorrect, don't needlessly concern the user. Signed-off-by: Cyril Bur cyril@au1.ibm.com --- 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

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

2014-09-25 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 cyril@au1.ibm.com --- arch/powerpc/platforms/pseries/Makefile | 4 +- arch/powerpc/platforms/pseries/pseries.h | 41

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: Cyril Bur cyril@au1.ibm.com

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

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. I based these patches off of mpe's -next

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. This

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 PowerVM

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. The current memory hotplug remove path

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 should have its params in CPU

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

2015-01-20 Thread Cyril Bur
of 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 cyril...@gmail.com --- 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

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 code in the kernel after resuming from a suspend

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

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 v2] powerpc/pseries: Simplify check for suspendability during suspend/migration

2015-03-23 Thread Cyril Bur
, sorry this fell off my radar. Thanks for addressing all those issues. Signed-off-by: Tyrel Datwyler tyr...@linux.vnet.ibm.com Cc: Nathan Fontenot nf...@linux.vnet.ibm.com Cc: Cyril Bur cyril...@gmail.com --- Changes in v2: - Addressed Cyril's comments as follow: - Removed unused vasi_rc

[PATCH] Add a MTD driver for OpenPower PNOR flash

2015-05-04 Thread Cyril Bur
ed59190e41b725e1cfd79541f5fc66c20adb0671 Author: Cyril Bur cyril...@gmail.com 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

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

2015-05-04 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 cyril...@gmail.com Signed-off-by: Joel Stanley j...@jms.id.au

[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 cyril...@gmail.com --- arch/powerpc/configs

[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 cyril...@gmail.com --- arch/powerpc/Makefile | 3 + arch/powerpc/configs/le.config| 1 + arch/powerpc/configs/pseries_le_defconfig | 320

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

2015-04-12 Thread Cyril Bur
David, Jeremy mentioned you might be interested in seeing these. Thanks, Cyril Either way, I'm happy. Cheers, Jeremy --- Cyril Bur (2): powerpc/powernv: Add interfaces for flash device access drivers/mtd: add powernv flash MTD abstraction driver

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

2015-05-21 Thread Cyril Bur
. 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. Minor updates from Jeremy Kerr and Joel Stanley

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. Signed-off-by: Cyril Bur cyril

[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 cyril...@gmail.com Signed-off-by: Joel Stanley j...@jms.id.au

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 *erase) +{ +

[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 cyril...@gmail.com Signed-off-by: Joel Stanley j...@jms.id.au

[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 cyril...@gmail.com Signed-off-by: Joel Stanley j...@jms.id.au

[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 cyril...@gmail.com Signed-off-by: Joel Stanley j...@jms.id.au

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 an...@samba.org 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

[PATCH] crypto: nx - tweak Makefile dependencies

2015-05-24 Thread Cyril Bur
: Marcelo Henrique Cerri mhce...@linux.vnet.ibm.com CC: Fionnuala Gunter f...@linux.vnet.ibm.com CC: linux-cry...@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Cyril Bur cyril...@gmail.com --- drivers/crypto/Kconfig| 11 +-- drivers/crypto/nx/Kconfig | 11

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

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

[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 cyril...@gmail.com --- V2: Removes XMON_DEFAULT from big endian after Antons suggestion that it should be a default for production

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 d...@axtens.net 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

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 d...@axtens.net 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

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

2015-08-10 Thread Cyril Bur
. In both cases, we shouldn't remove the AFU/vPHB. Reviewed-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- 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 index 98a8207da88d

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

2015-08-11 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:38 +1000 Daniel Axtens d...@axtens.net 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

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

2015-08-10 Thread Cyril Bur
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: Cyril Bur cyril...@gmail.com

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

2015-08-10 Thread Cyril Bur
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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/cxl.h| 3 +++ drivers/misc/cxl/native.c | 28

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 d...@axtens.net 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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net

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

2015-08-10 Thread Cyril Bur
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, best to check. Acked-by: Cyril Bur cyril

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

2015-08-10 Thread Cyril Bur
. Reviewed-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- 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/drivers/misc/cxl

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

2015-08-10 Thread Cyril Bur
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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/pci.c | 87

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

2015-08-12 Thread Cyril Bur
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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- Documentation/ABI/testing/sysfs-class-cxl | 10

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

2015-08-12 Thread Cyril Bur
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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/context.c | 6 +++- drivers/misc/cxl/cxl.h | 44

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

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

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

2015-08-12 Thread Cyril Bur
, if that is correct. Reviewed-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/pci.c | 252 drivers/misc/cxl/vphb.c | 8 ++ 3 files changed, 261 insertions(+) diff

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

2015-08-12 Thread Cyril Bur
', and its pair 'cxl_deconfigure_adapter'. These two functions 'wire up' the hardware --- they (de)configure resources that do not need to last the entire lifetime of the adapter Reviewed-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl

[PATCH v2] powerpc: Fix checkstop in native_hpte_clear() with lockdep

2015-10-07 Thread Cyril Bur
and taking locks is unsafe therefore the best course of action is to simply do nothing. Concurrent tlbie()s are not possible in the first case as secondary CPUs have not come up yet. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- Tested on POWER8 system by applying this patch to the petitboot

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

2015-11-17 Thread Cyril Bur
to userspace with hot registers avoiding a possibly pointless reload of FPU register state. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/switch_to.h | 2 +- arch/powerpc/kernel/fpu.S| 21 arch/powerpc/kernel/process.c

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

2015-11-17 Thread Cyril Bur
With threads leaving the math bits enabled in their saved MSR to indicate that the hardware is hot and a restore is not needed, children need to turn it off as when they do get scheduled, there's no way their registers could have been hot. Signed-off-by: Cyril Bur <cyril...@gmail.com> ---

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

2015-11-17 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 <cyril...@gmail.com> --- tools/testing/selftests/powerpc/math/Makefile | 4 +- tools/testing/selftests/powerpc/math/fpu_signal.c

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

2015-11-17 Thread Cyril Bur
only 5%. There is a compounding effect in so far as the cost of taking multiple unavailable exception is removed. This testing also demonstrates that the cost of the exception is by far the most expensive part of the current lazy approach. Cyril Bur (8): selftests/powerpc: Test the preservation of FPU a

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

2015-11-17 Thread Cyril Bur
Loop in assembly checking the registers with many threads. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- tools/testing/selftests/powerpc/math/Makefile | 7 +- tools/testing/selftests/powerpc/math/fpu_asm.S | 34 tools/testing/selftests/powerpc/math/fpu_preempt.

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

2015-11-17 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 <cyril...@gmail.com> --- tools/testing/selftests/p

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

2015-11-17 Thread Cyril Bur
pointless reload of VSX state. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/switch_to.h | 1 - arch/powerpc/kernel/ppc_ksyms.c | 4 arch/powerpc/kernel/process.c| 23 ++- arch/powerpc/kernel/vector.S | 17 --

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

2015-11-17 Thread Cyril Bur
counter is used to detect if the registers have been used in the past and the registers are always loaded until the value wraps to back to zero. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/processor.h | 2 ++ arch/powerpc/kernel/asm-offsets.c| 2 ++ arch/p

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

2015-11-17 Thread Cyril Bur
reload of VEC state. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/switch_to.h | 2 +- arch/powerpc/kernel/process.c| 12 +++- arch/powerpc/kernel/vector.S | 24 3 files changed, 16 insertions(+), 22 deletions(-)

[PATCH] powerpc: Fix checkstop in native_hpte_clear() with lockdep

2015-09-30 Thread Cyril Bur
and taking locks is unsafe therefore the best course of action is to simply do nothing. Concurrent tlbie()s are not possible in the first case as secondary CPUs have not come up yet. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/mm/hash_native_64.c | 23 +++

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

2015-11-18 Thread Cyril Bur
On Wed, 18 Nov 2015 14:51:25 + David Laight <david.lai...@aculab.com> wrote: > From: Cyril Bur > > Sent: 18 November 2015 03:27 > ... > > The goal of these patches is to rework how the 'math' registers (FP, VEC > > and VSX) are context switched. Currently the

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

2015-11-22 Thread Cyril Bur
On Mon, 23 Nov 2015 11:23:13 +1100 Michael Neuling <mi...@neuling.org> wrote: > On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote: > > Test that the non volatile floating point and Altivec registers get > > correctly preserved across the fork() syscall. > > Can we

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

2015-11-22 Thread Cyril Bur
On Mon, 23 Nov 2015 12:08:38 +1100 Michael Neuling <mi...@neuling.org> wrote: > On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote: > > With threads leaving the math bits enabled in their saved MSR to > > indicate > > that the hardware is hot and a restore is not needed

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

2015-11-22 Thread Cyril Bur
On Fri, 20 Nov 2015 22:01:04 +1100 Michael Ellerman <m...@ellerman.id.au> wrote: > On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote: > > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S > > index c8b4225..46e9869 100644 > > --- a/arc

Re: [PATCH V10 00/28] Add new powerpc specific ELF core notes

2016-06-02 Thread Cyril Bur
On 1 June 2016 at 18:26, Anshuman Khandual wrote: > On 05/31/2016 04:42 AM, Michael Ellerman wrote: > > Hi Laurent, > > > > Sorry no. My next branch closed for 4.7 about 3 weeks ago. > > > > This series has been blocked for a long time on the gdb support, but > that

[PATCH 2/5] selftests/powerpc: Add test to check TM ucontext creation

2016-06-07 Thread Cyril Bur
Signed-off-by: Cyril Bur <cyril...@gmail.com> --- tools/testing/selftests/powerpc/basic_asm.h| 4 + tools/testing/selftests/powerpc/fpu_asm.h | 72 tools/testing/selftests/powerpc/gpr_asm.h | 96 tools/testing/selftests/powerp

[PATCH 3/5] powerpc: tm: Always use fp_state and vr_state to store live registers

2016-06-07 Thread Cyril Bur
. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/kernel/process.c | 44 +-- arch/powerpc/kernel/signal_32.c | 50 ++ arch/powerpc/kernel/signal_64.c | 53 +++ arch/powerpc/kernel/tm.S

[PATCH 1/5] selftests/powerpc: Check for VSX preservation across userspace preemption

2016-06-07 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 <cyril...@gmail.

[PATCH 4/5] powerpc: tm: Rename transct_(*) to ck(\1)_state

2016-06-07 Thread Cyril Bur
Make the structures being used for checkpointed state named consistently with the pt_regs/ckpt_regs. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/processor.h | 20 +++- arch/powerpc/kernel/asm-offsets.c| 12 arch/powerpc/kernel

[PATCH 0/5] Consistent TM structures

2016-06-07 Thread Cyril Bur
. - In the process I made more the asm helpers shared as the powerpc/math selftests had quite a few things I found useful. - This pretty much means the 2/5 monster should be a few patches. I'll split them up. I didn't want this series held up from initial review while I cleaned up tests. Thanks, Cyril Cyril

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

2016-06-07 Thread Cyril Bur
Previous rework of TM code leaves these functions unused Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/tm.h | 5 - arch/powerpc/kernel/fpu.S | 26 -- arch/powerpc/kernel/vector.S | 25 - 3 files chang

Re: [PATCH 1/5] selftests/powerpc: Check for VSX preservation across userspace preemption

2016-06-10 Thread Cyril Bur
On Thu, 09 Jun 2016 11:35:55 +1000 Daniel Axtens <d...@axtens.net> wrote: > Yay for tests! > > I have a few minor nits, and one more major one (rc == 2 below). > > > +/* > > + * Copyright 2015, Cyril Bur, IBM Corp. > > + * > > + * This prog

Re: [PATCH 2/5] selftests/powerpc: Add test to check TM ucontext creation

2016-06-09 Thread Cyril Bur
for this is that _while_ code which is not TM aware... > > (Although it would be better in several sentences :P) > > > +++ b/tools/testing/selftests/powerpc/tm/tm-signal-context-chk-gpr.c > > @@ -0,0 +1,96 @@ > > +/* > > + * Copyright 2016, Cyril Bur, IBM Corp. > > + * License

[PATCH 2/2] powerpc: tm: Always reclaim in start_thread() for exec() class syscalls

2016-06-15 Thread Cyril Bur
4/0x420 Call Trace: Instruction dump: 7c800164 4e800020 7c0022a6 f80304a8 7c0222a6 f80304b0 7c0122a6 f80304b8 4e800020 e80304a8 7c0023a6 e80304b0 <7c0223a6> e80304b8 7c0123a6 4e800020 ---[ end trace 4d79afb454bb5314 ]--- Fixes: bc2a940 ("powerpc: Hook in new transactional memory code"

[PATCH 1/2] selftests/powerpc: exec() with suspended transaction

2016-06-15 Thread Cyril Bur
Perform an exec() class syscall with a suspended transaction. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- tools/testing/selftests/powerpc/tm/Makefile | 3 +- tools/testing/selftests/powerpc/tm/tm-exec.c| 55 + tools/testing/selftests/powerpc/tm/tm-ex

[PATCH v2 1/2] selftests/powerpc: exec() with suspended transaction

2016-06-16 Thread Cyril Bur
Perform an exec() class syscall with a suspended transaction. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- V2: No change tools/testing/selftests/powerpc/tm/Makefile | 3 +- tools/testing/selftests/powerpc/tm/tm-exec.c| 55 + tools/testing/selftests/p

[PATCH v2 2/2] powerpc: tm: Always reclaim in start_thread() for exec() class syscalls

2016-06-16 Thread Cyril Bur
4/0x420 Call Trace: Instruction dump: 7c800164 4e800020 7c0022a6 f80304a8 7c0222a6 f80304b0 7c0122a6 f80304b8 4e800020 e80304a8 7c0023a6 e80304b0 <7c0223a6> e80304b8 7c0123a6 4e800020 ---[ end trace 4d79afb454bb5314 ]--- Fixes: bc2a940 ("powerpc: Hook in new transactional memory code"

Re: [PATCH V2 5/8] powerpc: Restore FPU/VEC/VSX if previously used

2016-01-17 Thread Cyril Bur
> > #endif /* CONFIG_PPC_BOOK3S_64 */ > > > return last; > > diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S > > index 162d0f7..038cff8 100644 > > --- a/arch/powerpc/kernel/vector.S >

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

2016-01-17 Thread Cyril Bur
On Fri, 15 Jan 2016 17:25:26 +1100 Michael Neuling <mi...@neuling.org> wrote: > On Fri, 2016-01-15 at 16:04 +1100, Cyril Bur wrote: > > This patch adds the ability to be able to save the VSX registers to > > the > > thread struct without giving up (disabl

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

2016-01-14 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 <cyril...@gmail.com> --- tools/testing/selftests/p

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

2016-01-14 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 <cyril...@gmail.com> --- arch/powerpc/i

[PATCH V2 6/8] powerpc: Add the ability to save FPU without giving it up

2016-01-14 Thread Cyril Bur
to userspace with hot registers avoiding a possibly pointless reload of FPU register state. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/switch_to.h | 2 +- arch/powerpc/kernel/fpu.S| 21 arch/powerpc/kernel/process.c

[PATCH V2 0/8] FP/VEC/VSX switching optimisations

2016-01-14 Thread Cyril Bur
ignore and forcing 64 bit compiles of the tests as they use 64 bit only instructions. Cyril Bur (8): 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 VM

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

2016-01-14 Thread Cyril Bur
With threads leaving the math bits enabled in their saved MSR to indicate that the hardware is hot and a restore is not needed, children need to turn it off as when they do get scheduled, there's no way their registers could have been hot. Signed-off-by: Cyril Bur <cyril...@gmail.com> ---

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

2016-01-14 Thread Cyril Bur
pointless reload of VSX state. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/switch_to.h | 1 - arch/powerpc/kernel/ppc_ksyms.c | 4 arch/powerpc/kernel/process.c| 23 ++- arch/powerpc/kernel/vector.S | 17 --

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

2016-01-14 Thread Cyril Bur
reload of VEC state. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/switch_to.h | 2 +- arch/powerpc/kernel/process.c| 12 +++- arch/powerpc/kernel/vector.S | 24 3 files changed, 16 insertions(+), 22 deletions(-)

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

2016-01-14 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 <cyril...@gmail.com> --- tools/testing/selftests/powerpc/math/.gitignore | 2 + tools/testing/selftests/powerpc/math/Makefile | 4 +- tools/t

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

2016-01-14 Thread Cyril Bur
Loop in assembly checking the registers with many threads. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- tools/testing/selftests/powerpc/math/.gitignore| 2 + tools/testing/selftests/powerpc/math/Makefile | 5 +- tools/testing/selftests/powerpc/math/fpu_asm.S

Re: [PATCH V2 4/8] powerpc: Explicitly disable math features when copying thread

2016-01-14 Thread Cyril Bur
On Fri, 15 Jan 2016 16:42:22 +1100 Michael Neuling <mi...@neuling.org> wrote: > On Fri, 2016-01-15 at 16:04 +1100, Cyril Bur wrote: > > With threads leaving the math bits enabled in their saved MSR to indicate > > that the hardware is hot and a restore is not needed,

[RFC 0/3] Enable MSR_TM lazily

2016-06-29 Thread Cyril Bur
applied. These patches will need to be applied on top of my recent rework of TM: http://patchwork.ozlabs.org/patch/631959/ I have pushed a branch to github to help with reviews: https://github.com/cyrilbur-ibm/linux/tree/tm_lazy Cyril Bur (3): selftests/powerpc: Add test to check TM ucontext

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

2016-02-08 Thread Cyril Bur
On Wed, 27 Jan 2016 23:01:59 +1100 Balbir Singh <bsinghar...@gmail.com> wrote: > On Wed, Jan 27, 2016 at 10:50 AM, Cyril Bur <cyril...@gmail.com> wrote: > > On Mon, 25 Jan 2016 11:04:23 +1100 > > Balbir Singh <bsinghar...@gmail.com> wrote: > > > >&g

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

2016-02-28 Thread Cyril Bur
the saving of registers to thread structs and leave threads MSR with bits enabled. This patch introduces no functional change. Signed-off-by: Cyril Bur <cyril...@gmail.com> --- arch/powerpc/include/asm/reg.h | 8 arch/powerpc/include/asm/switch_to.h | 7 +++ arch/powerpc/

[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 <cyril...@gmail.com> --- 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

[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 <cyril...@gmail.com> --- tools/testing/selftests/p

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

2016-02-28 Thread Cyril Bur
are 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 <cyril...@gmail.com> --- arch/powerpc/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/process.c

[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 <cyril...@gmail.com> --- 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(-)

  1   2   3   4   5   >