[PATCH v13 00/30] Add new powerpc specific ELF core notes

2016-07-27 Thread wei . guo . simon
From: Simon Guo This patch series adds thirteen new ELF core note sections which can be used with existing ptrace request PTRACE_GETREG/SET-SETREGSET for accessing various transactional memory and other miscellaneous debug register sets on powerpc platform. Signed-off-by: Anshuman Khandual

[PATCH v13 01/30] elf: Add powerpc specific core note sections

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds twelve ELF core note sections for powerpc architecture for various registers and register sets which need to be accessed from ptrace interface and then gdb. These additions include special purpose registers like TAR, PPR, DSCR, TM running and checkpointed s

[PATCH v13 04/30] powerpc/ptrace: Enable in transaction NT_PPC_VMX ptrace requests

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables in transaction NT_PPC_VMX ptrace requests. The function vr_get which gets the running value of all VMX registers and the function vr_set which sets the running value of of all VMX registers work on the running set of VMX registers whose location will be

[PATCH v13 09/30] powerpc/ptrace: Enable support for NT_PPC_CVMX

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed VMX register set ELF core note NT_PPC_CVMX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVMX in powerpc corresponding to the ELF core note sectio

[PATCH v13 03/30] powerpc/ptrace: Enable in transaction NT_PRFPREG ptrace requests

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables in transaction NT_PRFPREG ptrace requests. The function fpr_get which gets the running value of all FPR registers and the function fpr_set which sets the running value of of all FPR registers work on the running set of FPR registers whose location will b

[PATCH v13 02/30] powerpc/process: Add the function flush_tmregs_to_thread

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual 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 warning message. Signed-off-by: Anshuman Khandual

[PATCH v13 07/30] powerpc/ptrace: Enable support for NT_PPC_CGPR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed GPR register set ELF core note NT_PPC_CGPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CGPR in powerpc corresponding to the ELF core note sectio

[PATCH v13 14/30] powerpc/ptrace: Enable support for EBB registers

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for EBB state registers related ELF core note NT_PPC_EBB based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_EBB in powerpc corresponding to the ELF core note sectio

[PATCH v13 05/30] powerpc/ptrace: Enable in transaction NT_PPC_VSX ptrace requests

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables in transaction NT_PPC_VSX ptrace requests. The function vsr_get which gets the running value of all VSX registers and the function vsr_set which sets the running value of of all VSX registers work on the running set of VMX registers whose location will b

[PATCH v13 13/30] powerpc/ptrace: Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for running TAR, PPR, DSCR registers related ELF core notes NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET_TAR, REGSET_PP

[PATCH v13 12/30] powerpc/ptrace: Enable NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for all three TM checkpointed SPR states related ELF core note NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET

[PATCH v13 15/30] powerpc/ptrace: Enable support for Performance Monitor registers

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for Performance monitor registers related ELF core note NT_PPC_PMU based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_PMU in powerpc corresponding to the ELF core n

[PATCH v13 16/30] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h'

2016-07-27 Thread wei . guo . simon
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: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc

[PATCH v13 23/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for TAR, PPR, DSCR registers inside TM context. This also adds ptrace interface based helper functions related to checkpointed TAR, PPR, DSCR register access. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/test

[PATCH v13 29/30] selftests/powerpc: Add .gitignore file for ptrace executables

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds a .gitignore file for all the executables in the ptrace test directory thus making invisible with git status query. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace/.gitignore | 11 +++ 1 file

[PATCH v13 21/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers in suspended TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for GPR/FPR registers inside suspended TM context. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace/Makefile| 2 +- .../selftests/powerpc/ptrace/ptrace-tm-spd-gpr.c | 327

[PATCH v13 19/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers

2016-07-27 Thread wei . guo . simon
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 registers. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools

[PATCH v13 24/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in suspended TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for TAR, PPR, DSCR registers inside suspended TM context. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace/Makefile| 2 +- .../selftests/powerpc/ptrace/ptrace-tm-spd-tar.c

[PATCH v13 18/30] selftests/powerpc: Add ptrace tests for EBB

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for EBB/PMU 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 Signed-off-by: Simon Guo --- tools/testing/sel

[PATCH v13 28/30] selftests/powerpc: Add ptrace tests for TM SPR registers

2016-07-27 Thread wei . guo . simon
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. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace/Makefile| 3

[PATCH v13 17/30] selftests/powerpc: Use the new SPRN_DSCR_PRIV definiton

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual Now that the new DSCR register definitions (SPRN_DSCR_PRIV and SPRN_DSCR) are defined outside this directory, use them instead. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/dscr/dscr.h | 10 -- 1 file changed, 4

[PATCH v13 27/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers in suspended TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers inside suspended TM context. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace/Makefile| 3 +- .../selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c | 222

[PATCH v13 25/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers. This also adds ptrace interface based helper functions related to VSX, VMX registers access. This also adds some assembly helper functions related to VSX and VMX registers. Signed-off-by: Anshuman Khandual Sig

[PATCH v13 22/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers

2016-07-27 Thread wei . guo . simon
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 Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace/Ma

[PATCH v13 20/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers in TM

2016-07-27 Thread wei . guo . simon
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 Khandual Signed-off-by: Simon Guo --- tools/testing/selftests/powerpc/ptrace

[PATCH v13 30/30] selftests/powerpc: Fix a build issue

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual Fixes the following build failure - cp_abort.c:90:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < NUM_LOOPS; i++) { ^ cp_abort.c:90:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your cod

[PATCH v13 26/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers in TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers inside TM context. This also adds ptrace interface based helper functions related to chckpointed VSX, VMX registers access. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools/testing/selftest

[PATCH v13 10/30] powerpc/ptrace: Enable support for NT_PPC_CVSX

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed VSX register set ELF core note NT_PPC_CVSX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVSX in powerpc corresponding to the ELF core note sectio

[PATCH v13 08/30] powerpc/ptrace: Enable support for NT_PPC_CFPR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed FPR register set ELF core note NT_PPC_CFPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CFPR in powerpc corresponding to the ELF core note sectio

[PATCH v13 11/30] powerpc/ptrace: Enable support for TM SPR state

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM SPR state related ELF core note NT_PPC_TM_SPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_TM_SPR in powerpc corresponding to the ELF core note section added.

[PATCH v13 06/30] powerpc/ptrace: Adapt gpr32_get, gpr32_set functions for transaction

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch splits gpr32_get, gpr32_set functions to accommodate in transaction ptrace requests implemented in patches later in the series. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- arch/powerpc/kernel/ptrace.c | 64 ++

[PATCH 1/3] mm: mlock: correct a typo in count_mm_mlocked_page_nr() for caculate VMLOCKED pages

2016-09-08 Thread wei . guo . simon
From: Simon Guo There is a typo/bug in count_mm_mlocked_page_nr() for "&" which is mistakenly used with "&&". Also add more checks and some minor change based on Kirill's previous comment. Suggested-by: Kirill A. Shutemov Signed-off-by: Simon Guo --- mm/mlock.c | 6 -- 1 file changed, 4

[PATCH 0/3] mm: mlock: elaborate mlock selftest case and fix one bug identified

2016-09-08 Thread wei . guo . simon
From: Simon Guo The original mlock self tests are far from completed and David suggests to elaborate that. The patch set expand mlock selftest case by randomly mlock/mlock2 on given memory region. It covers both under MLOCK rlimit and exceed MLOCK rlimit case. During the testing, one bug was i

[PATCH 2/3] selftest: move seek_to_smaps_entry() out of mlock2-tests.c

2016-09-08 Thread wei . guo . simon
From: Simon Guo Function seek_to_smaps_entry() can be useful for other selftest functionalities, so move it out to header file. Signed-off-by: Simon Guo --- tools/testing/selftests/vm/mlock2-tests.c | 42 -- tools/testing/selftests/vm/mlock2.h | 43 +++

[PATCH 3/3] selftests: expanding more mlock selftest

2016-09-08 Thread wei . guo . simon
From: Simon Guo This patch will randomly perform mlock/mlock2 on a given memory region, and verify the RLIMIT_MEMLOCK limitation works properly. Suggested-by: David Rientjes Signed-off-by: Simon Guo --- tools/testing/selftests/vm/Makefile | 4 +- tools/testing/selftests/vm/mlo

[PATCH] PCI/hotplug: ppc: correct a php_slot usage after free

2018-03-07 Thread wei . guo . simon
From: Simon Guo In pnv_php_unregister_one(), pnv_php_put_slot() might kfree php_slot structure. But there is pci_hp_deregister() after that with php_slot reference. This patch moves pnv_php_put_slot() to the end of function. Signed-off-by: Simon Guo --- drivers/pci/hotplug/pnv_php.c | 2 +- 1

[PATCH v11 05/27] powerpc/ptrace: Enable support for NT_PPC_CFPR

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed FPR register set ELF core note NT_PPC_CFPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CFPR in powerpc corresponding to the ELF core note sectio

[PATCH v11 04/27] powerpc/ptrace: Enable support for NT_PPC_CGPR

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed GPR register set ELF core note NT_PPC_CGPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CGPR in powerpc corresponding to the ELF core note sectio

[PATCH v11 00/27] Add new powerpc specific ELF core notes

2016-07-16 Thread wei . guo . simon
From: Simon Guo This patch series adds twelve new ELF core note sections which can be used with existing ptrace request PTRACE_GETREG/SET-SETREGSET for accessing various transactional memory and other miscellaneous debug register sets on powerpc platform. Note this patch series now depends

[PATCH v11 02/27] powerpc/process: Add the function flush_tmregs_to_thread

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual 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 warning message. Cc: Benjamin Herrenschmidt Cc:

[PATCH v11 06/27] powerpc/ptrace: Enable support for NT_PPC_CVMX

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed VMX register set ELF core note NT_PPC_CVMX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVMX in powerpc corresponding to the ELF core note sectio

[PATCH v11 16/27] selftests/powerpc: Add ptrace tests for GPR/FPR registers

2016-07-16 Thread wei . guo . simon
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 registers. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman

[PATCH v11 11/27] powerpc/ptrace: Enable support for EBB registers

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for EBB state registers related ELF core note NT_PPC_EBB based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_EBB in powerpc corresponding to the ELF core note sectio

[PATCH v11 15/27] selftests/powerpc: Add ptrace tests for EBB

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for EBB/PMU specific registers. This also adds some generic ptrace interface based helper functions to be used by other patches later on in the series. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Kh

[PATCH v11 13/27] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h'

2016-07-16 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton

[PATCH v11 17/27] selftests/powerpc: Add ptrace tests for GPR/FPR registers in TM

2016-07-16 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blancha

[PATCH v11 10/27] powerpc/ptrace: Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for running TAR, PPR, DSCR registers related ELF core notes NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET_TAR, REGSET_PP

[PATCH v11 07/27] powerpc/ptrace: Enable support for NT_PPC_CVSX

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed VSX register set ELF core note NT_PPC_CVSX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVSX in powerpc corresponding to the ELF core note sectio

[PATCH v11 12/27] powerpc/ptrace: Enable support for Performance Monitor registers

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for Performance monitor registers related ELF core note NT_PPC_PMU based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_PMU in powerpc corresponding to the ELF core n

[PATCH v11 08/27] powerpc/ptrace: Enable support for TM SPR state

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM SPR state related ELF core note NT_PPC_TM_SPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_TM_SPR in powerpc corresponding to the ELF core note section added.

[PATCH v11 09/27] powerpc/ptrace: Enable NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for all three TM checkpointed SPR states related ELF core note NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET

[PATCH v11 14/27] selftests/powerpc: Use the new SPRN_DSCR_PRIV definiton

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual Now that the new DSCR register definitions (SPRN_DSCR_PRIV and SPRN_DSCR) are defined outside this directory, use them instead. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual

[PATCH v11 25/27] selftests/powerpc: Add ptrace tests for TM SPR registers

2016-07-16 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur

[PATCH v11 18/27] selftests/powerpc: Add ptrace tests for GPR/FPR registers in suspended TM

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for GPR/FPR registers inside suspended TM context. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual Cc: Simon Guo Cc: Ulrich Weigand Cc:

[PATCH v11 21/27] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in suspended TM

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for TAR, PPR, DSCR registers inside suspended TM context. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual Cc: Simon Guo Cc: Ulrich Weiga

[PATCH v11 24/27] selftests/powerpc: Add ptrace tests for VSX, VMX registers in suspended TM

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers inside suspended TM context. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual Cc: Simon Guo Cc: Ulrich Weigand Cc

[PATCH v11 19/27] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers

2016-07-16 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard

[PATCH v11 27/27] selftests/powerpc: Fix a build issue

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual Fixes the following build failure - cp_abort.c:90:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < NUM_LOOPS; i++) { ^ cp_abort.c:90:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your cod

[PATCH v11 23/27] selftests/powerpc: Add ptrace tests for VSX, VMX registers in TM

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers inside TM context. This also adds ptrace interface based helper functions related to chckpointed VSX, VMX registers access. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan C

[PATCH v11 20/27] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in TM

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for TAR, PPR, DSCR registers inside TM context. This also adds ptrace interface based helper functions related to checkpointed TAR, PPR, DSCR register access. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: S

[PATCH v11 22/27] selftests/powerpc: Add ptrace tests for VSX, VMX registers

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers. This also adds ptrace interface based helper functions related to VSX, VMX registers access. This also adds some assembly helper functions related to VSX and VMX registers. Cc: Benjamin Herrenschmidt Cc: Paul

[PATCH v11 26/27] selftests/powerpc: Add .gitignore file for ptrace executables

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds a .gitignore file for all the executables in the ptrace test directory thus making invisible with git status query. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khand

[PATCH v11 01/27] elf: Add powerpc specific core note sections

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch adds twelve ELF core note sections for powerpc architecture for various registers and register sets which need to be accessed from ptrace interface and then gdb. These additions include special purpose registers like TAR, PPR, DSCR, TM running and checkpointed s

[PATCH v11 03/27] powerpc/ptrace: Adapt gpr32_get, gpr32_set functions for transaction

2016-07-16 Thread wei . guo . simon
From: Anshuman Khandual This patch splits gpr32_get, gpr32_set functions to accommodate in transaction ptrace requests implemented in patches later in the series. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuma

[PATCH v3] powerpc: Export thread_struct.used_vr/used_vsr to user space

2016-07-06 Thread wei . guo . simon
From: Simon Guo These 2 fields track whether user process has used Altivec/VSX registers or not. They are used by kernel to setup signal frame on user stack correctly regarding vector part. CRIU(Checkpoint and Restore In User space) builds signal frame for restored process. It will need this exp

[PATCH v4] powerpc: Export thread_struct.used_vr/used_vsr to user space

2016-07-07 Thread wei . guo . simon
From: Simon Guo These 2 fields track whether user process has used Altivec/VSX registers or not. They are used by kernel to setup signal frame on user stack correctly regarding vector part. CRIU(Checkpoint and Restore In User space) builds signal frame for restored process. It will need this exp

[PATCH] powerpc: set used_vsr/used_vr/used_spe in sigreturn path when MSR bits are active

2016-07-26 Thread wei . guo . simon
From: Simon Guo Normally, when MSR[VSX/VR/SPE] bits = 1, the used_vsr/used_vr/used_spe bit have already been set. However signal frame locates at user space and it is controlled by user application. It is up to kernel to make sure used_vsr/used_vr/used_spe(in kernel)=1 and consistent with MSR bit

[PATCH v12 02/30] powerpc/process: Add the function flush_tmregs_to_thread

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual 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 warning message. Cc: Benjamin Herrenschmidt Cc:

[PATCH v12 10/30] powerpc/ptrace: Enable support for NT_PPC_CVSX

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed VSX register set ELF core note NT_PPC_CVSX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVSX in powerpc corresponding to the ELF core note sectio

[PATCH v12 00/30] Add new powerpc specific ELF core notes

2016-07-27 Thread wei . guo . simon
From: Simon Guo This patch series adds thirteen new ELF core note sections which can be used with existing ptrace request PTRACE_GETREG/SET-SETREGSET for accessing various transactional memory and other miscellaneous debug register sets on powerpc platform. Cc: Benjamin Herrenschmidt Cc: P

[PATCH v12 04/30] powerpc/ptrace: Enable in transaction NT_PPC_VMX ptrace requests

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables in transaction NT_PPC_VMX ptrace requests. The function vr_get which gets the running value of all VMX registers and the function vr_set which sets the running value of of all VMX registers work on the running set of VMX registers whose location will be

[PATCH v12 06/30] powerpc/ptrace: Adapt gpr32_get, gpr32_set functions for transaction

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch splits gpr32_get, gpr32_set functions to accommodate in transaction ptrace requests implemented in patches later in the series. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuma

[PATCH v12 11/30] powerpc/ptrace: Enable support for TM SPR state

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM SPR state related ELF core note NT_PPC_TM_SPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_TM_SPR in powerpc corresponding to the ELF core note section added.

[PATCH v12 08/30] powerpc/ptrace: Enable support for NT_PPC_CFPR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed FPR register set ELF core note NT_PPC_CFPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CFPR in powerpc corresponding to the ELF core note sectio

[PATCH v12 13/30] powerpc/ptrace: Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for running TAR, PPR, DSCR registers related ELF core notes NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET_TAR, REGSET_PP

[PATCH v12 12/30] powerpc/ptrace: Enable NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for all three TM checkpointed SPR states related ELF core note NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET

[PATCH v12 01/30] elf: Add powerpc specific core note sections

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds twelve ELF core note sections for powerpc architecture for various registers and register sets which need to be accessed from ptrace interface and then gdb. These additions include special purpose registers like TAR, PPR, DSCR, TM running and checkpointed s

[PATCH v12 09/30] powerpc/ptrace: Enable support for NT_PPC_CVMX

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed VMX register set ELF core note NT_PPC_CVMX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVMX in powerpc corresponding to the ELF core note sectio

[PATCH v12 27/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers in suspended TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers inside suspended TM context. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual Cc: Simon Guo Cc: Ulrich Weigand Cc

[PATCH v12 15/30] powerpc/ptrace: Enable support for Performance Monitor registers

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for Performance monitor registers related ELF core note NT_PPC_PMU based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_PMU in powerpc corresponding to the ELF core n

[PATCH v12 26/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers in TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers inside TM context. This also adds ptrace interface based helper functions related to chckpointed VSX, VMX registers access. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan C

[PATCH v12 30/30] selftests/powerpc: Fix a build issue

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual Fixes the following build failure - cp_abort.c:90:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < NUM_LOOPS; i++) { ^ cp_abort.c:90:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your cod

[PATCH v12 24/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in suspended TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for TAR, PPR, DSCR registers inside suspended TM context. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual Cc: Simon Guo Cc: Ulrich Weiga

[PATCH v12 16/30] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h'

2016-07-27 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton

[PATCH v12 19/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers

2016-07-27 Thread wei . guo . simon
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 registers. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman

[PATCH v12 20/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers in TM

2016-07-27 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blancha

[PATCH v12 14/30] powerpc/ptrace: Enable support for EBB registers

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for EBB state registers related ELF core note NT_PPC_EBB based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_EBB in powerpc corresponding to the ELF core note sectio

[PATCH v12 28/30] selftests/powerpc: Add ptrace tests for TM SPR registers

2016-07-27 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur

[PATCH v12 25/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for VSX, VMX registers. This also adds ptrace interface based helper functions related to VSX, VMX registers access. This also adds some assembly helper functions related to VSX and VMX registers. Cc: Benjamin Herrenschmidt Cc: Paul

[PATCH v12 23/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for TAR, PPR, DSCR registers inside TM context. This also adds ptrace interface based helper functions related to checkpointed TAR, PPR, DSCR register access. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: S

[PATCH v12 29/30] selftests/powerpc: Add .gitignore file for ptrace executables

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds a .gitignore file for all the executables in the ptrace test directory thus making invisible with git status query. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khand

[PATCH v12 21/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers in suspended TM

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for GPR/FPR registers inside suspended TM context. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual Cc: Simon Guo Cc: Ulrich Weigand Cc:

[PATCH v12 22/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers

2016-07-27 Thread wei . guo . simon
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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard

[PATCH v12 18/30] selftests/powerpc: Add ptrace tests for EBB

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch adds ptrace interface test for EBB/PMU specific registers. This also adds some generic ptrace interface based helper functions to be used by other patches later on in the series. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Kh

[PATCH v12 17/30] selftests/powerpc: Use the new SPRN_DSCR_PRIV definiton

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual Now that the new DSCR register definitions (SPRN_DSCR_PRIV and SPRN_DSCR) are defined outside this directory, use them instead. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Shuah Khan Cc: Anton Blanchard Cc: Cyril Bur Cc: Anshuman Khandual

[PATCH v12 05/30] powerpc/ptrace: Enable in transaction NT_PPC_VSX ptrace requests

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables in transaction NT_PPC_VSX ptrace requests. The function vsr_get which gets the running value of all VSX registers and the function vsr_set which sets the running value of of all VSX registers work on the running set of VMX registers whose location will b

[PATCH v12 07/30] powerpc/ptrace: Enable support for NT_PPC_CGPR

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables support for TM checkpointed GPR register set ELF core note NT_PPC_CGPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CGPR in powerpc corresponding to the ELF core note sectio

[PATCH v12 03/30] powerpc/ptrace: Enable in transaction NT_PRFPREG ptrace requests

2016-07-27 Thread wei . guo . simon
From: Anshuman Khandual This patch enables in transaction NT_PRFPREG ptrace requests. The function fpr_get which gets the running value of all FPR registers and the function fpr_set which sets the running value of of all FPR registers work on the running set of FPR registers whose location will b

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

2016-10-26 Thread wei . guo . simon
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 registers. Signed-off-by: Anshuman Khandual Signed-off-by: Simon Guo --- tools

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

2016-10-26 Thread wei . guo . simon
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. Now that the new DSCR register definitions (SPRN_DSCR_PRIV and SPRN_DSCR) are defined outside th

  1   2   >