[PATCH 1/1] powerpc/crypto: Add cond_resched() in crc-vpmsum self-test

2019-11-03 Thread Chris Smart
. Signed-off-by: Chris Smart --- arch/powerpc/crypto/crc-vpmsum_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/crypto/crc-vpmsum_test.c b/arch/powerpc/crypto/crc-vpmsum_test.c index 47985219a68f..dce86e75f1a8 100644 --- a/arch/powerpc/crypto/crc-vpmsum_test.c +++ b/arch

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-20 Thread Chris Smart
On Thu, Jun 16, 2016 at 11:04:12PM -0500, Segher Boessenkool wrote: On Fri, Jun 17, 2016 at 09:33:45AM +1000, Chris Smart wrote: +#define PPC_INST_COPY 0x7c00060c +#define PPC_INST_COPY_FIRST0x7c20060c +#define PPC_INST_PASTE 0x7c00070c +#define

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-19 Thread Chris Smart
On Fri, Jun 17, 2016 at 05:20:05PM +1000, Balbir Singh wrote: On 17/06/16 09:33, Chris Smart wrote: [snip] + +/* + * ISA 3.0 (such as P9) copy, copy_first, paste and paste_last alignment + * check. + * + * Send a SIGBUS to the process that caused the fault

[Patch v2 2/2] selftests/powerpc: Test unaligned copy and paste

2016-06-16 Thread Chris Smart
Test that an ISA 3.0 compliant machine performing an unaligned copy, copy_first, paste or paste_last is sent a SIGBUS. Signed-off-by: Chris Smart --- Changes since v1: - check that the instruction we trapped on was the one we want - split out tests into common code tools/testing/selftests

[Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-16 Thread Chris Smart
pasting to a co-processor and paste_last is the synchronisation point for preceding copy/paste sequences. Thanks to Michael Neuling for his help. Signed-off-by: Chris Smart --- Changes since v1: - define and use instruction for mask test arch/powerpc/include/asm/ppc-opcode.h | 4 arch

Re: [PATCH 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-13 Thread Chris Smart
On Thu, Jun 09, 2016 at 08:57:50AM +0200, Christophe Leroy wrote: Le 09/06/2016 à 08:01, Chris Smart a écrit : Calling ISA 3.0 instructions copy, copy_first, paste and paste_last generates an alignment fault when copying or pasting unaligned data (128 byte). We catch this and send SIGBUS to

[PATCH 2/2] selftests/powerpc: Test unaligned copy and paste

2016-06-08 Thread Chris Smart
Test that an ISA 3.0 compliant machine performing an unaligned copy, copy_first, paste or paste_last is sent a SIGBUS. Signed-off-by: Chris Smart --- tools/testing/selftests/powerpc/Makefile | 3 +- .../testing/selftests/powerpc/alignment/.gitignore | 4 ++ tools/testing/selftests

[PATCH 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-08 Thread Chris Smart
pasting to a co-processor and paste_last is the synchronisation point for preceding copy/paste sequences. Thanks to Michael Neuling for his help. Signed-off-by: Chris Smart --- arch/powerpc/kernel/align.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel

[PATCH] powerpc: Remove unnecessary CONFIG_SMP #ifdefs

2016-05-01 Thread Chris Smart
The code in machine_restart/power_off/halt() includes #ifdefs around calls to smp_send_stop(), however these are not required as include/linux/smp.h includes an empty version of this function for CONFIG_SMP=n builds. Signed-off-by: Chris Smart --- arch/powerpc/kernel/setup-common.c | 6 -- 1

[PATCH] selftests/powerpc: Test cp_abort during context switch

2016-05-01 Thread Chris Smart
The paste should never succeed and the test fails if it does. This is a test for commit, "8a64904 powerpc: Add support for userspace P9 copy paste." Patch created with much assistance from Michael Neuling Signed-off-by: Chris Smart --- tools/testing/selftests/powerpc/Makefile

Re: [PATCH] powerpc/pseries: Add null property check to pseries_discover_pic()

2016-05-01 Thread Chris Smart
thing to check. Confirming that strstr calls strlen on the first argument, which would dereference a null pointer. Reviewed-by: Chris Smart Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/platforms/pseries/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-27 Thread Chris Smart
On Wed, Apr 27, 2016 at 03:25:59PM +, David Laight wrote: From: Chris Smart Sent: 26 April 2016 01:29 The copy paste facility introduced in POWER9 provides an optimised mechanism for a userspace application to copy a cacheline. This is provided by a pair of instructions, copy and paste

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-25 Thread Chris Smart
On Tue, Apr 26, 2016 at 04:42:09PM +1000, Cyril Bur wrote: Hi Chris, Patch looks good. Looks like you've put 8 spaces (instead of a tab) on the PPC_CP_ABORT line. Argh. I'm not sure how that happened, thanks. Apart from that, Reviewed-by: Cyril Bur Cheers, -c __

[PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-25 Thread Chris Smart
one process leaking into the paste of another. This code enables use of the cp_abort instruction if a supported processor is detected. NOTE: this is for userspace only, not in kernel, and does not deal with KVM guests. Patch created with much assistance from Michael Neuling Signed-off-by: Chris